summaryrefslogtreecommitdiff
path: root/akamaru.h
diff options
context:
space:
mode:
Diffstat (limited to 'akamaru.h')
-rw-r--r--akamaru.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/akamaru.h b/akamaru.h
index 1e29f5e..af3f772 100644
--- a/akamaru.h
+++ b/akamaru.h
@@ -1,3 +1,6 @@
+/* -*- mode: c; c-basic-offset: 2 -*-
+ */
+
#ifndef __AKAMARU_H__
#define __AKAMARU_H__
@@ -83,6 +86,7 @@ struct _Spacer {
struct _Anchor {
Object *object;
double x, y;
+ Link link;
};
struct _Polygon {
@@ -90,12 +94,15 @@ struct _Polygon {
Point *points;
Vector *normals;
int enclosing;
+ Link link;
};
struct _Model {
List object_list;
List spacer_list;
List spring_list;
+ List anchor_list;
+ List polygon_list;
int num_objects;
Object *objects;
@@ -153,6 +160,10 @@ void model_for_each_object (Model *model, ObjectFunc func, void *data);
Spacer *model_add_spacer (Model *model, Object *a, Object *b, double length);
Spring *model_add_spring (Model *model, Object *a, Object *b, double length);
+Anchor *model_add_anchor (Model *model, Object *object, double x, double y);
+Polygon *model_add_polygon (Model *model, int enclosing, int num_points, ...);
+Polygon *model_add_enclosing_rectangle (Model *model, double x0, double y0,
+ double x1, double y1);
void model_step (Model *model, double delta_t);