Logo Search packages:      
Sourcecode: 3depict version File versions  Download package

DrawCylinder Class Reference

#include <drawables.h>

Inheritance diagram for DrawCylinder:

DrawableObj

List of all members.


Detailed Description

A tapered cylinder drawing class.

Definition at line 351 of file drawables.h.


Public Member Functions

DrawableObjclone () const
 Clone object.
Point3DdirectionPtr ()
 Get the direction pointer.
void draw () const
 Draw the clyinder.
 DrawCylinder ()
 Constructor.
void getBoundingBox (BoundCube &b) const
 Get the bounding box that encapuslates this object.
void lockRadii (bool doLock=true)
 Lock (or unlock) the radius to the start radius (i.e. synch the two).
Point3DoriginPtr ()
 Get the origin poitner.
float * radiusPtr ()
 Get radius pointer (radii must be locked).
void setActive (bool active)
 Set the active state of the object.
void setColour (float r, float g, float b, float a)
 Set the color of the cylinder.
void setDirection (const Point3D &pt)
 Set the orientation of cylinder.
void setInteract (bool canAct)
 Set if user can interact with object, needed for opengl hit testing.
void setLength (float len)
 Set the length of cylinder.
void setOrigin (const Point3D &pt)
 Set the location of the base of the cylinder.
void setRadius (float val)
 Set end radius.
void setSlices (unsigned int i)
 Number of cuts perpendicular to axis - ie disks.
void setStacks (unsigned int i)
 Number of cuts along axis - ie segments.
virtual ~DrawCylinder ()
 Destructor.

Public Attributes

bool canSelect
 Can be selected from openGL viewport interactively?
bool wantsLight
 Wants lighting calculations active during render?

Protected Attributes

float a
bool active
 Is the drawable active?
float b
Point3D direction
float g
float length
 Length of the cylinder.
Point3D origin
 Origin of base and direction of cylinder.
GLUquadricObj * q
 Pointer to quadric, required for glu. Note the caps are defined as well.
GLUquadricObj * qCap [2]
float r
 Colours for cylinder.
bool radiiLocked
 Do we lock the drawing to only use the first radius?
float radius
 Cylinder start and end radii.
unsigned int slices
 number of sectors (pie slices)
unsigned int stacks
 number of vertical slices (should be 1 if endradius equals start radius

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

Generated by  Doxygen 1.6.0   Back to index