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

ModelPuppet Class Reference

Puppet that displays models. More...

#include <puppet.h>

Inheritance diagram for ModelPuppet::

Puppet List of all members.

Public Methods

 ModelPuppet (vpmVPM *vpmPuppetInfo, ssfPuppet *ssfPuppetInfo, VPM *vpmFileInfo)
 XML File-based constructor. More...

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

void NodeControlFunc (HOBJECT hObj, HMODELNODE hNode, LTMatrix *pGlobalMat)
 (LithTech specific) Node controller for puppet. More...

uint16 PuppetType (void)
 Returns a code identifying the type of puppet. More...

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


Detailed Description

Puppet that displays models.

ModelPuppet requires knowledge of a model and texture file to function, but once provided with that, it can display and manipulate any model in the engine through Node and Property joints.


Constructor & Destructor Documentation

ModelPuppet::ModelPuppet vpmVPM *    vpmPuppetInfo,
ssfPuppet *    ssfPuppetInfo,
VPM *    vpmFileInfo
 

XML File-based constructor.

Parameters:
vpmPuppetInfo  an XML parse file from the .vpm detailing a specific puppet.
ssfPuppetInfo  an XML parse file from the .ssf detailing a specific puppet.
vpmFileInfo  an XML parse file from the .vpm detailing an entire file.
This constructor creates a puppet according to the parse files provided by the stage.


Member Function Documentation

void ModelPuppet::KeyframeAnimation uint16    anim [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 from Puppet.

void ModelPuppet::NodeControlFunc HOBJECT    hObj,
HMODELNODE    hNode,
LTMatrix *    pGlobalMat
 

(LithTech specific) Node controller for puppet.

Parameters:
hObj  a LithTech object on whom this is acting.
hNode  an integer denoting the skeletal node this operation is transforming.
pGlobalMat  a LTMatrix that represents the eventual transformation.
This function, specific to LithTech only, is called every frame on every node with the appropriate HMODELNODE value, and must alter pGlobalMat to transform the coordinates of the node. This function is called from the actual function passed to the LithTech engine for these purposes, PuppetNodeControlFunc(). It then checks all the joints to see if they affect that node, and runs the ActOnJoint() function for those that do.

uint16 ModelPuppet::PuppetType void    [virtual]
 

Returns a code identifying the type of puppet.

Returns:
the puppet code
For ModelPuppet, PuppetType returns MODELPUPPET_NUM.

Reimplemented from Puppet.

void ModelPuppet::UpdateTick void    [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 from Puppet.


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