torque Torque Game Engine Documentation
TGE Version 1.5.2

TSShapeInstance Class Reference

#include <tsShapeInstance.h>


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:

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().


Callback Functions

typedef void(*) CallbackFunction (TSShapeInstance *, MatrixF *, S32 node, U32 data)
CallbackFunction mCallback
U32 mCallbackData
void setCallback (CallbackFunction cb, U32 data1)

Public Types

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  {
  NO_ENVIRONMENT_MAP,
  ENVIRONMENT_MAP_MULTI_1,
  ENVIRONMENT_MAP_MULTI_3,
  ENVIRONMENT_MAP_TWO_PASS,
  NO_DETAIL_MAP,
  DETAIL_MAP_MULTI_1,
  DETAIL_MAP_MULTI_2,
  DETAIL_MAP_TWO_PASS,
  NO_FOG,
  FOG_MULTI_1,
  FOG_MULTI_1_TEXGEN,
  FOG_TWO_PASS,
  FOG_TWO_PASS_TEXGEN,
  NO_LIGHT_MAP,
  LIGHT_MAP_MULTI,
  LIGHT_MAP_TWO_PASS
}
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

bool fillVB ()
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.
bool ownMaterialList () const
void reSkin (StringHandle &newBaseHandle)
const TextureHandle & getEnvironmentMap ()
F32 getEnvironmentMapAlpha ()
void setEnvironmentMap (const TextureHandle &map)
void setEnvironmentMapOn (bool on, F32 alpha=0.25f)
virtual void render (const Point3F *objectScale=NULL)
virtual void render (S32 dl, F32 intraDL=0.0f, const Point3F *objectScale=NULL)
void renderShadow (S32 dl, const MatrixF &mat, S32 dim, U32 *bits)
void setupFog (F32 fogAmount, TextureHandle *fogMap, Point4F &s, Point4F &t)
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)
void animate ()
void animate (S32 dl)
void animateNodes (S32 ss)
void animateVisibility (S32 ss)
void animateFrame (S32 ss)
void animateMatFrame (S32 ss)
void animateDecals (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 (bool ignoreScale=false)
S32 selectCurrentDetail (const Point3F &offset, F32 invScale=1.0f)
S32 selectCurrentDetail (F32 pixelSize)
S32 selectCurrentDetail2 (F32 adjustedDist)
S32 selectCurrentDetailEx (bool ignoreScale=false)
 fancy detail selection -- uses screen error
S32 selectCurrentDetail2Ex (F32 adjustedDist)
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 dumpDecals (Stream &, S32 indent, MeshObjectInstance *)
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)
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 ()
Ballooning
Blow up the model

void setShapeBalloon (F32 value)
F32 getBalloonValue () const
Override Texture
void setOverrideTexture (TextureHandle override)
void clearOverrideTexture ()
Animation Scale
Query about animated scale

bool animatesScale ()
bool animatesUniformScale ()
bool animatesAlignedScale ()
bool animatesArbitraryScale ()
bool scaleCurrentlyAnimated ()
Alpha Reflectance Mapping
open up mAlphaIsReflectanceMap for custom rendering

bool queryAlphaIsReflectanceMap ()
void setAlphaIsReflectanceMap (bool val)
Ground Transforms
These are hardly ever used.

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) const
 
Note:
threads can change order, best to hold onto a thread from the start

void destroyThread (TSThread *thread)
 Destroy a thread!
U32 threadCount () const
 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 *) const
 Get the sequence of the thread.
void setBlendEnabled (TSThread *thread, bool blendOn)
 Set whether or not the thread will blend.
bool getBlendEnabled (TSThread *thread) const
 Does this thread blend?
F32 getTime (TSThread *thread) const
 Get how long the thread has been playing.
F32 getPos (TSThread *thread) const
 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) const
 Is this thread in transition?
F32 getTimeScale (TSThread *thread) const
 Get the time scale of the thread.
void setTimeScale (TSThread *thread, F32)
 Set the time scale of the thread.
F32 getDuration (TSThread *thread) const
 Get the duration of the thread.
F32 getScaledDuration (TSThread *thread) const
 Get the duration of the thread with the scale factored in.
S32 getKeyframeCount (TSThread *thread) const
 Get the number of keyframes.
S32 getKeyframeNumber (TSThread *thread) const
 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 void setupFog (F32 fogAmount, const ColorF &fogColor)
static GBitmapsnapshot (TSShape *, U32 width, U32 height, bool mipmap, MatrixF &cameraMatrix, S32 dl, F32 intraDL=0.0f, bool hiQuality=false)

Data Fields

Vector< MeshObjectInstancemMeshObjects
Vector< DecalObjectInstancemDecalObjects
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 bool smNoRenderTranslucent
 if true, skip these objects
static bool smNoRenderNonTranslucent
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)
static bool smSkipFirstFog
static bool smSkipFog
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)
Render functions
void setupTexturing (S32 dl, F32 intraDL)
bool twoPassEnvironmentMap ()
bool twoPassDetailMap ()
bool twoPassFog ()
bool twoPassLightMap ()
void renderEnvironmentMap ()
void renderDetailMap ()
void renderFog ()
void renderLightMap ()
DirectX render functions
bool renderMeshesX (S32 ss, S32 od)
bool renderDecalsX (S32 ss, S32 od)

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?
TextureHandle mEnvironmentMap
bool mEnvironmentMapOn
F32 mEnvironmentMapAlpha
bool mAllowTwoPassEnvironmentMap
bool mAlphaIsReflectanceMap
bool mAllowTwoPassDetailMap
S32 mMaxEnvironmentMapDL
S32 mMaxDetailMapDL
S32 mMaxLightMapDL
bool mAlphaAlways
F32 mAlphaAlwaysValue
bool mDrawFog
bool mBalloonShape
 Is this shape ballooned?
F32 mBalloonValue
 How much is it ballooned?
bool mUseOverrideTexture
TextureHandle mOverrideTexture
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
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

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 ()

Friends

class TSThread
class TSLastDetail
class TSPartInstance

Data Structures

struct  DecalObjectInstance
 Also set up based on shape data...they refer to mesh object instances. More...
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


Member Typedef Documentation


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:
NO_ENVIRONMENT_MAP  don't render environment map
ENVIRONMENT_MAP_MULTI_1  render with multi-texturing (+1 texture units), shape alpha = reflectance map
ENVIRONMENT_MAP_MULTI_3  render with multi-texturing (+3 texture units), reflectance map separate texture
ENVIRONMENT_MAP_TWO_PASS  render in two passes -- mAllowTwoPassEnvironmentMap must be true

Note:
if reflectance map is separate from shape texture then won't render unless card has 4 texture units However, translucency won't work quite right if reflection map not separated -- probably ok though. Bottom line: previous 2 items probably only used for special shapes...
NO_DETAIL_MAP 
DETAIL_MAP_MULTI_1 
DETAIL_MAP_MULTI_2 
DETAIL_MAP_TWO_PASS 
NO_FOG 
FOG_MULTI_1 
FOG_MULTI_1_TEXGEN 
FOG_TWO_PASS 
FOG_TWO_PASS_TEXGEN 
NO_LIGHT_MAP 
LIGHT_MAP_MULTI 
LIGHT_MAP_TWO_PASS 

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]

void TSShapeInstance::setupTexturing ( S32  dl,
F32  intraDL 
) [protected]

bool TSShapeInstance::twoPassEnvironmentMap (  )  [protected]

bool TSShapeInstance::twoPassDetailMap (  )  [protected]

bool TSShapeInstance::twoPassFog (  )  [protected]

bool TSShapeInstance::twoPassLightMap (  )  [protected]

void TSShapeInstance::renderEnvironmentMap (  )  [protected]

void TSShapeInstance::renderDetailMap (  )  [protected]

void TSShapeInstance::renderFog (  )  [protected]

void TSShapeInstance::renderLightMap (  )  [protected]

bool TSShapeInstance::renderMeshesX ( S32  ss,
S32  od 
) [protected]

bool TSShapeInstance::renderDecalsX ( S32  ss,
S32  od 
) [protected]

bool TSShapeInstance::fillVB (  ) 

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).

bool TSShapeInstance::ownMaterialList (  )  const [inline]

void TSShapeInstance::reSkin ( StringHandle newBaseHandle  ) 

void TSShapeInstance::setNodeAnimationState ( S32  nodeIndex,
U32  animationState 
)

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::setCallback ( CallbackFunction  cb,
U32  data1 
) [inline]

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::setShapeBalloon ( F32  value  )  [inline]

F32 TSShapeInstance::getBalloonValue (  )  const [inline]

void TSShapeInstance::setOverrideTexture ( TextureHandle  override  )  [inline]

void TSShapeInstance::clearOverrideTexture (  )  [inline]

const TextureHandle& TSShapeInstance::getEnvironmentMap (  )  [inline]

F32 TSShapeInstance::getEnvironmentMapAlpha (  )  [inline]

void TSShapeInstance::setEnvironmentMap ( const TextureHandle &  map  )  [inline]

void TSShapeInstance::setEnvironmentMapOn ( bool  on,
F32  alpha = 0.25f 
) [inline]

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]

void TSShapeInstance::renderShadow ( S32  dl,
const MatrixF mat,
S32  dim,
U32 bits 
)

static void TSShapeInstance::setupFog ( F32  fogAmount,
const ColorF fogColor 
) [static]

void TSShapeInstance::setupFog ( F32  fogAmount,
TextureHandle *  fogMap,
Point4F s,
Point4F t 
)

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]

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::animateDecals ( 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]

bool TSShapeInstance::queryAlphaIsReflectanceMap (  )  [inline]

void TSShapeInstance::setAlphaIsReflectanceMap ( bool  val  )  [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 ( bool  ignoreScale = false  ) 

S32 TSShapeInstance::selectCurrentDetail ( const Point3F offset,
F32  invScale = 1.0f 
)

S32 TSShapeInstance::selectCurrentDetail ( F32  pixelSize  ) 

S32 TSShapeInstance::selectCurrentDetail2 ( F32  adjustedDist  ) 

S32 TSShapeInstance::selectCurrentDetailEx ( bool  ignoreScale = false  ) 

fancy detail selection -- uses screen error

S32 TSShapeInstance::selectCurrentDetail2Ex ( F32  adjustedDist  ) 

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  )  const [inline]

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 (  )  const [inline]

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  )  const [inline]

Get the sequence of the thread.

void TSShapeInstance::setBlendEnabled ( TSThread thread,
bool  blendOn 
) [inline]

Set whether or not the thread will blend.

bool TSShapeInstance::getBlendEnabled ( TSThread thread  )  const [inline]

Does this thread blend?

F32 TSShapeInstance::getTime ( TSThread thread  )  const [inline]

Get how long the thread has been playing.

F32 TSShapeInstance::getPos ( TSThread thread  )  const [inline]

Get the position in the thread.

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

Set how long into the thread to use.

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

Set the position of the thread.

bool TSShapeInstance::isInTransition ( TSThread thread  )  const [inline]

Is this thread in transition?

F32 TSShapeInstance::getTimeScale ( TSThread thread  )  const [inline]

Get the time scale of the thread.

void TSShapeInstance::setTimeScale ( TSThread thread,
F32   
) [inline]

Set the time scale of the thread.

F32 TSShapeInstance::getDuration ( TSThread thread  )  const [inline]

Get the duration of the thread.

F32 TSShapeInstance::getScaledDuration ( TSThread thread  )  const [inline]

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

S32 TSShapeInstance::getKeyframeCount ( TSThread thread  )  const [inline]

Get the number of keyframes.

S32 TSShapeInstance::getKeyframeNumber ( TSThread thread  )  const [inline]

Get which keyframe the thread is on.

void TSShapeInstance::setKeyframeNumber ( TSThread thread,
S32  kf 
) [inline]

Set which keyframe the thread is on.

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

advance time on a particular thread

void TSShapeInstance::advanceTime ( F32  delta  ) 

advance time on all threads

void TSShapeInstance::advancePos ( F32  delta,
TSThread  
) [inline]

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::dumpDecals ( Stream ,
S32  indent,
MeshObjectInstance  
)


Friends And Related Function Documentation

friend class TSThread [friend]

friend class TSLastDetail [friend]

friend class TSPartInstance [friend]


Field 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?

TextureHandle TSShapeInstance::mEnvironmentMap [protected]

bool TSShapeInstance::mDrawFog [protected]

Is this shape ballooned?

How much is it ballooned?

TextureHandle TSShapeInstance::mOverrideTexture [protected]

keep track of nodes with animation restrictions put on them

Nodes that aren't animated through threads automatically.

state variables

if true, skip these objects

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




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