ViewObject Class Reference

Base class for all objects viewable on screen. More...

#include <ViewObject.h>

Inheritance diagram for ViewObject:

Object Object2d Object3d Button Console HudFood HudInventory HudMenu HudWater Label MouseCursor TextBlock Webcam Camera Mesh MVBoard MVPlace ParticleSystem PhongLight

List of all members.

Public Member Functions

 ViewObject ()
 Standard constructor.
 ViewObject (const ViewObject &source)
 Copy constructor.
const VectorgetPosition () const
 Getter for the position.
void setPosition (const Vector &vector)
 Setter for the position.
AnglegetPitch ()
 Getter for pitch.
void setPitch (const Angle &angle)
 Setter for pitch.
GLuint getSelectId ()
 Getter for selection Id.
void setSelectId (const GLuint &selectId)
 Setter for selection Id.
void selectColorGl ()
 Color for object picking mode.
virtual string toString () const
 Returns a textual representation.
virtual string className () const
 Returns the class name of the object.
virtual enum classId classId () const
 Returns the class id of the object.

Protected Attributes

Vector position
 The position of the object in 3-Space (Vertex).
Angle pitch
 The angle of the rotation around the z-axis.

Private Attributes

GLuint selectId
 Selection id for object picking.


Detailed Description

Base class for all objects viewable on screen.

Constructor & Destructor Documentation

ViewObject::ViewObject (  ) 

Standard constructor.

Standard Constructor assigns a unique selection mode id and initializes coordinates to zero.

ViewObject::ViewObject ( const ViewObject source  ) 

Copy constructor.


Member Function Documentation

const Vector & ViewObject::getPosition (  )  const

Getter for the position.

Getter for the position

Returns:
The Position of the object

void ViewObject::setPosition ( const Vector vector  ) 

Setter for the position.

The resulting vector is a vertex (not a vector)

Parameters:
The new position of the object

Angle & ViewObject::getPitch (  ) 

Getter for pitch.

Getter for the angle pitch

Returns:
The angle pitch of the object

void ViewObject::setPitch ( const Angle angle  ) 

Setter for pitch.

Setter for pitch

Parameters:
angle The value of pitch

GLuint ViewObject::getSelectId (  ) 

Getter for selection Id.

This id should not be changed once it is given to an object and should always remain unique

Returns:
The id that is assigned to this object in selection mode

void ViewObject::setSelectId ( const GLuint &  selectId  ) 

Setter for selection Id.

The id should not be changed once it is given to an object and should always remain unique. So kep away from that if you don't know what you're doin'!

Parameters:
selectId The id that shall be assigned to this object in selection mode

void ViewObject::selectColorGl (  ) 

Color for object picking mode.

Calls glColor() with the unique color designed to identify this object.

string ViewObject::toString (  )  const [virtual]

Returns a textual representation.

Returns:
a string descriping the run-time object

Reimplemented from Object.

Reimplemented in Button, Camera, Console, FpsCounter, HudFood, HudInventory, HudMenu, HudScore, HudWater, IdPicker, Label, Mesh, MouseCursor, MVPlace, Object2d, Object3d, OrbitCamera, ParticleSystem, PhongLight, SplashMessage, StartUpTimer, TextBlock, and Webcam.

string ViewObject::className (  )  const [virtual]

Returns the class name of the object.

Returns:
a string with the name of the object's class

Reimplemented from Object.

Reimplemented in Button, Camera, Console, FpsCounter, HudFood, HudInventory, HudMenu, HudScore, HudWater, IdPicker, Label, Mesh, MouseCursor, MVPlace, Object2d, Object3d, OrbitCamera, ParticleSystem, PhongLight, SplashMessage, StartUpTimer, TextBlock, and Webcam.

enum classId ViewObject::classId (  )  const [virtual]

Returns the class id of the object.

Returns:
an id of the object's class

Reimplemented from Object.

Reimplemented in Button, Camera, Console, FpsCounter, HudFood, HudInventory, HudMenu, HudScore, HudWater, IdPicker, Label, Mesh, MouseCursor, MVPlace, Object2d, Object3d, OrbitCamera, ParticleSystem, PhongLight, SplashMessage, StartUpTimer, TextBlock, and Webcam.


Member Data Documentation

GLuint ViewObject::selectId [private]

Selection id for object picking.

The position of the object in 3-Space (Vertex).

Angle ViewObject::pitch [protected]

The angle of the rotation around the z-axis.


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

Generated on Mon Jul 7 13:30:35 2008 for Firefly by  doxygen 1.5.6