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

puppet.h File Reference

The header file that describes all classes descended from Puppet, and their function. More...

#include "ssf.h"
#include "vpm.h"
#include "engineAbstract.h"
#include "joint.h"

Go to the source code of this file.

Compounds

class  LightPuppet
 Puppet type for a light. More...

class  ModelPuppet
 Puppet that displays models. More...

class  PSystemPuppet
 Puppet that controls a dynamic particle system. More...

class  Puppet
 The central repository for virpet informaiton. More...


Defines

#define ACTION_MAX   64
 Maximum joints in a puppet. More...

#define PUPPET_NUM   0x0001
 ID code for type Puppet. More...

#define MODELPUPPET_NUM   0x0002
 ID code for type ModelPuppet. More...

#define LIGHTPUPPET_NUM   0x0004
 ID code for type LightPuppet. More...

#define PSYSTEMPUPPET_NUM   0x0008
 ID code for type PSystemPuppet. More...

#define PUPPET_NULL   -101
 Returned if no puppet. More...

#define PUPPET_ALREADY_EXISTS   -102
 Returned if a puppet already exists. More...

#define NO_ACTION   -103
 Returned if no action. More...


Typedefs

typedef PuppetPuppetPtr
 Pointer to the Puppet class.


Functions

void PuppetNodeControlFunc (HOBJECT hObj, HMODELNODE hNode, LTMatrix *pGlobalMat, void *pUserData)
 Gateway function that calls NodeControlFunc(). More...

void StringToActionType (char *the_string, uint16 &joint_type, uint16 &action_type)
void StringToObjectType (char *the_string, uint16 &object_type)
 Maps a string to an object type. More...


Detailed Description

The header file that describes all classes descended from Puppet, and their function.

Puppet.h contains definitions for many classes, all derived from Puppet itself. The puppet class is basically a nexus for all possible information there could be about a controllable character, both within the engine and without. Different kinds of in-engine objects have different Puppet classes associated with them, though care should be taken to make sure the classes aren't game-specific.


Define Documentation

#define ACTION_MAX   64
 

Maximum joints in a puppet.

This is used to give a reasonable size to the action pointer-array in each puppet; in future versions the maximum should be dynamic and flexible, but that'd require a rescalable-array class that doesn't use STL, for sanity's sake.

#define LIGHTPUPPET_NUM   0x0004
 

ID code for type LightPuppet.

A number that uniquely identifies the Light puppet class. Can be logially compounded with other puppet IDs.

#define MODELPUPPET_NUM   0x0002
 

ID code for type ModelPuppet.

A number that uniquely identifies the Model puppet class. Can be logically compounded with other puppet IDs.

#define NO_ACTION   -103
 

Returned if no action.

This error code gets returned when a needed action doesn't exist, or isn't of the needed/correct type. Also used for non-fatal NULL pointer errors.

#define PSYSTEMPUPPET_NUM   0x0008
 

ID code for type PSystemPuppet.

A number that uniquely identifies the PSystem puppet class. Can be logially compounded with other puppet IDs.

#define PUPPET_ALREADY_EXISTS   -102
 

Returned if a puppet already exists.

This error code gets returned when a puppet is already filling a needed space, and can't be overwritten.

#define PUPPET_NULL   -101
 

Returned if no puppet.

This error code gets returned when a needed puppet doesn't exist, or isn't of the needed/correct type. Also used for non-fatal NULL pointer errors.

#define PUPPET_NUM   0x0001
 

ID code for type Puppet.

A number that uniquely identifies the abstract puppet class. Can be logically compounded with other puppet IDs.


Function Documentation

void PuppetNodeControlFunc HOBJECT    hObj,
HMODELNODE    hNode,
LTMatrix *    pGlobalMat,
void *    pUserData
 

Gateway function that calls NodeControlFunc().

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.
pUserData  a pointer containing specialized data (the Puppet in question, in this case)
PuppetNodeControlFunc is passed to LithTech with the appropriate puppet at Puppet creation time, and uses the PuppetPtr (passed in as pUserData) to call NodeControlFunc(), which does all the actual node transformations.

void StringToObjectType char *    the_string,
uint16 &    object_type
 

Maps a string to an object type.

Parameters:
the_string  a char-pointer-style string that contains the text.
object_type  the variable into which the object kind is placed.
StringToObjectType compares the_string to a list of known (hard-coded) strings that correspond to various object types...it's basically a huge switch statement. There should be a file-based way of doing this, but it aint here now. Used in the process of parsing XML files in the building of puppets.


Generated on Tue Oct 16 13:42:10 2001 for The Stage by doxygen1.2.11 written by Dimitri van Heesch, © 1997-2001