Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

GlutSphere Class Reference
[GLUT Master]

GLUT sphere scene-graph node. More...

#include <shape.h>

Inheritance diagram for GlutSphere:

Inheritance graph
[legend]
Collaboration diagram for GlutSphere:

Collaboration graph
[legend]
List of all members.

Public Methods

 GlutSphere (const bool solid=true, const GLdouble radius=1.0, const GLint slices=15, const GLint stacks=15)
 Constructor.

 ~GlutSphere ()
 Destructor.

virtual void draw () const
 Derived classes should supply this.

virtual GLdouble volume () const
 Get the volume of the shape.

virtual bool inside (const Vector &pos) const
 Inside/Outside test.

virtual void boundingBox (BoundingBox &box) const
 Get an axis aligned bounding box, unavailable by default.

virtual bool povrayExport (std::ostream &os) const
 Export to POV format.

void position (const Vector &pos, const double radius)
 Position the sphere.

GLdouble & radius ()
 Sphere radius.

GLint & slices ()
 Sphere slices around the equator.

GLint & stacks ()
 Sphere stacks from pole to pole.

const GLdouble & radius () const
 Sphere radius.

const GLint & slices () const
 Sphere slices around the equator.

const GLint & stacks () const
 Sphere stacks from pole to pole.


Detailed Description

GLUT sphere scene-graph node.

Note:
See GltShape for further information

Definition at line 45 of file shape.h.


Constructor & Destructor Documentation

GlutSphere::GlutSphere const bool    solid = true,
const GLdouble    radius = 1.0,
const GLint    slices = 15,
const GLint    stacks = 15
 

Constructor.

Parameters:
solid  Display as solid or wireframe
radius  Radius of sphere
slices  Number of slices around the equator
stacks  Number of stacks from pole to pole

Definition at line 23 of file shape.cpp.


Member Function Documentation

void GlutSphere::position const Vector   pos,
const double    radius
 

Position the sphere.

Parameters:
pos  Position of sphere center
radius  Radius of sphere

Definition at line 99 of file shape.cpp.

References matrixTranslate(), radius(), and GltShape::transformation().


The documentation for this class was generated from the following files:
Generated on Tue Nov 5 11:11:48 2002 for GLT by doxygen1.2.18