Torus Class Reference

A simple torus. More...

#include <Torus.h>

Inheritance diagram for Torus:

RawObject List of all members.

Public Member Functions

 Torus (double inner_radius, double outer_radius, int n_sides, int n_rings)
 ~Torus ()
void Draw ()
double GetBoundingRadius ()
BoundingBox GetBoundingBox ()

Private Member Functions

 Torus ()

Private Attributes

double inner_radius
double outer_radius
int n_sides
int n_rings

Detailed Description

A simple torus.

A simple torus that uses GLUT to draw itself.

Definition at line 17 of file Torus.h.


Constructor & Destructor Documentation

Torus::Torus double  inner_radius,
double  outer_radius,
int  n_sides,
int  n_rings
 

Constuctor: Brings the object into a consistent state.

Parameters:
inner_radius The inner radius of the torus.
outer_radius The outer radius of the torus.
n_sides The number of sides per ring.
n_rings The number of rings that make up the torus.

Definition at line 5 of file Torus.cpp.

Torus::~Torus  ) 
 

Destructor.

Definition at line 13 of file Torus.cpp.

Torus::Torus  )  [private]
 

Hide the default constructor.


Member Function Documentation

void Torus::Draw  )  [virtual]
 

Implementation of the Draw routine. Draws a torus using GLUT.

Reimplemented from RawObject.

Definition at line 18 of file Torus.cpp.

BoundingBox Torus::GetBoundingBox  )  [virtual]
 

Implementation of the GetBoundingBox routine.

Reimplemented from RawObject.

Definition at line 50 of file Torus.cpp.

double Torus::GetBoundingRadius  )  [virtual]
 

Implementation of the GetBoundingRadius routine.

Reimplemented from RawObject.

Definition at line 45 of file Torus.cpp.


Member Data Documentation

double Torus::inner_radius [private]
 

Internally stores the inner_radius.

Definition at line 55 of file Torus.h.

int Torus::n_rings [private]
 

Internally stores the number of rings.

Definition at line 64 of file Torus.h.

int Torus::n_sides [private]
 

Internally stores the number of sides.

Definition at line 61 of file Torus.h.

double Torus::outer_radius [private]
 

Internally stores the outer_radius.

Definition at line 58 of file Torus.h.


Generated on Sun Jul 2 13:20:41 2006 for Demo by  doxygen 1.4.6-NO