#include <ivf/IvfObject.h>
Inheritance diagram for CIvfObject:
Public Types | |
enum | TObjectState { OS_ON, OS_OFF } |
enum | TSelectState { SS_ON, SS_OFF } |
Public Member Functions | |
bool | getRenderMaterial () |
void | setRenderMaterial (bool flag) |
bool | isSelectEnabled () |
void | disableSelect () |
void | enableSelect () |
bool | isEnabled () |
void | disable () |
void | enable () |
CIvfObject () | |
CIvfObject (const CIvfObject &) | |
virtual | ~CIvfObject () |
CIvfObject & | operator= (const CIvfObject &arg) |
IvfClassInfo ("CIvfObject", CIvfBase) | |
void | setTag (long tag) |
long | getTag () |
void | setSelect (TSelectState selectState) |
TSelectState | getSelect () |
void | setState (TObjectState state) |
TObjectState | getState () |
bool | getUseSelectShape () |
void | setUseSelectShape (bool flag) |
CIvfBoundingSphere * | getBoundingSphere () |
void | setDisplayList (GLuint nList) |
GLuint | getDisplayList () |
void | setUselist (bool flag) |
bool | getUselist () |
virtual void | render () |
void | initBoundingSphere () |
virtual void | updateBoundingSphere () |
void | setCulled (bool flag) |
bool | getCulled () |
const char * | getName () |
void | setName (const char *name) |
void | setRenderState (CIvfRenderState *state) |
CIvfRenderState * | getRenderState () |
Protected Member Functions | |
virtual void | preGeometry () |
virtual void | postGeometry () |
virtual void | compileList () |
virtual void | createSelect () |
virtual void | createGeometry () |
virtual void | createMaterial () |
virtual void | beginTransform () |
virtual void | endTransform () |
CIvfObject has virtual functions for handling drawing and transformations in OpenGL.
Definition at line 46 of file IvfObject.h.
|
CIvfObject constructor |
|
CIvfObject constructor |
|
CIvfObject destructor |
|
Start transform Implements a OpenGL transform. This routine should call a glPushMatrix() and then call OpenGL routines transforming the object. The method is the first routine to be called in the render() method. Reimplemented in CIvfOldScene, CIvfSelectComposite, CIvfShape, and CIvfView. |
|
Compiles display list. To be implemented. |
|
|
Creates the material of the object. This method is called from the render() method when material rendering is to be done. Objects derived from CIvfObject should implement material routines from this method using OpenGL. Reimplemented in CIvfMaterial, and CIvfShape. |
|
Creates the select object. When the object is selected. This method is called to create the object respresenting the select state. Reimplemented in CIvfBrick, CIvfCone, CIvfExtrusion, CIvfNode, CIvfShape, and CIvfSphere. |
|
End transform This is the last method called in the render() method. if a glPushMatrix() is called in the beginTransform() a glPopMatrix() should be called in this routine. Reimplemented in CIvfOldScene, CIvfSelectComposite, and CIvfShape. |
|
Returns object bounding sphere. To be implemented. |
|
Returns cull status |
|
Return display list number. To be implemented. |
|
Returns object name (default=NULL) Reimplemented in CIvfTexture. |
|
Return assigned render state |
|
Returns the select state of an object. |
|
Returns object state. |
|
Returns the tag property of an object. |
|
Returns diusplay list usage. |
|
Initializes use of bounding sphere If no bounding sphere is assigned to object, one is created. The updateBoundingSphere is called to update the size of the bounding sphere. |
|
Renders the object This method renders the object to screen. The code example below shows which routines are called when the render() method is called. To derive a new class based on CIvfObject the methods shown in the code example should be overridden. beginTransform(); if (getSelectState() == IVF_SELECT_ON) createSelect(); createMaterial(); createGeomtry(); endTransform(); * Reimplemented in CIvfOldLight, and CIvfOldLightModel. |
|
Sets the cull flag If set to true the objects has been culled. The cull flag is set to false after each call to render. |
|
Sets the display list number. To be implemented. |
|
Gives the object a name |
|
Set object render state The render state encapsulates an OpenGL state change using the glEnable()/glDisable() pair. The state will be applied in the beginning of the render() method and removed before exiting the render() method. The render state should be handled like a material or texture. |
|
Sets the select property of an object. This property is used to indicate if the object is selected. If the select state is IVF_SELECT_ON the virtual method createSelect is called to create the object that is used to indicate the select state. if the select state is SS_OFF the object is rendered as normal. Default state is SS_OFF.
|
|
Sets object state. The state of the object is used to determine if the object is to be drawn or not. OS_ON renders the object (default) OS_OFF turns the object off.
|
|
Sets the tag property of an object. The tag property can be used to assign special properties to the object. |
|
Sets display list usage. Determines if display lists are to be used when drawing the object. To be implemented. |
|
Updates the size of bounding sphere Classes used in cull operations should override this method and update the size of the bounding sphere this method should be called if the object has changed size and is also called when the initBoundingSphere is called when culling is used. Reimplemented in CIvfComposite, CIvfCone, CIvfConstructionPlane, CIvfExtrArrow, CIvfExtrusion, CIvfGLPrimitive, CIvfGrid, CIvfNode, CIvfOldGrid, and CIvfSphere. |