proj home

Files   Classes   Functions   Hierarchy  

myaxes Class Reference

Draw axes at the origin. More...

#include <graphmisc.h>

Inheritance diagram for myaxes:
Collaboration diagram for myaxes:

List of all members.

Public Member Functions

 myaxes (doublec length_)
 Straight line axes.
void draw ()
 Draw the object.

Public Attributes

point3< float > xaxiscolor
 The color in the x-axis.
point3< float > yaxiscolor
 The color in the y-axis.
point3< float > zaxiscolor
 The color in the z-axis.
double length
 The length of each axis.


Detailed Description

Draw axes at the origin.

Definition at line 215 of file graphmisc.h.


Constructor & Destructor Documentation

myaxes::myaxes ( doublec  length_  ) 

Straight line axes.

Definition at line 59 of file graphmisc.cpp.

References xaxiscolor, yaxiscolor, and zaxiscolor.

00060   : length(_length)
00061 {
00062   xaxiscolor=point3<float>(1.0,0.0,0.0);
00063   yaxiscolor=point3<float>(0.0,1.0,0.0);
00064   zaxiscolor=point3<float>(0.0,0.0,1.0);
00065 }


Member Function Documentation

void myaxes::draw (  )  [virtual]

Draw the object.

Implements gobj.

Definition at line 67 of file graphmisc.cpp.

References GOBJDEBUGCODE, length, xaxiscolor, yaxiscolor, and zaxiscolor.

00068 {
00069   GOBJDEBUGCODE
00070   myLightingTurnOff temp;
00071 
00072   glBegin(GL_LINES);
00073    
00074   glColor3T<GLfloat>()(xaxiscolor);
00075   glVertex3f(0.0,0.0,0.0);
00076   glVertex3f(length,0.0,0.0);
00077 
00078   glColor3T<GLfloat>()(yaxiscolor);
00079   glVertex3f(0.0,0.0,0.0);
00080   glVertex3f(0.0,length,0.0);
00081   
00082   glColor3T<GLfloat>()(zaxiscolor);
00083   glVertex3f(0.0,0.0,0.0);
00084   glVertex3f(0.0,0.0,length);
00085 
00086   glEnd();
00087 }


Member Data Documentation

The length of each axis.

Definition at line 227 of file graphmisc.h.

Referenced by draw().

The color in the x-axis.

Definition at line 220 of file graphmisc.h.

Referenced by draw(), and myaxes().

The color in the y-axis.

Definition at line 222 of file graphmisc.h.

Referenced by draw(), and myaxes().

The color in the z-axis.

Definition at line 224 of file graphmisc.h.

Referenced by draw(), and myaxes().


The documentation for this class was generated from the following files:

Generated on Fri Mar 4 00:50:07 2011 for Chelton Evans Source by  doxygen 1.5.8