TSThread Class Reference

#include <tsShapeInstance.h>

List of all members.


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

TSShapeInstancegetShapeInstance ()
S32 getSequence ()
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)
 TSThread (TSShapeInstance *)
 TSThread ()
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 ()
F32 getPos ()
void setTime (F32)
void setPos (F32)
bool isInTransition ()
F32 getTimeScale ()
void setTimeScale (F32)
F32 getDuration ()
F32 getScaledDuration ()
S32 getKeyframeCount ()
S32 getKeyframeNumber ()
void setKeyframeNumber (S32 kf)
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

Classes

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  )  [private]

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

F32 TSThread::getTime (  )  [private]

F32 TSThread::getPos (  )  [private]

void TSThread::setTime ( F32   )  [private]

void TSThread::setPos ( F32   )  [private]

bool TSThread::isInTransition (  )  [private]

F32 TSThread::getTimeScale (  )  [private]

void TSThread::setTimeScale ( F32   )  [private]

F32 TSThread::getDuration (  )  [private]

F32 TSThread::getScaledDuration (  )  [private]

S32 TSThread::getKeyframeCount (  )  [private]

S32 TSThread::getKeyframeNumber (  )  [private]

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

TSShapeInstance* TSThread::getShapeInstance (  )  [inline]

S32 TSThread::getSequence (  )  [inline]

S32 TSThread::operator< ( const TSThread  )  const


Friends And Related Function Documentation

friend class TSShapeInstance [friend]


Member Data 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]

Blend with other sequences?

if in transition...

F32 TSThread::start [private]

F32 TSThread::end [private]

S32 TSThread::loop [private]

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