vrj::GlDrawConeWandFunctor Class Reference

Draw a basic cone wand. More...

#include <vrj/Draw/OGL/GlDrawWandFunctors.h>

Inheritance diagram for vrj::GlDrawConeWandFunctor:

Inheritance graph
[legend]
Collaboration diagram for vrj::GlDrawConeWandFunctor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GlDrawConeWandFunctor ()
virtual ~GlDrawConeWandFunctor ()
virtual void contextInit ()
 Called to initialize any context specific information.
virtual void draw (vrj::User *user)
 Callback function for drawing.

Protected Attributes

GLUquadricObj * mQuadObj

Detailed Description

Draw a basic cone wand.

Definition at line 57 of file GlDrawWandFunctors.h.


Constructor & Destructor Documentation

vrj::GlDrawConeWandFunctor::GlDrawConeWandFunctor (  ) 

Definition at line 47 of file GlDrawWandFunctors.cpp.

00048    : mQuadObj(gluNewQuadric())
00049 {
00050 }

vrj::GlDrawConeWandFunctor::~GlDrawConeWandFunctor (  )  [virtual]

Definition at line 52 of file GlDrawWandFunctors.cpp.

References mQuadObj.

00053 {
00054    if ( NULL != mQuadObj )
00055    {
00056       gluDeleteQuadric(mQuadObj);
00057       mQuadObj = NULL;
00058    }
00059 }


Member Function Documentation

virtual void vrj::GlDrawConeWandFunctor::contextInit (  )  [inline, virtual]

Called to initialize any context specific information.

Implements vrj::GlDrawObjectFunctor.

Definition at line 65 of file GlDrawWandFunctors.h.

00066    {;}

void vrj::GlDrawConeWandFunctor::draw ( vrj::User user  )  [virtual]

Callback function for drawing.

Called when the object should be drawn.

Precondition:
GL context is set and ready to go.

Implements vrj::GlDrawObjectFunctor.

Definition at line 61 of file GlDrawWandFunctors.cpp.

References mQuadObj.

00062 {
00063    boost::ignore_unused_variable_warning(user);
00064 
00065    const float base = 0.2f;
00066    const float height = 0.6f;
00067    const int slices = 6;
00068    const int stacks = 1;
00069 
00070    glColor3f(0.0f, 1.0f, 0.0f);
00071    gluQuadricDrawStyle(mQuadObj, (GLenum) GLU_FILL);
00072    gluQuadricNormals(mQuadObj, (GLenum) GLU_SMOOTH);
00073    gluCylinder(mQuadObj, base, 0.0, height, slices, stacks);
00074 }


Member Data Documentation

GLUquadricObj* vrj::GlDrawConeWandFunctor::mQuadObj [protected]

Definition at line 75 of file GlDrawWandFunctors.h.

Referenced by draw(), and ~GlDrawConeWandFunctor().


The documentation for this class was generated from the following files:
Generated on Thu Jan 4 10:58:16 2007 for VR Juggler by  doxygen 1.5.1