TSShapeInstance Class Reference

#include <tsShapeInstance.h>

List of all members.


Detailed Description

An instance of a 3space shape.

Introduction

A 3space model represents a significant amount of data. There are multiple meshes, skeleton information, as well as animation data. Some of this, like the skeletal transforms, are unique for each instance of the model (as different instances are likely to be in different states of animation), while most of it, like texturing information and vertex data, is the same amongst all instances of the shape.

To keep this data from being replicated for every instance of a 3shape object, Torque uses the ResManager to instantiate and track TSShape objects. TSShape handles reading and writing 3space models, as well as keeping track of static model data, as discussed above. TSShapeInstance keeps track of all instance specific data, such as the currently playing sequences or the active node transforms.

TSShapeInstance contains all the functionality for 3space models, while TSShape acts as a repository for common data.

What Does TSShapeInstance Do?

TSShapeInstance handles several areas of functionality:
  • Collision.
  • Rendering.
  • Animation.
  • Updating skeletal transforms.
  • Ballooning (see setShapeBalloon() and getShapeBalloon())

For an excellent example of how to render a TSShape in game, see TSStatic. For examples of how to procedurally animate models, look at Player::updateLookAnimation().


Public Types

 MaskNodeRotation = 0x01
 MaskNodePosX = 0x02
 MaskNodePosY = 0x04
 MaskNodePosZ = 0x08
 MaskNodeBlend = 0x10
 MaskNodeAll = MaskNodeRotation|MaskNodePosX|MaskNodePosY|MaskNodePosZ|MaskNodeBlend
 MaskNodeAllButBlend = MaskNodeRotation|MaskNodePosX|MaskNodePosY|MaskNodePosZ
 MaskNodeAllButRotation = MaskNodePosX|MaskNodePosY|MaskNodePosZ|MaskNodeBlend
 MaskNodeAllButPosX = MaskNodeRotation|MaskNodePosY|MaskNodePosZ|MaskNodeBlend
 MaskNodeAllButPosY = MaskNodeRotation|MaskNodePosX|MaskNodePosZ|MaskNodeBlend
 MaskNodeAllButPosZ = MaskNodeRotation|MaskNodePosX|MaskNodePosY|MaskNodeBlend
 MaskNodeHandsOff = 0x20
 meaning, don't even set to default, programmer controls it (blend still applies)
 MaskNodeCallback = 0x40
 meaning, get local transform via callback function (see setCallback) callback data2 is node index, callback return value is pointer to local transform Note: won't get this callback everytime you animate.
 TransformDirty = BIT(0)
 VisDirty = BIT(1)
 FrameDirty = BIT(2)
 MatFrameDirty = BIT(3)
 DecalDirty = BIT(4)
 IflDirty = BIT(5)
 ThreadDirty = BIT(6)
 AllDirtyMask = TransformDirty | VisDirty | FrameDirty | MatFrameDirty | DecalDirty | IflDirty | ThreadDirty
enum  {
  MaskNodeRotation = 0x01,
  MaskNodePosX = 0x02,
  MaskNodePosY = 0x04,
  MaskNodePosZ = 0x08,
  MaskNodeBlend = 0x10,
  MaskNodeAll = MaskNodeRotation|MaskNodePosX|MaskNodePosY|MaskNodePosZ|MaskNodeBlend,
  MaskNodeAllButBlend = MaskNodeRotation|MaskNodePosX|MaskNodePosY|MaskNodePosZ,
  MaskNodeAllButRotation = MaskNodePosX|MaskNodePosY|MaskNodePosZ|MaskNodeBlend,
  MaskNodeAllButPosX = MaskNodeRotation|MaskNodePosY|MaskNodePosZ|MaskNodeBlend,
  MaskNodeAllButPosY = MaskNodeRotation|MaskNodePosX|MaskNodePosZ|MaskNodeBlend,
  MaskNodeAllButPosZ = MaskNodeRotation|MaskNodePosX|MaskNodePosY|MaskNodeBlend,
  MaskNodeHandsOff = 0x20,
  MaskNodeCallback = 0x40
}
enum  {
  TransformDirty = BIT(0),
  VisDirty = BIT(1),
  FrameDirty = BIT(2),
  MatFrameDirty = BIT(3),
  DecalDirty = BIT(4),
  IflDirty = BIT(5),
  ThreadDirty = BIT(6),
  AllDirtyMask = TransformDirty | VisDirty | FrameDirty | MatFrameDirty | DecalDirty | IflDirty | ThreadDirty
}

Public Member Functions

TSShapegetShape ()
TSMaterialListgetMaterialList ()
void setMaterialList (TSMaterialList *)
 we won't own the material list unless we clone it (see below)
void cloneMaterialList ()
 call this to own the material list -- i.e., we'll make a copy of the currently set material list and be responsible for deleting it.
void initMaterialList ()
bool ownMaterialList () const
void reSkin (NetStringHandle &newBaseHandle)
virtual void render (const Point3F *objectScale=NULL)
virtual void render (S32 dl, F32 intraDL=0.0f, const Point3F *objectScale=NULL)
GBitmapsnapshot (U32 width, U32 height, bool mipmap, MatrixF &cameraMatrix, bool hiQuality)
GBitmapsnapshot (U32 width, U32 height, bool mip, MatrixF &cameraPos, S32 dl, F32 intraDL, bool hiQuality)
GBitmapsnapshot_softblend (U32 width, U32 height, bool mip, MatrixF &cameraMatrix, bool hiQuality)
void animate ()
void animate (S32 dl)
void animateNodes (S32 ss)
void animateVisibility (S32 ss)
void animateFrame (S32 ss)
void animateMatFrame (S32 ss)
void animateIfls ()
void animateSubtrees (bool forceFull=true)
void animateNodeSubtrees (bool forceFull=true)
bool hasTranslucency ()
bool hasSolid ()
bool inTransition ()
U32 getNumDetails ()
S32 getCurrentDetail ()
F32 getCurrentIntraDetail ()
void setCurrentDetail (S32 dl, F32 intraDL=1.0f)
S32 selectCurrentDetail (F32 pixelSize)
S32 selectCurrentDetail (F32 dist, F32 invScale)
S32 selectCurrentDetail (bool ignoreScale=false)
 fancy detail selection -- uses screen error
S32 selectCurrentDetailEx (bool ignoreScale=false)
S32 selectCurrentDetailEx (F32 errorTOL)
void setDirty (U32 dirty)
void clearDirty (U32 dirty)
bool buildPolyList (AbstractPolyList *, S32 dl)
bool getFeatures (const MatrixF &mat, const Point3F &n, ConvexFeature *, S32 dl)
bool castRay (const Point3F &start, const Point3F &end, RayInfo *, S32 dl)
bool quickLOS (const Point3F &start, const Point3F &end, S32 dl)
Point3F support (const Point3F &v, S32 dl)
void computeBounds (S32 dl, Box3F &bounds)
 uses current transforms to compute bounding box around a detail level see like named method on shape if you want to use default transforms
 TSShapeInstance (const Resource< TSShape > &shape, bool loadMaterials=true)
 TSShapeInstance (TSShape *pShape, bool loadMaterials=true)
 ~TSShapeInstance ()
void buildInstanceData (TSShape *, bool loadMaterials)
void dump (Stream &)
void dumpNode (Stream &, S32 level, S32 nodeIndex, Vector< S32 > &detailSizes)
void prepCollision ()
Statics
set non-rendering static variables used for accessing shape data

void setStatics (S32 dl=0, F32 interDL=0.0f, const Point3F *shapeScale=NULL)
void clearStatics ()
Node Masking
set node masking...

void setNodeAnimationState (S32 nodeIndex, U32 animationState, TSCallback *callback=NULL)
U32 getNodeAnimationState (S32 nodeIndex)
Trigger states
check trigger value

bool getTriggerState (U32 stateNum, bool clearState=true)
void setTriggerState (U32 stateNum, bool on)
void setTriggerStateBit (U32 stateBit, bool on)
Debris Management
void incDebrisRefCount ()
void decDebrisRefCount ()
U32 getDebrisRefCount ()
AlphaAlways
AlphaAlways allows the entire model to become translucent at the same value

void setAlphaAlways (F32 value)
F32 getAlphaAlwaysValue ()
bool getAlphaAlways ()
Animation Scale
Query about animated scale

bool animatesScale ()
bool animatesUniformScale ()
bool animatesAlignedScale ()
bool animatesArbitraryScale ()
bool scaleCurrentlyAnimated ()
Ground Transforms
The animator of a model can make the bounding box animate along with the object. Doing so will move the object with the bounding box. The ground transform turns the world bounding box into the post-animation bounding box when such a technique is used. However, few models actually use this technique.

void animateGround ()
 clears previous ground transform
MatrixFgetGroundTransform ()
void deltaGround (TSThread *, F32 start, F32 end, MatrixF *mat=NULL)
void deltaGround1 (TSThread *, F32 start, F32 end, MatrixF &mat)
Thread Control
Threads! In order to animate an object, first you need to have an animation in the object. Then, you need to get the TSShape of the object:
   /// TSShape* shape = mShapeInstance->getShape());
   /// 
Next, get the sequence and store::
   /// S32 seq = shape->findSequence("foo"));
   /// 
Create a new thread (if needed):
   /// TSThread* thread = mShapeInstance->addThread();
   /// 
Finally, set the position in the sequence:
   /// mShapeInstance->setSequence(thread, seq, 0)
   /// 


TSThreadaddThread ()
 Create a new thread.
TSThreadgetThread (S32 threadNumber)
void destroyThread (TSThread *thread)
 Destroy a thread!
U32 threadCount ()
 How many threads are there?
void setSequence (TSThread *, S32 seq, F32 pos)
 Get the thread a sequence.
void transitionToSequence (TSThread *, S32 seq, F32 pos, F32 duration, bool continuePlay)
 Transition to a sequence.
void clearTransition (TSThread *)
 Stop transitions.
U32 getSequence (TSThread *)
 Get the sequence of the thread.
void setBlendEnabled (TSThread *, bool blendOn)
 Set whether or not the thread will blend.
bool getBlendEnabled (TSThread *)
 Does this thread blend?
F32 getTime (TSThread *thread)
 Get how long the thread has been playing.
F32 getPos (TSThread *thread)
 Get the position in the thread.
void setTime (TSThread *thread, F32 time)
 Set how long into the thread to use.
void setPos (TSThread *thread, F32 pos)
 Set the position of the thread.
bool isInTransition (TSThread *thread)
 Is this thread in transition?
F32 getTimeScale (TSThread *thread)
 Get the time scale of the thread.
void setTimeScale (TSThread *thread, F32)
 Set the time scale of the thread.
F32 getDuration (TSThread *thread)
 Get the duration of the thread.
F32 getScaledDuration (TSThread *thread)
 Get the duration of the thread with the scale factored in.
S32 getKeyframeCount (TSThread *thread)
 Get the number of keyframes.
S32 getKeyframeNumber (TSThread *thread)
 Get which keyframe the thread is on.
void setKeyframeNumber (TSThread *thread, S32 kf)
 Set which keyframe the thread is on.
void advanceTime (F32 delta, TSThread *)
 advance time on a particular thread
void advanceTime (F32 delta)
 advance time on all threads
void advancePos (F32 delta, TSThread *)
 advance pos on a particular thread
void advancePos (F32 delta)
 advance pos on all threads

Static Public Member Functions

static void init ()
static void destroy ()
static GBitmapsnapshot (TSShape *, U32 width, U32 height, bool mipmap, MatrixF &cameraMatrix, S32 dl, F32 intraDL=0.0f, bool hiQuality=false)

Public Attributes

bool shadowDirty
Vector< MeshObjectInstancemMeshObjects
Vector< IflMaterialInstancemIflMaterialInstances
Vector< MatrixFmNodeTransforms
 storage space for node transforms
U32mDirtyFlags
voidmData
 available for use by app...initialized to 0
Reference Transform Vectors
unused until first transition

Vector< Quat16mNodeReferenceRotations
Vector< Point3FmNodeReferenceTranslations
Vector< F32mNodeReferenceUniformScales
Vector< Point3FmNodeReferenceScaleFactors
Vector< Quat16mNodeReferenceArbitraryScaleRots

Static Public Attributes

static RenderData smRenderData
static S32 smMaxSnapshotScale
 when taking hiQuality snapshot, scale intermediate bitmaps up to this amount
static F32 smDetailAdjust
 scale pixel size by this amount when selecting detail levels
static F32 smScreenError
 a different error metrix used by newer shapes (screen error from hi detail)
static bool smFogExemptionOn
static S32 smNumSkipRenderDetails
 never choose detail level number below this value (except if only way to get a visible detail)
Workspace for Node Transforms
static Vector< QuatFsmNodeCurrentRotations
static Vector< Point3FsmNodeCurrentTranslations
static Vector< F32smNodeCurrentUniformScales
static Vector< Point3FsmNodeCurrentAlignedScales
static Vector< TSScalesmNodeCurrentArbitraryScales
Threads
keep track of who controls what on currently animating shape

static Vector< TSThread * > smRotationThreads
static Vector< TSThread * > smTranslationThreads
static Vector< TSThread * > smScaleThreads

Protected Member Functions

bool initGround ()
void addPath (TSThread *gt, F32 start, F32 end, MatrixF *mat=NULL)

Protected Attributes

bool mScaleCurrentlyAnimated
S32 mCurrentDetailLevel
F32 mCurrentIntraDetailLevel
 0-1, how far along from current to next (higher) detail level.
Resource< TSShapehShape
TSShapemShape
TSMaterialListmMaterialList
 by default, points to hShape material list
bool mOwnMaterialList
 Does this own the material list pointer?
bool mAlphaAlways
F32 mAlphaAlwaysValue
U32 debrisRefCount
Vector< TSThread * > mThreadList
Vector< TSThread * > mTransitionThreads
TSIntegerSet mMaskRotationNodes
 keep track of nodes with animation restrictions put on them
TSIntegerSet mMaskPosXNodes
TSIntegerSet mMaskPosYNodes
TSIntegerSet mMaskPosZNodes
TSIntegerSet mDisableBlendNodes
TSIntegerSet mHandsOffNodes
 Nodes that aren't animated through threads automatically.
TSIntegerSet mCallbackNodes
Vector< TSCallbackRecordmNodeCallbacks
U32 mTriggerStates
 state variables
Ground Transform Data
MatrixF mGroundTransform
TSThreadmGroundThread
Transition nodes
keep track of nodes that are involved in a transition

Note:
this only tracks nodes we're transitioning from... nodes we're transitioning to are implicitly handled (i.e., we don't need to keep track of them)


TSIntegerSet mTransitionRotationNodes
TSIntegerSet mTransitionTranslationNodes
TSIntegerSet mTransitionScaleNodes

Private Member Functions

void setupStateBlocks ()
Private animation methods
These are private methods for setting up and affecting animation

void updateTransitions ()
void handleDefaultScale (S32 a, S32 b, TSIntegerSet &scaleBeenSet)
void handleTransitionNodes (S32 a, S32 b)
void handleNodeScale (S32 a, S32 b)
void handleAnimatedScale (TSThread *, S32 a, S32 b, TSIntegerSet &)
void handleMaskedPositionNode (TSThread *, S32 nodeIndex, S32 offset)
void handleBlendSequence (TSThread *, S32 a, S32 b)
void checkScaleCurrentlyAnimated ()

Private Attributes

GFXStateBlockRef mSnapshotSB

Friends

class TSThread
class TSLastDetail
class TSPartInstance

Classes

struct  IflMaterialInstance
 IFL objects ... controlled by animation but also can be controlled by user. More...
struct  MeshObjectInstance
 These are set up by default based on shape data. More...
struct  ObjectInstance
 Base class for all renderable objects, including mesh objects and decal objects. More...
struct  RenderData
struct  TSCallbackRecord


Member Enumeration Documentation

anonymous enum

Enumerator:
MaskNodeRotation 
MaskNodePosX 
MaskNodePosY 
MaskNodePosZ 
MaskNodeBlend 
MaskNodeAll 
MaskNodeAllButBlend 
MaskNodeAllButRotation 
MaskNodeAllButPosX 
MaskNodeAllButPosY 
MaskNodeAllButPosZ 
MaskNodeHandsOff  meaning, don't even set to default, programmer controls it (blend still applies)
MaskNodeCallback  meaning, get local transform via callback function (see setCallback) callback data2 is node index, callback return value is pointer to local transform Note: won't get this callback everytime you animate.

..application responsibility to make sure matrix pointer continues to point to valid and updated local transform

anonymous enum

Enumerator:
TransformDirty 
VisDirty 
FrameDirty 
MatFrameDirty 
DecalDirty 
IflDirty 
ThreadDirty 
AllDirtyMask 


Constructor & Destructor Documentation

TSShapeInstance::TSShapeInstance ( const Resource< TSShape > &  shape,
bool  loadMaterials = true 
)

TSShapeInstance::TSShapeInstance ( TSShape pShape,
bool  loadMaterials = true 
)

TSShapeInstance::~TSShapeInstance (  ) 


Member Function Documentation

static void TSShapeInstance::init (  )  [static]

static void TSShapeInstance::destroy (  )  [static]

bool TSShapeInstance::initGround (  )  [protected]

void TSShapeInstance::addPath ( TSThread gt,
F32  start,
F32  end,
MatrixF mat = NULL 
) [protected]

TSShape* TSShapeInstance::getShape (  )  [inline]

void TSShapeInstance::setStatics ( S32  dl = 0,
F32  interDL = 0.0f,
const Point3F shapeScale = NULL 
)

void TSShapeInstance::clearStatics (  ) 

TSMaterialList* TSShapeInstance::getMaterialList (  )  [inline]

void TSShapeInstance::setMaterialList ( TSMaterialList  ) 

we won't own the material list unless we clone it (see below)

void TSShapeInstance::cloneMaterialList (  ) 

call this to own the material list -- i.e., we'll make a copy of the currently set material list and be responsible for deleting it.

..if we don't own the list, then the application better not delete the set list out from under us (all this is handled automatically when using the shape's original list).

void TSShapeInstance::initMaterialList (  ) 

bool TSShapeInstance::ownMaterialList (  )  const [inline]

void TSShapeInstance::reSkin ( NetStringHandle newBaseHandle  ) 

void TSShapeInstance::setNodeAnimationState ( S32  nodeIndex,
U32  animationState,
TSCallback callback = NULL 
)

U32 TSShapeInstance::getNodeAnimationState ( S32  nodeIndex  ) 

bool TSShapeInstance::getTriggerState ( U32  stateNum,
bool  clearState = true 
)

void TSShapeInstance::setTriggerState ( U32  stateNum,
bool  on 
)

void TSShapeInstance::setTriggerStateBit ( U32  stateBit,
bool  on 
)

void TSShapeInstance::incDebrisRefCount (  ) 

void TSShapeInstance::decDebrisRefCount (  ) 

U32 TSShapeInstance::getDebrisRefCount (  ) 

void TSShapeInstance::setAlphaAlways ( F32  value  )  [inline]

F32 TSShapeInstance::getAlphaAlwaysValue (  )  [inline]

bool TSShapeInstance::getAlphaAlways (  )  [inline]

void TSShapeInstance::setupStateBlocks (  )  [private]

void TSShapeInstance::updateTransitions (  )  [private]

void TSShapeInstance::handleDefaultScale ( S32  a,
S32  b,
TSIntegerSet scaleBeenSet 
) [private]

void TSShapeInstance::handleTransitionNodes ( S32  a,
S32  b 
) [private]

void TSShapeInstance::handleNodeScale ( S32  a,
S32  b 
) [private]

void TSShapeInstance::handleAnimatedScale ( TSThread ,
S32  a,
S32  b,
TSIntegerSet  
) [private]

void TSShapeInstance::handleMaskedPositionNode ( TSThread ,
S32  nodeIndex,
S32  offset 
) [private]

void TSShapeInstance::handleBlendSequence ( TSThread ,
S32  a,
S32  b 
) [private]

void TSShapeInstance::checkScaleCurrentlyAnimated (  )  [private]

virtual void TSShapeInstance::render ( const Point3F objectScale = NULL  )  [virtual]

virtual void TSShapeInstance::render ( S32  dl,
F32  intraDL = 0.0f,
const Point3F objectScale = NULL 
) [virtual]

GBitmap* TSShapeInstance::snapshot ( U32  width,
U32  height,
bool  mipmap,
MatrixF cameraMatrix,
bool  hiQuality 
)

GBitmap* TSShapeInstance::snapshot ( U32  width,
U32  height,
bool  mip,
MatrixF cameraPos,
S32  dl,
F32  intraDL,
bool  hiQuality 
)

static GBitmap* TSShapeInstance::snapshot ( TSShape ,
U32  width,
U32  height,
bool  mipmap,
MatrixF cameraMatrix,
S32  dl,
F32  intraDL = 0.0f,
bool  hiQuality = false 
) [static]

GBitmap* TSShapeInstance::snapshot_softblend ( U32  width,
U32  height,
bool  mip,
MatrixF cameraMatrix,
bool  hiQuality 
)

void TSShapeInstance::animate (  ) 

void TSShapeInstance::animate ( S32  dl  ) 

void TSShapeInstance::animateNodes ( S32  ss  ) 

void TSShapeInstance::animateVisibility ( S32  ss  ) 

void TSShapeInstance::animateFrame ( S32  ss  ) 

void TSShapeInstance::animateMatFrame ( S32  ss  ) 

void TSShapeInstance::animateIfls (  ) 

void TSShapeInstance::animateSubtrees ( bool  forceFull = true  ) 

void TSShapeInstance::animateNodeSubtrees ( bool  forceFull = true  ) 

bool TSShapeInstance::hasTranslucency (  ) 

bool TSShapeInstance::hasSolid (  ) 

bool TSShapeInstance::animatesScale (  )  [inline]

bool TSShapeInstance::animatesUniformScale (  )  [inline]

bool TSShapeInstance::animatesAlignedScale (  )  [inline]

bool TSShapeInstance::animatesArbitraryScale (  )  [inline]

bool TSShapeInstance::scaleCurrentlyAnimated (  )  [inline]

bool TSShapeInstance::inTransition (  )  [inline]

void TSShapeInstance::animateGround (  ) 

clears previous ground transform

MatrixF& TSShapeInstance::getGroundTransform (  )  [inline]

void TSShapeInstance::deltaGround ( TSThread ,
F32  start,
F32  end,
MatrixF mat = NULL 
)

void TSShapeInstance::deltaGround1 ( TSThread ,
F32  start,
F32  end,
MatrixF mat 
)

U32 TSShapeInstance::getNumDetails (  ) 

S32 TSShapeInstance::getCurrentDetail (  ) 

F32 TSShapeInstance::getCurrentIntraDetail (  ) 

void TSShapeInstance::setCurrentDetail ( S32  dl,
F32  intraDL = 1.0f 
)

S32 TSShapeInstance::selectCurrentDetail ( F32  pixelSize  ) 

S32 TSShapeInstance::selectCurrentDetail ( F32  dist,
F32  invScale 
)

S32 TSShapeInstance::selectCurrentDetail ( bool  ignoreScale = false  ) 

fancy detail selection -- uses screen error

S32 TSShapeInstance::selectCurrentDetailEx ( bool  ignoreScale = false  ) 

S32 TSShapeInstance::selectCurrentDetailEx ( F32  errorTOL  ) 

void TSShapeInstance::setDirty ( U32  dirty  ) 

void TSShapeInstance::clearDirty ( U32  dirty  ) 

bool TSShapeInstance::buildPolyList ( AbstractPolyList ,
S32  dl 
)

bool TSShapeInstance::getFeatures ( const MatrixF mat,
const Point3F n,
ConvexFeature ,
S32  dl 
)

bool TSShapeInstance::castRay ( const Point3F start,
const Point3F end,
RayInfo ,
S32  dl 
)

bool TSShapeInstance::quickLOS ( const Point3F start,
const Point3F end,
S32  dl 
) [inline]

Point3F TSShapeInstance::support ( const Point3F v,
S32  dl 
)

void TSShapeInstance::computeBounds ( S32  dl,
Box3F bounds 
)

uses current transforms to compute bounding box around a detail level see like named method on shape if you want to use default transforms

TSThread* TSShapeInstance::addThread (  ) 

Create a new thread.

TSThread* TSShapeInstance::getThread ( S32  threadNumber  ) 

Note:
threads can change order, best to hold onto a thread from the start

void TSShapeInstance::destroyThread ( TSThread thread  ) 

Destroy a thread!

U32 TSShapeInstance::threadCount (  ) 

How many threads are there?

void TSShapeInstance::setSequence ( TSThread ,
S32  seq,
F32  pos 
)

Get the thread a sequence.

void TSShapeInstance::transitionToSequence ( TSThread ,
S32  seq,
F32  pos,
F32  duration,
bool  continuePlay 
)

Transition to a sequence.

void TSShapeInstance::clearTransition ( TSThread  ) 

Stop transitions.

U32 TSShapeInstance::getSequence ( TSThread  ) 

Get the sequence of the thread.

void TSShapeInstance::setBlendEnabled ( TSThread ,
bool  blendOn 
)

Set whether or not the thread will blend.

bool TSShapeInstance::getBlendEnabled ( TSThread  ) 

Does this thread blend?

F32 TSShapeInstance::getTime ( TSThread thread  ) 

Get how long the thread has been playing.

F32 TSShapeInstance::getPos ( TSThread thread  ) 

Get the position in the thread.

void TSShapeInstance::setTime ( TSThread thread,
F32  time 
)

Set how long into the thread to use.

void TSShapeInstance::setPos ( TSThread thread,
F32  pos 
)

Set the position of the thread.

bool TSShapeInstance::isInTransition ( TSThread thread  ) 

Is this thread in transition?

F32 TSShapeInstance::getTimeScale ( TSThread thread  ) 

Get the time scale of the thread.

void TSShapeInstance::setTimeScale ( TSThread thread,
F32   
)

Set the time scale of the thread.

F32 TSShapeInstance::getDuration ( TSThread thread  ) 

Get the duration of the thread.

F32 TSShapeInstance::getScaledDuration ( TSThread thread  ) 

Get the duration of the thread with the scale factored in.

S32 TSShapeInstance::getKeyframeCount ( TSThread thread  ) 

Get the number of keyframes.

S32 TSShapeInstance::getKeyframeNumber ( TSThread thread  ) 

Get which keyframe the thread is on.

void TSShapeInstance::setKeyframeNumber ( TSThread thread,
S32  kf 
)

Set which keyframe the thread is on.

void TSShapeInstance::advanceTime ( F32  delta,
TSThread  
)

advance time on a particular thread

void TSShapeInstance::advanceTime ( F32  delta  ) 

advance time on all threads

void TSShapeInstance::advancePos ( F32  delta,
TSThread  
)

advance pos on a particular thread

void TSShapeInstance::advancePos ( F32  delta  ) 

advance pos on all threads

void TSShapeInstance::buildInstanceData ( TSShape ,
bool  loadMaterials 
)

void TSShapeInstance::dump ( Stream  ) 

void TSShapeInstance::dumpNode ( Stream ,
S32  level,
S32  nodeIndex,
Vector< S32 > &  detailSizes 
)

void TSShapeInstance::prepCollision (  ) 


Friends And Related Function Documentation

friend class TSThread [friend]

friend class TSLastDetail [friend]

friend class TSPartInstance [friend]


Member Data Documentation

storage space for node transforms

0-1, how far along from current to next (higher) detail level.

..

0=at this dl, 1=at higher detail level, where higher means bigger size on screen for dl=0, we use twice detail level 0's size as the size of the "next" dl

by default, points to hShape material list

Does this own the material list pointer?

keep track of nodes with animation restrictions put on them

Nodes that aren't animated through threads automatically.

state variables

when taking hiQuality snapshot, scale intermediate bitmaps up to this amount

scale pixel size by this amount when selecting detail levels

a different error metrix used by newer shapes (screen error from hi detail)

never choose detail level number below this value (except if only way to get a visible detail)

available for use by app...initialized to 0