Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

TheStage Class Reference

A collection of puppets, and a distributor of action. More...

#include <theStage.h>

List of all members.

Public Methods

 TheStage (void)
 Empty constructor. More...

 TheStage (string &filename)
 XML-file-based constructor. More...

RESULT_TYPE DestroyPuppet (uint16 whichOne)
 Destroys a puppet. More...

void DisperseAction (uint16 object, uint16 joint, float value)
 Passes along an action to a puppet. More...

void DisperseKeyframeAnimation (uint16 object, uint16 animation)
 Passes along an animation command to a puppet. More...

PuppetPtr GetPuppet (uint16 object)
 Gets a puppet. More...

void UpdateTick (void)
 Executed every frame for real-time update purposes. More...


Detailed Description

A collection of puppets, and a distributor of action.

The Stage exists to both collect the puppets into a single place, and also to distribute actions and animations to its Virpets.


Constructor & Destructor Documentation

TheStage::TheStage void   
 

Empty constructor.

This constructor just initializes a stage with zero puppets, but still allocates the necessary pointer memory.

TheStage::TheStage string &    filename
 

XML-file-based constructor.

Parameters:
filename, the  path to the appropriate .ssf file.
This constructor reads in a scene file (*.ssf) and creates and arranges puppets according to the descriptions contained therein. It makes repeated calls to the Puppet XML constructor.


Member Function Documentation

RESULT_TYPE TheStage::DestroyPuppet uint16    whichOne
 

Destroys a puppet.

Parameters:
whichOne, an  integer that denotes the puppet to destroy.
Returns:
an error code reporting whether the operation met with success or not.
Destroy puppet first looks to see if there's a puppet in the slot able to be eliminated, then deletes it, decrements the numPuppets variable, and replaces the empty slot with the last puppet. (Note: This screws with our current "The puppet's position in the array is also its object id" scheme. A puppet id field will have to be implemented, and with it, an appropriate hash table.

void TheStage::DisperseAction uint16    object,
uint16    joint,
float    value
 

Passes along an action to a puppet.

Parameters:
object, the  puppet to call.
joint, the  joint of the puppet in question.
value, a  float denoting the new value, between -100 and 100, inclusive.
This simply verifies the existance of the correct puppet, then passes along the value change to it.

void TheStage::DisperseKeyframeAnimation uint16    object,
uint16    animation
 

Passes along an animation command to a puppet.

Parameters:
object, the  puppet to call.
animation, an  integer denoting the animation to activate.
This simply verifies the existance of the correct puppet, then passes along the animation request to it.

PuppetPtr TheStage::GetPuppet uint16    object
 

Gets a puppet.

Parameters:
object, the  puppet to recall.
Returns:
a PuppetPtr containing the requested puppet.
If the developer needs access to a puppet for his own nefarious purposes, he can simply call this function and use the returned pointer outside the stage.

void TheStage::UpdateTick void   
 

Executed every frame for real-time update purposes.

Since the Stage has very little upkeeping to do itself, this function at the moment just farms UpdateTick calls out to all it's puppets.


The documentation for this class was generated from the following file:
Generated on Tue Oct 16 13:42:11 2001 for The Stage by doxygen1.2.11 written by Dimitri van Heesch, © 1997-2001