torque Torque Game Engine Documentation
TGE Version 1.5.2

TSThread Class Reference

#include <tsShapeInstance.h>


Detailed Description

3space animation thread.

An animation thread: runtime data associated with a single sequence that is running (or two sequences if in transition between them).

A shape instance can have multiple threads running. When multiple threads are running, which thread/sequence controls which node or object is determined based on priority of the sequence.

Note:
all thread data and methods are private (but TSShapeInstance is a friend). Users should treat thread pointers like keys -- they are used to ID the thread when interfacing with the shape, but are not manipulated by anything but the TSShapeInstance. See "Thread control" methods for more info on controlling threads.


Public Member Functions

S32 operator< (const TSThread &) const

Private Member Functions

void selectKeyframes (F32 pos, const TSSequence *seq, S32 *k1, S32 *k2, F32 *kpos)
 given a position on the thread, choose correct keyframes slight difference between one-shot and cyclic sequences -- see comments below for details
void getGround (F32 p, MatrixF *pMat)
void setSequence (S32 seq, F32 pos)
void transitionToSequence (S32 seq, F32 pos, F32 duration, bool continuePlay)
void advanceTime (F32 delta)
void advancePos (F32 delta)
F32 getTime () const
void setTime (F32 time)
F32 getPos () const
void setPos (F32 pos)
bool isInTransition () const
F32 getTimeScale () const
void setTimeScale (F32 ts)
F32 getDuration () const
F32 getScaledDuration () const
S32 getKeyframeCount () const
S32 getKeyframeNumber () const
void setKeyframeNumber (S32 kf)
 TSThread (TSShapeInstance *)
 TSThread ()
Triggers
Triggers are used to do something once a certain animation point has been reached.

For example, when the player's foot animation hits the ground, a foot puff and foot print are triggered from the thread.

These are called by advancePos()

void animateTriggers ()
void activateTriggers (F32 a, F32 b)

Private Attributes

S32 priority
TSShapeInstancemShapeInstance
 Instance of the shape that this thread animates.
const TSSequence * sequence
 Sequence this thread will perform.
F32 pos
F32 timeScale
 How fast to play through the sequence.
S32 keyNum1
 Keyframe at or before current position.
S32 keyNum2
 Keyframe at or after current position.
F32 keyPos
bool blendDisabled
 Blend with other sequences?
TSThread::TransitionData transitionData
 if in transition...
struct {
   F32   start
   F32   end
   S32   loop
path
bool makePath

Friends

class TSShapeInstance

Data Structures

struct  TransitionData
 if in transition... More...


Constructor & Destructor Documentation

TSThread::TSThread ( TSShapeInstance  )  [private]

TSThread::TSThread (  )  [inline, private]


Member Function Documentation

void TSThread::selectKeyframes ( F32  pos,
const TSSequence *  seq,
S32 k1,
S32 k2,
F32 kpos 
) [private]

given a position on the thread, choose correct keyframes slight difference between one-shot and cyclic sequences -- see comments below for details

void TSThread::getGround ( F32  p,
MatrixF pMat 
) [private]

void TSThread::animateTriggers (  )  [private]

void TSThread::activateTriggers ( F32  a,
F32  b 
) [private]

void TSThread::setSequence ( S32  seq,
F32  pos 
) [private]

void TSThread::transitionToSequence ( S32  seq,
F32  pos,
F32  duration,
bool  continuePlay 
) [private]

void TSThread::advanceTime ( F32  delta  )  [inline, private]

void TSThread::advancePos ( F32  delta  )  [private]

F32 TSThread::getTime (  )  const [inline, private]

void TSThread::setTime ( F32  time  )  [inline, private]

F32 TSThread::getPos (  )  const [inline, private]

void TSThread::setPos ( F32  pos  )  [inline, private]

bool TSThread::isInTransition (  )  const [inline, private]

F32 TSThread::getTimeScale (  )  const [inline, private]

void TSThread::setTimeScale ( F32  ts  )  [inline, private]

F32 TSThread::getDuration (  )  const [inline, private]

F32 TSThread::getScaledDuration (  )  const [inline, private]

S32 TSThread::getKeyframeCount (  )  const [inline, private]

S32 TSThread::getKeyframeNumber (  )  const [inline, private]

void TSThread::setKeyframeNumber ( S32  kf  )  [private]

S32 TSThread::operator< ( const TSThread  )  const


Friends And Related Function Documentation

friend class TSShapeInstance [friend]


Field Documentation

Instance of the shape that this thread animates.

const TSSequence* TSThread::sequence [private]

Sequence this thread will perform.

F32 TSThread::pos [private]

How fast to play through the sequence.

Keyframe at or before current position.

Keyframe at or after current position.

F32 TSThread::keyPos [private]

bool TSThread::blendDisabled [private]

Blend with other sequences?

if in transition...

struct { ... } TSThread::path [private]

bool TSThread::makePath [private]




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen