Public Member Functions

glut::Renderable Class Reference

rendering interface -- anything that wants to draw has to implement this interface! More...

#include <renderable.h>

Inheritance diagram for glut::Renderable:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~Renderable (void) throw ()
virtual void render (IN const render_context_t &rc, IN RenderQueue *rq)=0
 this method is called to actually draw the object.
virtual rect3d_t getBoundingBox (void) const =0 throw ()
 here the object must provide a bounding box.
virtual bool isAnimateable (void) const throw ()
 does this object support animations? Default answer is false.
virtual void getAnimationState (OUT std::string &state)
 the object must provide current animation state.
virtual bool setAnimationState (IN const char *state)
 the object should update its animation state.
virtual void getAnimationVerbs (OUT VecString &verbs)
 the object should return the full list of animation verbs it supports.
virtual bool setAnimation (IN const char *verb)
 please update animations based on requested verb.

Detailed Description

rendering interface -- anything that wants to draw has to implement this interface!

Definition at line 123 of file renderable.h.


Constructor & Destructor Documentation

glut::Renderable::~Renderable ( void   )  throw () [virtual]

Definition at line 39 of file renderable.cpp.


Member Function Documentation

virtual void glut::Renderable::render ( IN const render_context_t rc,
IN RenderQueue rq 
) [pure virtual]

this method is called to actually draw the object.

The object can assume that all necessary transforms (translation, rotation, scaling, etc.) have already been applied. There is no default implementation since this method is the whole point of the interface!

Implemented in glut::model_t, and glut::lod_model_t.

virtual rect3d_t glut::Renderable::getBoundingBox ( void   )  const throw () [pure virtual]

here the object must provide a bounding box.

This is a bounding box in model-relative coordinates, not world coordinates. So this bounding box does not depend on where the model is positioned or how it is rotated, for instance. There is no default implementation since an accurate bounding box is critical for performance when rendering.

Implemented in glut::model_t, and glut::lod_model_t.

bool glut::Renderable::isAnimateable ( void   )  const throw () [virtual]

does this object support animations? Default answer is false.

(random aside: did you know "animateable" is not a word?)

Definition at line 168 of file renderable.cpp.

void glut::Renderable::getAnimationState ( OUT std::string &  state  )  [virtual]

the object must provide current animation state.

Default implementation returns empty state string.

Definition at line 181 of file renderable.cpp.

bool glut::Renderable::setAnimationState ( IN const char *  state  )  [virtual]

the object should update its animation state.

Returns false if the object doesn't understand the provided state. Default implementation returns false.

Definition at line 192 of file renderable.cpp.

void glut::Renderable::getAnimationVerbs ( OUT VecString &  verbs  )  [virtual]

the object should return the full list of animation verbs it supports.

The default implementation returns an empty list.

Definition at line 205 of file renderable.cpp.

bool glut::Renderable::setAnimation ( IN const char *  verb  )  [virtual]

please update animations based on requested verb.

Returns false if verb is not supported. Default implementation returns false.

Definition at line 216 of file renderable.cpp.


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