OpenGLPrakt --> cObject --> cVisibleObject --> cInteractiveObject --> cCube

class cCube
    extends cInteractiveObject as public

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.

Source:
../src/cCube.hh:27

Constructors Index

cCube
[public] default constructor w/ optional object name
cCube
[public] constructor w/ optional size and object name
cCube
[public] default constructor
cCube
[public] default constructor
~cCube
[public] destructor


Enums Index

teCubeType
[public] an enum to describe the cube's type (solid or wireframed)


Variables Index

mDisplayList
[protected] ID of display list which contains the cube
mResolution
[protected] resolution of cube, if given
mSize
[protected] side length of cube
mSolid
[protected] Is the cube solid or wireframed?


Methods Index

DrawThisObject
[protected] drawing function
GetDefaultName
[protected] return class name
Init
[public] initialization function
MakeSolidCube
[protected] create solid cube at given resolution
MakeWireCube
[protected] create wire framed cube at given resolution


Constructors

cCube

public cCube ( cEventDispatcher * disp ,
               const char * name = NULL ) ;

default constructor w/ optional object name

Parameters:
name name of object (optional)

cCube

public cCube ( cEventDispatcher * disp ,
               GLdouble size = 1 . 0 ,
               const char * name = NULL ) ;

constructor w/ optional size and object name

Parameters:
size (GLdouble) side length of cube (default: 1.0)
name name of object (optional)

cCube

public cCube ( cEventDispatcher * disp ,
               GLdouble size = 1 . 0 ,
               teCubeType solid = CUBE_SOLID ,
               const char * name = NULL ) ;

default constructor

Parameters:
size (GLdouble) side length of cube
solid (GLboolean) draw solid or wireframe cube (default: solid)
name name of object (optional)

cCube

public cCube ( cEventDispatcher * disp ,
               GLdouble size ,
               teCubeType solid ,
               int resolution ,
               const char * name = NULL ) ;

default constructor

Parameters:
size (GLdouble) side length of cube
solid (GLboolean) draw solid or wireframe cube (default: solid)
resolution subdivisions per side
name name of object (optional)

cCube

public virtual ~ cCube ( ) ;

destructor


Enums

teCubeType

public enum teCubeType { CUBE_SOLID ,
                         CUBE_WIREFRAMED } ;

an enum to describe the cube's type (solid or wireframed)


Variables

mDisplayList

protected GLuint mDisplayList

ID of display list which contains the cube

mSolid

protected teCubeType mSolid

Is the cube solid or wireframed?

mSize

protected GLdouble mSize

side length of cube

mResolution

protected int mResolution

resolution of cube, if given


Methods

Init

public virtual int Init ( ) ;

initialization function

DrawThisObject

protected virtual void DrawThisObject ( ) ;

drawing function

GetDefaultName

protected virtual const char * GetDefaultName ( ) const ;

return class name

MakeSolidCube

protected void MakeSolidCube ( ) ;

create solid cube at given resolution

MakeWireCube

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.