RawObject Class Reference

The base of all objects that get displayed on screen. More...

#include <RawObject.h>

Inheritance diagram for RawObject:

ComposedObject Cube Icosahedron SimpleArrow Teapot TexturedCube Torus VertexArrayObject List of all members.

Public Member Functions

 RawObject ()
 ~RawObject ()
virtual void Draw ()
virtual double GetBoundingRadius ()
virtual BoundingBox GetBoundingBox ()
void SetColor (float red, float green, float blue, float alpha)
void SetEmission (float red, float green, float blue, float alpha)

Protected Attributes

float color [4]
float emission [4]

Detailed Description

The base of all objects that get displayed on screen.

A RawObject defines the appearance of an object and contains all its geometric data. The object itself no knowledge about its position and orientation, this information is contained within the GraphicalObjects to which RawObjects get tied to.

Definition at line 20 of file RawObject.h.


Constructor & Destructor Documentation

RawObject::RawObject  ) 
 

Constructor: Initializes its members to some default values.

Definition at line 3 of file RawObject.cpp.

RawObject::~RawObject  ) 
 

Destructor.

Definition at line 16 of file RawObject.cpp.


Member Function Documentation

virtual void RawObject::Draw  )  [virtual]
 

Draws the object. This routine has to be implemented by the descendants of this class.

Reimplemented in ComposedObject, Cube, TexturedCube, Icosahedron, SimpleArrow, Teapot, Torus, and VertexArrayObject.

virtual BoundingBox RawObject::GetBoundingBox  )  [virtual]
 

Returns the bounding box of the object. This routine has to be implemented by the descendants of this class.

Returns:
The bounding box of this object.

Reimplemented in Cube, TexturedCube, Icosahedron, SimpleArrow, Teapot, Torus, Torus2, and VertexArrayObject.

virtual double RawObject::GetBoundingRadius  )  [virtual]
 

Returns the bounding radius of the object. This routine has to be implemented by the descendants of this class.

Returns:
The bounding radius of this object.

Reimplemented in Cube, TexturedCube, Icosahedron, SimpleArrow, Teapot, Torus, Torus2, and VertexArrayObject.

void RawObject::SetColor float  red,
float  green,
float  blue,
float  alpha
 

Set the color of the the object. There is, however, no guarantee that an object will be displayed with that color, because the descendants have full responsibility over the appearance of an object.

Parameters:
red Red part of the material color.
green Green part of the material color.
blue Blue part of the material color.
alpha Alpha value of the material color.

Definition at line 21 of file RawObject.cpp.

void RawObject::SetEmission float  red,
float  green,
float  blue,
float  alpha
 

Set the emission color of the object. There is, however, no guarantee that an object will be displayed with that color, because the descendants have full responsibility over the appearance of an object.

Parameters:
red Red part of the emission color.
green Green part of the emission color.
blue Blue part of the emission color.
alpha Alpha part of the emission color.

Definition at line 29 of file RawObject.cpp.


Member Data Documentation

float RawObject::color[4] [protected]
 

Internally stores the color of the object.

Definition at line 76 of file RawObject.h.

float RawObject::emission[4] [protected]
 

Internally stores the color of the light emitted by this object.

Definition at line 79 of file RawObject.h.


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