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

Puppet Class Reference

The central repository for virpet informaiton. More...

#include <puppet.h>

Inheritance diagram for Puppet::

LightPuppet ModelPuppet PSystemPuppet List of all members.

Public Methods

 Puppet::Puppet (void)
 Puppet::~Puppet (void)
virtual void ActOnJoint (uint16 jointEntry, float value)
 Assigns to value to joint. More...

virtual RESULT_TYPE AddNodeJoint (uint16 actionArrayLoc, uint16 actionCode, uint16 actionNode, float valMax, float valMin, string &name, VECTOR_TYPE supplementalData)
 Adds a node joint. More...

virtual RESULT_TYPE AddParticleJoint (uint16 actionArrayLoc, PuppetProperty aP, VECTOR_TYPE vBegin, VECTOR_TYPE vEnd, string &n, VECTOR_TYPE sup)
 Adds a property joint. More...

virtual RESULT_TYPE AddPropertyJoint (uint16 actionArrayLoc, PuppetProperty aP, VECTOR_TYPE vBegin, VECTOR_TYPE vEnd, string &n, VECTOR_TYPE sup, HANDLE_TYPE pH)
 Adds a property joint. More...

virtual RESULT_TYPE DeleteJoint (uint16 actionArrayLoc)
 Deletes a joint. More...

void FillCommon (vpmVPM *vpmPuppetInfo, ssfPuppet *ssfPuppetInfo, VPM *vpmFileInfo, ObjectCreateStruct &createstruct)
 Fills in name, position, scale, and orientation of any puppet from files. More...

VECTOR_TYPE GetPosition (void)
 Gets position. More...

VECTOR_TYPE GetScale (void)
 Gets scale. More...

virtual void KeyframeAnimation (uint16 anim)=0
 Starts a keyframed animation. More...

RESULT_TYPE ModifyJoint (uint16 actionArrayLoc, JointPart part, float mVal)
 Modify abstract part of a joint. More...

RESULT_TYPE ModifyJoint (uint16 actionArrayLoc, JointPart part, string &mVal)
RESULT_TYPE ModifyJoint (uint16 actionArrayLoc, JointPart part, uint16 mVal)
RESULT_TYPE ModifyJoint (uint16 actionArrayLoc, JointPart part, VECTOR_TYPE mVal)
virtual uint16 PuppetType (void)
 Returns a code identifying the type of puppet. More...

void SetPosition (VECTOR_TYPE newPosition)
 Sets the puppet's position in world-space. More...

void SetScale (VECTOR_TYPE newScale)
 Sets the puppet's scale in world-space. More...

virtual void UpdateTick (void)=0
 Function that gets called on a puppet every update. More...


Public Attributes

HANDLE_TYPE myHandle
 In-engine handle to the object. More...


Protected Attributes

JointPtractionArray
 Array full of joints. More...

uint16 actionArrayMax
 Maximum number of joints for this puppet.

string modelName
 The name of the model. More...

VECTOR_TYPE position
 Position of puppet. More...

VECTOR_TYPE scale
 Scale of puppet. More...

VECTOR_TYPE orientation
 Orientation of puppet. More...


Detailed Description

The central repository for virpet informaiton.

Puppet stores all the meta-data connected to a single engine object with modifiable properties. No big surprises here.


Member Function Documentation

void Puppet::ActOnJoint uint16    jointEntry,
float    value
[virtual]
 

Assigns to value to joint.

Parameters:
jointEntry  an integer denoting which joint has to act.
value  a float between -100 and 100, inclusive.
ActOnJoint checks to make sure the specified joint exists, then passes on an appropriate request to the polymorphic joint function, SetValue.

RESULT_TYPE Puppet::AddNodeJoint uint16    actionArrayLoc,
uint16    actionCode,
uint16    actionNode,
float    valMax,
float    valMin,
string &    name,
VECTOR_TYPE    supplementalData
[virtual]
 

Adds a node joint.

Parameters:
actionArrayLoc  an integer specifying a slot in the puppet array.
actionCode  an integer corresponding to the proper action enum.
actionNode  an integer specificying the skeletal node this joint targets.
valMax  a float corresponding to one end of a range.
valMin  a float corresponding to the other end of a range.
name  the name of the new joint.
supplementalData, a  vector containing additional data.
Returns:
a result code indicating whether the operation met with success or not.
Manual way to add a NodeJoint to a given joint-slot on a puppet. The array location must be specified exactly in case the joint id's in an XML-constructor file are non-sequential.

RESULT_TYPE Puppet::AddParticleJoint uint16    actionArrayLoc,
PuppetProperty    aP,
VECTOR_TYPE    vBegin,
VECTOR_TYPE    vEnd,
string &    n,
VECTOR_TYPE    sup
[virtual]
 

Adds a property joint.

Parameters:
actionArrayLoc, an  integer specifying a slot in the puppet array.
aP  an enum specifying the property to modify.
vBegin  a vector denoting one end of a range.
vEnd  a vector denoting the other end of a range.
name  the name of the new joint.
supplementalData  a vector containing additional data.
Returns:
a result code indicating whether the operation met with success or not.
Manual way to add a PropertyJoint to a given joint-slot on a puppet. The array location must be specified exactly in case the joint id's in an XML-constructor file are non-sequential.

RESULT_TYPE Puppet::AddPropertyJoint uint16    actionArrayLoc,
PuppetProperty    aP,
VECTOR_TYPE    vBegin,
VECTOR_TYPE    vEnd,
string &    n,
VECTOR_TYPE    sup,
HANDLE_TYPE    pH
[virtual]
 

Adds a property joint.

Parameters:
actionArrayLoc, an  integer specifying a slot in the puppet array.
aP  an enum specifying the property to modify.
vBegin  a vector denoting one end of a range.
vEnd  a vector denoting the other end of a range.
name  the name of the new joint.
supplementalData  a vector containing additional data.
pH  a handle to the in-game object being affected.
Returns:
a result code indicating whether the operation met with success or not.
Manual way to add a PropertyJoint to a given joint-slot on a puppet. The array location must be specified exactly in case the joint id's in an XML-constructor file are non-sequential.

RESULT_TYPE Puppet::DeleteJoint uint16    actionArrayLoc [virtual]
 

Deletes a joint.

Parameters:
acitonArrayLoc  an integer specifying the joint to destroy.
Returns:
a result code indicating whether the operation met with success or not.
DeleteJoint checks to make sure the joint in question actualy exists, then calls it's destructor and cleans up the array when it's done.

void Puppet::FillCommon vpmVPM *    vpmPuppetInfo,
ssfPuppet *    ssfPuppetInfo,
VPM *    vpmFileInfo,
ObjectCreateStruct &    createstruct
 

Fills in name, position, scale, and orientation of any puppet from files.

For most the the puppet constructors, there's quite a bit of common information that has to be entered into an objectcreatestruct, and many fields contained within Puppet that have to be assigned. FillCommon takes some XML parse files and does the work of setting everything general in createstruct, aka everything but the "m_type", and sets any varialbes contained in Puppet to something sane.

VECTOR_TYPE Puppet::GetPosition void   
 

Gets position.

Returns:
a vector that is the object's position in worldspace.
Returns the position of the puppet in engine space.

VECTOR_TYPE Puppet::GetScale void   
 

Gets scale.

Returns:
a vector that is the object's scale in worldspace.
Returns the scale of the puppet in engine space.

void Puppet::KeyframeAnimation uint16    anim [pure virtual]
 

Starts a keyframed animation.

Parameters:
anim  an integer specifying the animation to start.
Calls the appropriate API function to start a keyframed animation, but only if the puppet is of type OT_MODEL. Future version should be able to select individual animation trackers and decide on the fly whether an animation should be looping or not.

Reimplemented in ModelPuppet, LightPuppet, and PSystemPuppet.

RESULT_TYPE Puppet::ModifyJoint uint16    actionArrayLoc,
JointPart    part,
VECTOR_TYPE    mVal
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
actionArrayLoc  an integer denoting the puppet to affect.
part  an enum that denotes the part to alter.
mVal  a vector containing the new value.
Returns:
a result code indicating whether the operation met with success or not.

RESULT_TYPE Puppet::ModifyJoint uint16    actionArrayLoc,
JointPart    part,
uint16    mVal
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
actionArrayLoc  an integer denoting the puppet to affect.
part  an enum that denotes the part to alter.
mVal  a uint16 containing the new value.
Returns:
a result code indicating whether the operation met with success or not.

RESULT_TYPE Puppet::ModifyJoint uint16    actionArrayLoc,
JointPart    part,
string &    mVal
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
actionArrayLoc  an integer denoting the puppet to affect.
part  an enum that denotes the part to alter.
mVal  a string containing the new value.
Returns:
a result code indicating whether the operation met with success or not.

RESULT_TYPE Puppet::ModifyJoint uint16    actionArrayLoc,
JointPart    part,
float    mVal
 

Modify abstract part of a joint.

Parameters:
actionArrayLoc  an integer denoting the puppet to affect.
part  an enum that denotes the part to alter.
mVal  a float containing the new value.
Returns:
a result code indicating whether the operation met with success or not.
Verfies the existance of the given joint, then passes along the pertinent modification data to Modify().

uint16 Puppet::PuppetType void    [virtual]
 

Returns a code identifying the type of puppet.

Returns:
the puppet code
For Puppet, PUPPET_NUM is returned.

Reimplemented in ModelPuppet, LightPuppet, and PSystemPuppet.

void Puppet::SetPosition VECTOR_TYPE    newPosition
 

Sets the puppet's position in world-space.

Parameters:
newPosition  the vector representing the new location.

void Puppet::SetScale VECTOR_TYPE    newScale
 

Sets the puppet's scale in world-space.

Parameters:
newScale  the vector representing the new scale.

void Puppet::UpdateTick void    [pure virtual]
 

Function that gets called on a puppet every update.

If a puppet requires maintenance or upkeep of some sort, changing data only when the Stage recieves a network packet from Kairaishi might not be sufficient. Every update tick, this function gets called to remedy that problem.

Reimplemented in ModelPuppet, LightPuppet, and PSystemPuppet.


Member Data Documentation

JointPtr Puppet::* Puppet::actionArray [protected]
 

Array full of joints.

A dynamically allocated array (just tacked onto the heap once, but could be made to shift in size with the number of joints) that holds all the joints of a puppet.

string Puppet::modelName [protected]
 

The name of the model.

This value isn't used in filo I/O at all, but rather for GUIs and human-readable analyses of puppets.

HANDLE_TYPE Puppet::myHandle
 

In-engine handle to the object.

In whatever engine we're working with, some notion of the in-engine version of the puppet must be maintained, so API calls don't require extraneous lookups or dependencies. This would be it.

VECTOR_TYPE Puppet::orientation [protected]
 

Orientation of puppet.

Vector representing the rotation of the puppet about the X, Y, and Z axes, in order. (So the orientation matrix would be creted by doing the X rotation first, then Y, then Z). This should probably be converted to a more convenient quaternion expression in the future.

VECTOR_TYPE Puppet::position [protected]
 

Position of puppet.

Vector representing the position of the puppet in the engine.

VECTOR_TYPE Puppet::scale [protected]
 

Scale of puppet.

Vector representing the scale of the puppet in the engine.


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