X-Git-Url: http://pileus.org/git/?p=grits;a=blobdiff_plain;f=src%2Fobjects%2Fgis-object.h;h=3060c64332a2d55366502859a9c598d0c0b10194;hp=b823161d656ee4259c4bfe3fbafcabe38d5541e5;hb=72643f9bd6c87e08670eb1a0aad2da5573b99774;hpb=7d7d6ae0531a85361ce0d8b997d988b653282847 diff --git a/src/objects/gis-object.h b/src/objects/gis-object.h index b823161..3060c64 100644 --- a/src/objects/gis-object.h +++ b/src/objects/gis-object.h @@ -20,18 +20,7 @@ #include #include - -/* GisPoint */ -typedef struct _GisPoint GisPoint; - -struct _GisPoint { - gdouble lat, lon, elev; -}; - -GisPoint *gis_point_new(); -void gis_point_set_lle(GisPoint *point, gdouble lat, gdouble lon, gdouble elev); -void gis_point_free(GisPoint *point); - +#include "gis-util.h" /* GisObject */ #define GIS_TYPE_OBJECT (gis_object_get_type()) @@ -47,18 +36,32 @@ typedef struct _GisObjectClass GisObjectClass; struct _GisObject { GObject parent_instance; GisPoint center; + gboolean hidden; gdouble lod; }; +#include "gis-opengl.h" struct _GisObjectClass { GObjectClass parent_class; + + /* Move some of these to GObject? */ + void (*draw) (GisObject *object, GisOpenGL *opengl); }; GType gis_object_get_type(void); -static inline GisPoint *gis_object_center(GisObject *object) -{ - return &GIS_OBJECT(object)->center; -} +/* Implemented by sub-classes */ +void gis_object_draw(GisObject *object, GisOpenGL *opengl); + +/** + * gis_object_center: + * @object: The #GisObject to get the center of + * + * Get the #GisPoint representing the center of an object + * + * Returns: the center point + */ +#define gis_object_center(object) \ + (&GIS_OBJECT(object)->center) #endif