Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

DrawableObject Class Reference

Drawable Object base class. More...

#include <drawableobject.h>

Inheritance diagram for DrawableObject:

DirTree FileTree NickTree SelectionCube List of all members.

Public Member Functions

 DrawableObject ()
 Default Contrtuctor.

virtual ~DrawableObject ()
 Default Destructor.

virtual void matrixOps (void *p)=0
 A pure virtual function to pass drawing matrix options.

virtual void draw (void *p)=0
 A pure virtual function to draw the object.

virtual PositiongetPosition ()=0
 A pure virtual function to get a pointer to the position object.

GLfloat * getColor ()
 a function that returns the drawable object's color

void setColor (GLfloat *newColor)
 a function to set the color of the object

void setCurrentColor (GLfloat *newColor)
 a function to set the current color of the object

int getId ()
 a function to get the ID of the object

void setId (int newId)
 a function to set the ID of the object

int getIndex ()
 a function to get the index of the drawable object

void setIndex (int newIndex)
 a function to set the index of the drawable object


Protected Attributes

PositionthePosition
 a pointer to the position of the drawable object

GLfloat color [4]
 the color of the Drawable Object

GLfloat currentColor [4]
 the current color of the Drawable Object

int id
 The identification number of the Drawable Object.

int index
 The index of the Drawable object of the container it currently resides in.


Detailed Description

Drawable Object base class.

Drawable object is a base class which allows for objects to be drawn on the screen


Constructor & Destructor Documentation

DrawableObject::DrawableObject  ) 
 

Default Contrtuctor.

the default constructor which initalizes most things to 0

DrawableObject::~DrawableObject  )  [virtual]
 

Default Destructor.

the default destructor which deletes the left over stuff


Member Function Documentation

virtual void DrawableObject::draw void *  p  )  [pure virtual]
 

A pure virtual function to draw the object.

Parameters:
p a void pointer
Returns:
nothing

Implemented in SelectionCube, DirTree, and FileTree.

GLfloat * DrawableObject::getColor  ) 
 

a function that returns the drawable object's color

Returns:
a pointer to an array of 4 GLfloat elements describing the objects color

int DrawableObject::getId  ) 
 

a function to get the ID of the object

Returns:
an integer ID

int DrawableObject::getIndex  ) 
 

a function to get the index of the drawable object

Returns:
an interger index into the container that this drawable object is contained

virtual Position* DrawableObject::getPosition  )  [pure virtual]
 

A pure virtual function to get a pointer to the position object.

Returns:
a pointer to a Position object

Implemented in SelectionCube, DirTree, FileTree, and NickTree.

virtual void DrawableObject::matrixOps void *  p  )  [pure virtual]
 

A pure virtual function to pass drawing matrix options.

Parameters:
p a void pointer
Returns:
nothing

Implemented in SelectionCube, DirTree, and FileTree.

void DrawableObject::setColor GLfloat *  newColor  ) 
 

a function to set the color of the object

Parameters:
newColor is a pointer to an array of 4 GLfloats describing the new color for the object
Returns:
nothing

void DrawableObject::setCurrentColor GLfloat *  newColor  ) 
 

a function to set the current color of the object

Parameters:
newColor is a pointer to an array of 4 GLfloats describing the new color for the object
Returns:
nothing

void DrawableObject::setId int  newId  ) 
 

a function to set the ID of the object

Parameters:
newId an integer representing the new ID of the onject
Returns:
nothing

void DrawableObject::setIndex int  newIndex  ) 
 

a function to set the index of the drawable object

Parameters:
newIndex the integer index of the object in its current container
Returns:
nothing


Member Data Documentation

GLfloat DrawableObject::color[4] [protected]
 

the color of the Drawable Object

GLfloat DrawableObject::currentColor[4] [protected]
 

the current color of the Drawable Object

int DrawableObject::id [protected]
 

The identification number of the Drawable Object.

int DrawableObject::index [protected]
 

The index of the Drawable object of the container it currently resides in.

Position* DrawableObject::thePosition [protected]
 

a pointer to the position of the drawable object

Reimplemented in DirTree, FileTree, and NickTree.


The documentation for this class was generated from the following files:
Generated on Sat Aug 28 10:33:24 2004 by doxygen 1.3.6