]> Pileus Git - grits/blobdiff - src/objects/gis-object.h
Move OpenGL code from GisOpenGL to objects
[grits] / src / objects / gis-object.h
index 313f454f49fe5c52a4c17ad1d2449f9f96f12f49..3060c64332a2d55366502859a9c598d0c0b10194 100644 (file)
 
 #include <glib.h>
 #include <glib-object.h>
-
-/* 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,15 +36,31 @@ 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);
 
+/* 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)