OpenGLPrakt --> cObject --> cVisibleObject --> cInteractiveObject --> cCube
Simple cube object.
This object displays a simple cube, either solid or wireframed. glutSolidCube() or glutWireCube() is used to build it. Further, a display list is used to draw the cube.
public cCube ( cEventDispatcher * disp , const char * name = NULL ) ;
default constructor w/ optional object name
name | name of object (optional) |
public cCube ( cEventDispatcher * disp , GLdouble size = 1 . 0 , const char * name = NULL ) ;
constructor w/ optional size and object name
size | (GLdouble) side length of cube (default: 1.0) |
name | name of object (optional) |
public cCube ( cEventDispatcher * disp , GLdouble size = 1 . 0 , teCubeType solid = CUBE_SOLID , const char * name = NULL ) ;
default constructor
size | (GLdouble) side length of cube |
solid | (GLboolean) draw solid or wireframe cube (default: solid) |
name | name of object (optional) |
public cCube ( cEventDispatcher * disp , GLdouble size , teCubeType solid , int resolution , const char * name = NULL ) ;
default constructor
size | (GLdouble) side length of cube |
solid | (GLboolean) draw solid or wireframe cube (default: solid) |
resolution | subdivisions per side |
name | name of object (optional) |
public virtual ~ cCube ( ) ;
destructor
public enum teCubeType { CUBE_SOLID , CUBE_WIREFRAMED } ;
an enum to describe the cube's type (solid or wireframed)
protected GLuint mDisplayList
ID of display list which contains the cube
protected teCubeType mSolid
Is the cube solid or wireframed?
protected GLdouble mSize
side length of cube
protected int mResolution
resolution of cube, if given
public virtual int Init ( ) ;
initialization function
protected virtual void DrawThisObject ( ) ;
drawing function
protected virtual const char * GetDefaultName ( ) const ;
return class name
protected void MakeSolidCube ( ) ;
create solid cube at given resolution
protected void MakeWireCube ( ) ;
create wire framed cube at given resolution
This documentation was generated automatically by the ccdoc tool (version 0.7a).
Click here to submit a bug report or feature request.
Click here to return to the top of the page.