Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

vuGrid Class Reference

This class models a grid. More...

#include <vuGrid.h>

Collaboration diagram for vuGrid:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuGrid ()
 Default constructor.
 vuGrid (const vuGrid &v)
 Copy contructor.
 vuGrid (float width, float height, float depth)
 Constructor taking in member info.
 vuGrid (float width, float height, float depth, bool isGrid)
 Constructor taking in member info.
 ~vuGrid ()
 The destructor.
vuGridoperator= (const vuGrid &v)
 The assignment operator.
void enable ()
 Enables grid.
void disable ()
 Disables grid.
void toggle ()
 Toggles grid enable.
float getWidth () const
float getHeight () const
float getDepth () const
bool getStatus () const
float getCenterX () const
float getCenterY () const
float getCenterZ () const
bool operator== (const vuGrid &v) const
 Equality comparison.
bool operator!= (const vuGrid &v) const
 Inequality comparison.
void drawLine (vuVector &start, vuVector &end) const
void labelAxes () const
 Labels the x, y, z axes.
void drawAxes () const
 Draws the x, y, z axes.
void drawInOpenGL () const
 Draws the object in OpenGL.

Private Attributes

float xWidth
float yHeight
float zDepth
bool isDrawGrid

Friends

ostream & operator<< (ostream &out, const vuGrid &t)
 Redefines the << (insertion) operator.

Detailed Description

This class models a grid.

Definition at line 67 of file vuGrid.h.


Constructor & Destructor Documentation

vuGrid::vuGrid  ) 
 

Default constructor.

Definition at line 23 of file vuGrid.cpp.

vuGrid::vuGrid const vuGrid v  ) 
 

Copy contructor.

Definition at line 30 of file vuGrid.cpp.

vuGrid::vuGrid float  width,
float  height,
float  depth
 

Constructor taking in member info.

Definition at line 38 of file vuGrid.cpp.

vuGrid::vuGrid float  width,
float  height,
float  depth,
bool  isGrid
 

Constructor taking in member info.

Definition at line 45 of file vuGrid.cpp.

vuGrid::~vuGrid  ) 
 

The destructor.

Definition at line 52 of file vuGrid.cpp.


Member Function Documentation

void vuGrid::disable  ) 
 

Disables grid.

Definition at line 76 of file vuGrid.cpp.

References isDrawGrid.

void vuGrid::drawAxes  )  const
 

Draws the x, y, z axes.

Definition at line 228 of file vuGrid.cpp.

References drawLine(), GL_LINES, glBegin(), glEnd(), xWidth, yHeight, and zDepth.

Referenced by drawInOpenGL().

Here is the call graph for this function:

void vuGrid::drawInOpenGL  )  const
 

Draws the object in OpenGL.

Note that the proper GL initialization function calls must be made before this function is called. For some tutorials on programming with OpenGL, visit nehe.gamedev.net.

Definition at line 249 of file vuGrid.cpp.

References drawAxes(), and labelAxes().

Referenced by vu111211a::render().

Here is the call graph for this function:

void vuGrid::drawLine vuVector start,
vuVector end
const
 

Definition at line 162 of file vuGrid.cpp.

References vuVector::getData(), glColor4f(), and glVertex3fv().

Referenced by drawAxes(), and labelAxes().

Here is the call graph for this function:

void vuGrid::enable  ) 
 

Enables grid.

Definition at line 83 of file vuGrid.cpp.

References isDrawGrid.

float vuGrid::getCenterX  )  const
 

Definition at line 127 of file vuGrid.cpp.

References xWidth.

float vuGrid::getCenterY  )  const
 

Definition at line 134 of file vuGrid.cpp.

References yHeight.

float vuGrid::getCenterZ  )  const
 

Definition at line 140 of file vuGrid.cpp.

References zDepth.

float vuGrid::getDepth  )  const
 

Definition at line 113 of file vuGrid.cpp.

float vuGrid::getHeight  )  const
 

Definition at line 106 of file vuGrid.cpp.

bool vuGrid::getStatus  )  const
 

Definition at line 120 of file vuGrid.cpp.

float vuGrid::getWidth  )  const
 

Definition at line 99 of file vuGrid.cpp.

void vuGrid::labelAxes  )  const
 

Labels the x, y, z axes.

Definition at line 176 of file vuGrid.cpp.

References drawLine(), GL_LINES, glBegin(), glEnd(), xWidth, and yHeight.

Referenced by drawInOpenGL().

Here is the call graph for this function:

bool vuGrid::operator!= const vuGrid v  )  const
 

Inequality comparison.

Definition at line 155 of file vuGrid.cpp.

References operator==().

Here is the call graph for this function:

vuGrid & vuGrid::operator= const vuGrid v  ) 
 

The assignment operator.

Definition at line 60 of file vuGrid.cpp.

References isDrawGrid, xWidth, yHeight, and zDepth.

bool vuGrid::operator== const vuGrid v  )  const
 

Equality comparison.

Definition at line 146 of file vuGrid.cpp.

References xWidth, yHeight, and zDepth.

Referenced by operator!=().

void vuGrid::toggle  ) 
 

Toggles grid enable.

Definition at line 90 of file vuGrid.cpp.

References isDrawGrid.


Friends And Related Function Documentation

ostream& operator<< ostream &  out,
const vuGrid t
[friend]
 

Redefines the << (insertion) operator.

Definition at line 264 of file vuGrid.cpp.


Member Data Documentation

bool vuGrid::isDrawGrid [private]
 

Definition at line 99 of file vuGrid.h.

Referenced by disable(), enable(), operator<<(), operator=(), and toggle().

float vuGrid::xWidth [private]
 

Definition at line 78 of file vuGrid.h.

Referenced by drawAxes(), getCenterX(), labelAxes(), operator<<(), operator=(), and operator==().

float vuGrid::yHeight [private]
 

Definition at line 85 of file vuGrid.h.

Referenced by drawAxes(), getCenterY(), labelAxes(), operator<<(), operator=(), and operator==().

float vuGrid::zDepth [private]
 

Definition at line 92 of file vuGrid.h.

Referenced by drawAxes(), getCenterZ(), operator<<(), operator=(), and operator==().


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:21:16 2004 for vuVolume by  doxygen 1.3.9.1