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 () |
TSShape * | getShape () |
TSMaterialList * | getMaterialList () |
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) |
GBitmap * | snapshot (U32 width, U32 height, bool mipmap, MatrixF &cameraMatrix, bool hiQuality) |
GBitmap * | snapshot (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 *) |
|
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 () |
|
|
void | setNodeAnimationState (S32 nodeIndex, U32 animationState) |
U32 | getNodeAnimationState (S32 nodeIndex) |
|
check trigger value
|
bool | getTriggerState (U32 stateNum, bool clearState=true) |
void | setTriggerState (U32 stateNum, bool on) |
void | setTriggerStateBit (U32 stateBit, bool on) |
|
void | incDebrisRefCount () |
void | decDebrisRefCount () |
U32 | getDebrisRefCount () |
|
AlphaAlways allows the entire model to become translucent at the same value
|
void | setAlphaAlways (F32 value) |
F32 | getAlphaAlwaysValue () |
bool | getAlphaAlways () |
|
Blow up the model
|
void | setShapeBalloon (F32 value) |
F32 | getBalloonValue () const |
|
void | setOverrideTexture (TextureHandle override) |
void | clearOverrideTexture () |
|
Query about animated scale
|
bool | animatesScale () |
bool | animatesUniformScale () |
bool | animatesAlignedScale () |
bool | animatesArbitraryScale () |
bool | scaleCurrentlyAnimated () |
|
open up mAlphaIsReflectanceMap for custom rendering
|
bool | queryAlphaIsReflectanceMap () |
void | setAlphaIsReflectanceMap (bool val) |
|
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
|
MatrixF & | getGroundTransform () |
void | deltaGround (TSThread *, F32 start, F32 end, MatrixF *mat=NULL) |
void | deltaGround1 (TSThread *, F32 start, F32 end, MatrixF &mat) |
|
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:: Create a new thread (if needed): TSThread* thread = mShapeInstance->addThread();
Finally, set the position in the sequence: mShapeInstance->setSequence(thread, seq, 0)
|
TSThread * | addThread () |
| Create a new thread.
|
TSThread * | getThread (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 GBitmap * | snapshot (TSShape *, U32 width, U32 height, bool mipmap, MatrixF &cameraMatrix, S32 dl, F32 intraDL=0.0f, bool hiQuality=false) |
Data Fields |
Vector< MeshObjectInstance > | mMeshObjects |
Vector< DecalObjectInstance > | mDecalObjects |
Vector< IflMaterialInstance > | mIflMaterialInstances |
Vector< MatrixF > | mNodeTransforms |
| storage space for node transforms
|
U32 * | mDirtyFlags |
void * | mData |
| available for use by app...initialized to 0
|
|
unused until first transition
|
Vector< Quat16 > | mNodeReferenceRotations |
Vector< Point3F > | mNodeReferenceTranslations |
Vector< F32 > | mNodeReferenceUniformScales |
Vector< Point3F > | mNodeReferenceScaleFactors |
Vector< Quat16 > | mNodeReferenceArbitraryScaleRots |
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 |
|
static Vector< QuatF > | smNodeCurrentRotations |
static Vector< Point3F > | smNodeCurrentTranslations |
static Vector< F32 > | smNodeCurrentUniformScales |
static Vector< Point3F > | smNodeCurrentAlignedScales |
static Vector< TSScale > | smNodeCurrentArbitraryScales |
|
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) |
|
void | setupTexturing (S32 dl, F32 intraDL) |
bool | twoPassEnvironmentMap () |
bool | twoPassDetailMap () |
bool | twoPassFog () |
bool | twoPassLightMap () |
void | renderEnvironmentMap () |
void | renderDetailMap () |
void | renderFog () |
void | renderLightMap () |
|
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< TSShape > | hShape |
TSShape * | mShape |
TSMaterialList * | mMaterialList |
| 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
|
|
MatrixF | mGroundTransform |
TSThread * | mGroundThread |
|
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 |
|
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
- 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 |
- 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 |
|
- 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::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::clearStatics |
( |
|
) |
|
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::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::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::handleTransitionNodes |
( |
S32 |
a, |
|
|
S32 |
b | |
|
) |
| | [private] |
void TSShapeInstance::handleNodeScale |
( |
S32 |
a, |
|
|
S32 |
b | |
|
) |
| | [private] |
void TSShapeInstance::handleMaskedPositionNode |
( |
TSThread * |
, |
|
|
S32 |
nodeIndex, |
|
|
S32 |
offset | |
|
) |
| | [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] |
static void TSShapeInstance::setupFog |
( |
F32 |
fogAmount, |
|
|
const ColorF & |
fogColor | |
|
) |
| | [static] |
GBitmap* TSShapeInstance::snapshot |
( |
U32 |
width, |
|
|
U32 |
height, |
|
|
bool |
mipmap, |
|
|
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::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] |
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::quickLOS |
( |
const Point3F & |
start, |
|
|
const Point3F & |
end, |
|
|
S32 |
dl | |
|
) |
| | [inline] |
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 |
( |
|
) |
|
TSThread * TSShapeInstance::getThread |
( |
S32 |
threadNumber |
) |
const [inline] |
- Note:
- threads can change order, best to hold onto a thread from the start
U32 TSShapeInstance::threadCount |
( |
|
) |
const [inline] |
How many threads are there?
Get the thread a sequence.
void TSShapeInstance::transitionToSequence |
( |
TSThread * |
, |
|
|
S32 |
seq, |
|
|
F32 |
pos, |
|
|
F32 |
duration, |
|
|
bool |
continuePlay | |
|
) |
| | |
Transition to a sequence.
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] |
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.
Set how long into the thread to use.
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.
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.
advance time on a particular thread
void TSShapeInstance::advanceTime |
( |
F32 |
delta |
) |
|
advance time on all threads
advance pos on a particular thread
void TSShapeInstance::advancePos |
( |
F32 |
delta |
) |
|
advance pos on all threads
void TSShapeInstance::buildInstanceData |
( |
TSShape * |
, |
|
|
bool |
loadMaterials | |
|
) |
| | |
Friends And Related Function Documentation
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?
How much is it ballooned?
keep track of nodes with animation restrictions put on them
Nodes that aren't animated through threads automatically.
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
|