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

GlutCube Class Reference
[GLUT Master]

GLUT sphere scene-graph node. More...

#include <shape.h>

Inheritance diagram for GlutCube:

Inheritance graph
[legend]
Collaboration diagram for GlutCube:

Collaboration graph
[legend]
List of all members.

Public Methods

 GlutCube (const bool solid=true, const GLdouble size=2.0)
 Constructor.

 GlutCube (const bool solid,const Vector &min, const Vector &max)
 Constructor.

 ~GlutCube ()
 Destructor.

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

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

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 &min, const Vector &max)
 Position the box.

void position (const Vector &pos, const real width, const real height, const real depth)
 Position the box.

GLdouble & size ()
 Box width, height and depth.

const GLdouble & size () const
 Box width, height and depth.


Detailed Description

GLUT sphere scene-graph node.

Note:
See GltShape for further information

Definition at line 111 of file shape.h.


Constructor & Destructor Documentation

GlutCube::GlutCube const bool    solid = true,
const GLdouble    size = 2.0
 

Constructor.

Parameters:
solid  Display as solid or wireframe
size  Width, height and depth of box

Definition at line 189 of file shape.cpp.

GlutCube::GlutCube const bool    solid,
const Vector   min,
const Vector   max
 

Constructor.

Parameters:
solid  Display as solid or wireframe
min  Near bottom left corner of box
max  Far top right corner of box

Definition at line 194 of file shape.cpp.

References position().


Member Function Documentation

void GlutCube::position const Vector   min,
const Vector   max
 

Position the box.

Parameters:
min  Near bottom left corner of box
max  Far top right corner of box

Definition at line 266 of file shape.cpp.

References Vector::abs(), matrixScale(), matrixTranslate(), size(), and GltShape::transformation().

Referenced by GlutCube().

void GlutCube::position const Vector   pos,
const real    width,
const real    height,
const real    depth
 

Position the box.

Parameters:
pos  Near bottom left corner of box
width  Width of box in x
height  Height of box in y
depth  Depth of box in z

Definition at line 278 of file shape.cpp.

References Vector::abs(), matrixScale(), matrixTranslate(), real, size(), and GltShape::transformation().


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