OpenGLPrakt --> cObject --> cVisibleObject --> cInteractiveObject --> cPlane
Simple plane object.
This object displays a simple plane, either solid or wireframed. Further, a display list is used to draw the plane. The plane starts at (-size_x/2,-size_y/2,0) and extends to (size_x/2, size_y/2, 0) Texture coordinates are generated also. (default: (0.0,0.0)-(1.0,1.0))
public cPlane ( cEventDispatcher * disp , const char * name = NULL ) ;
default constructor w/ optional object name
name | name of object (optional) |
public cPlane ( cEventDispatcher * disp , GLdouble size_x , GLdouble size_y , const char * name = NULL ) ;
constructor w/ optional size and object name
size_x | (GLdouble) x side length of plane (default: 1.0) |
size_y | (GLdouble) y side length of plane (default: 1.0) |
name | name of object (optional) |
public cPlane ( cEventDispatcher * disp , GLdouble size_x , GLdouble size_y , tePlaneType solid , const char * name = NULL ) ;
default constructor
size_x | (GLdouble) x side length of plane (default: 1.0) |
size_y | (GLdouble) y side length of plane (default: 1.0) |
solid | (tePlaneType) draw solid or wireframe plane (default: solid) |
name | name of object (optional) |
public cPlane ( cEventDispatcher * disp , GLdouble size_x , GLdouble size_y , tePlaneType solid , int resolution , const char * name = NULL ) ;
default constructor
size_x | (GLdouble) x side length of plane (default: 1.0) |
size_y | (GLdouble) y side length of plane (default: 1.0) |
solid | (tePlaneType) draw solid or wireframe plane (default: solid) |
resolution | subdivisions per side |
name | name of object (optional) |
public virtual ~ cPlane ( ) ;
destructor
public enum tePlaneType { PLANE_SOLID , PLANE_WIREFRAMED } ;
an enum to describe the plane's type (solid or wireframed)
protected GLuint mDisplayList
ID of display list which contains the plane
protected tePlaneType mSolid
Is the plane solid or wireframed?
protected GLdouble mSizeX
side length of plane
protected GLdouble mSizeY
protected int mResolution
resolution of plane, if given
protected GLfloat mTexFromX
texture domain to use
protected GLfloat mTexToX
protected GLfloat mTexFromY
protected GLfloat mTexToY
public virtual int Init ( ) ;
initialization function
public virtual void SetTextureDomain ( GLfloat x_min , GLfloat x_max , GLfloat y_min , GLfloat y_max ) ;
set texture coordinates to use
x_min | from-x |
x_max | to-x |
y_min | from-y |
y_max | to-y |
protected virtual void DrawThisObject ( ) ;
drawing function
protected virtual const char * GetDefaultName ( ) const ;
return class name
protected virtual void MakeSolidPlane ( ) ;
create solid plane at given resolution
protected virtual void MakeWirePlane ( ) ;
create wire framed plane 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.