![]() |
![]() |
![]() |
Grits Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
struct GritsObject; struct GritsObjectClass; void grits_object_draw (GritsObject *object
,GritsOpenGL *opengl
); #define grits_object_center (object)
GObject +----GritsObject +----GritsCallback +----GritsMarker +----GritsTile +----GritsVolume
Objects in grits are things which can be added to the viewer and will be displayed to the user. Each object has information such as it's location and level of detail which are used by the viewer to determine which objects should be drawn.
Each GritsObject is also a GObject, but not every GObject in grits is a GritsObject. The "Object" part of the name is just coincidence.
struct GritsObjectClass { GObjectClass parent_class; /* Move some of these to GObject? */ void (*draw) (GritsObject *object, GritsOpenGL *opengl); void (*hide) (GritsObject *object, gboolean hidden); };
void grits_object_draw (GritsObject *object
,GritsOpenGL *opengl
);
Perform any OpenGL commands necessasairy to draw the object.
The GL_PROJECTION and GL_MODELVIEW matricies and GL_ALL_ATTRIB_BITS will be restored to the default state after the call to draw.
|
the object |
|
the viewer the object is being displayed in |
#define grits_object_center(object)
Get the GritsPoint representing the center of an object
|
The GritsObject to get the center of |
Returns : |
the center point |