TSStatic
A simple mesh shape with optional ambient animation.
Classes:
Private Types
MaskBits { TransformMask = Parent::NextFreeMask << 0 AdvancedStaticOptionsMask = Parent::NextFreeMask << 1 UpdateCollisionMask = Parent::NextFreeMask << 2 SkinMask = Parent::NextFreeMask << 3 MaterialMask = Parent::NextFreeMask << 4 NextFreeMask = Parent::NextFreeMask << 5 }
Parent
Public Types
MeshType { None = 0 Bounds = 1 CollisionMesh = 2 VisibleMesh = 3 }
The different types of mesh data types.
Private Static Attributes
Protected Attributes
bool
The type of mesh data to return for collision queries.
The type of mesh data to return for decal polylist queries.
bool
bool
If true each submesh within the TSShape is culled against the object space frustum.
bool
bool
bool
If true the shape is sorted by the origin of the model instead of the nearest point of the bounds.
Protected Static Attributes
Distance at which static object fading should have fully faded if smUseStaticObjectFade is on.
Distance at which static object fading begins if smUseStaticObjectFade is on.
Size of object where if the bounds is at or bigger than this, it will be ignored in the smUseStaticObjectFade logic. Useful for very large, distance-important objects.
bool
Indicates if all statics should utilize the distance-based object fadeout logic.
Public Attributes
Public Functions
TSStatic()
bool
The type of mesh data use for collision queries.
getUtilizedAssets(Vector< StringTableEntry > * usedAssetsList)
bool
hasAnim()
Called after any property of the object is changed in the world editor.
bool
Called when the object is inspected via a GuiInspector control.
onMount(SceneObject * obj, S32 node)
Callback when this object is mounted.
Called when the size of the object changes.
onUnmount(SceneObject * obj, S32 node)
Callback when this object is unmounted.
packUpdate(NetConnection * conn, U32 mask, BitStream * stream)
Instructs this object to pack its state for transfer over the network.
prepRenderImage(SceneRenderState * state)
Called when the SceneManager is ready for the registration of render instances.
setAlphaFade(bool enable, F32 start, F32 end, bool inverse)
setShapeFileName(StringTableEntry shapeName)
setSkinName(const char * name)
setTransform(const MatrixF & mat)
Sets the Object -> World transform.
unpackUpdate(NetConnection * conn, BitStream * stream)
Instructs this object to read state data previously packed with packUpdate.
Protected Functions
bool
_onResourceChanged(const Torque::Path & path)
_renderNormals(ObjectRenderInst * ri, SceneRenderState * state, BaseMatInstance * overrideMat)
Start or stop processing ticks depending on our state.
advanceTime(F32 dt)
Advances simulation time for animations.
buildConvex(const Box3F & box, Convex * convex)
Builds a convex hull for this object.
bool
buildExportPolyList(ColladaUtils::ExportData * exportData, const Box3F & box, const SphereF & sphere)
Builds a list of polygons which intersect a bounding volume for exporting.
bool
buildPolyList(PolyListContext context, AbstractPolyList * polyList, const Box3F & box, const SphereF & sphere)
Builds a list of polygons which intersect a bounding volume.
bool
bool
interpolateTick(F32 delta)
Interpolates between tick events.
bool
onAdd()
Called when the object is added to the sim.
onDynamicModified(const char * slotName, const char * newValue)
Called when a dynamic field is modified.
processTick(const Move * move)
Processes a move event and updates object state once every 32 milliseconds.
bool
setShapeAsset(const StringTableEntry shapeAssetId)
Public Static Functions
const char *
_getFieldSkin(void * object, const char * data)
bool
_setFieldSkin(void * object, const char * index, const char * data)
bool
_setShapeAsset(void * obj, const char * index, const char * data)
bool
_setShapeName(void * obj, const char * index, const char * data)
Private Functions
onStaticModified(const char * slotName, const char * newValue)
Specifically, these are called by setDataField when a static or dynamic field is modified, see the console details.
setSelectionFlags(U8 flags)
Detailed Description
A simple mesh shape with optional ambient animation.
Private Types
MaskBits
Enumerator
- TransformMask = Parent::NextFreeMask << 0
- AdvancedStaticOptionsMask = Parent::NextFreeMask << 1
- UpdateCollisionMask = Parent::NextFreeMask << 2
- SkinMask = Parent::NextFreeMask << 3
- MaterialMask = Parent::NextFreeMask << 4
- NextFreeMask = Parent::NextFreeMask << 5
typedef SceneObject Parent
Public Types
MeshType
Enumerator
- None = 0
No mesh.
- Bounds = 1
Bounding box of the shape.
- CollisionMesh = 2
Specifically designated collision meshes.
- VisibleMesh = 3
Rendered mesh polygons.
The different types of mesh data types.
Private Static Attributes
U32 smUniqueIdentifier
Protected Attributes
U32 cubeDescId
String cubeDescName
bool mAllowPlayerStep
F32 mAlphaFade
F32 mAlphaFadeEnd
F32 mAlphaFadeStart
TSThread * mAmbientThread
F32 mAnimOffset
F32 mAnimSpeed
String mAppliedSkinName
Vector< matMap > mChangingMaterials
Vector< S32 > mCollisionDetails
MeshType mCollisionType
The type of mesh data to return for collision queries.
Convex * mConvexList
CubeReflector mCubeReflector
Vector< S32 > mDecalDetails
Vector< S32 > * mDecalDetailsPtr
MeshType mDecalType
The type of mesh data to return for decal polylist queries.
S32 mForceDetail
bool mInvertAlphaFade
Vector< S32 > mLOSDetails
Vector< matMap > mMaterials
bool mMeshCulling
If true each submesh within the TSShape is culled against the object space frustum.
LinearColorF mOverrideColor
PhysicsBody * mPhysicsRep
bool mPlayAmbient
F32 mRenderNormalScalar
Resource< TSShape > mShape
AssetPtr< ShapeAsset > mShapeAsset
StringTableEntry mShapeAssetId
U32 mShapeHash
TSShapeInstance * mShapeInstance
StringTableEntry mShapeName
NetStringHandle mSkinNameHandle
bool mUseAlphaFade
bool mUseOriginSort
If true the shape is sorted by the origin of the model instead of the nearest point of the bounds.
ReflectorDesc * reflectorDesc
Protected Static Attributes
F32 smStaticObjectFadeEnd
Distance at which static object fading should have fully faded if smUseStaticObjectFade is on.
F32 smStaticObjectFadeStart
Distance at which static object fading begins if smUseStaticObjectFade is on.
F32 smStaticObjectUnfadeableSize
Size of object where if the bounds is at or bigger than this, it will be ignored in the smUseStaticObjectFade logic. Useful for very large, distance-important objects.
bool smUseStaticObjectFade
Indicates if all statics should utilize the distance-based object fadeout logic.
Public Attributes
Point2F mGradientRange
Point2F mGradientRangeUser
bool mHasGradients
bool mIgnoreZodiacs
bool mInvertGradientRange
Public Functions
TSStatic()
~TSStatic()
allowPlayerStep()
DECLARE_CONOBJECT(TSStatic )
getCollisionDetails()
getCollisionType()
The type of mesh data use for collision queries.
getLOSDetails()
getNumDetails()
getShape()
getShapeFileName()
getShapeInstance()
getUtilizedAssets(Vector< StringTableEntry > * usedAssetsList)
Reimplemented from: SceneObject
hasAnim()
inspectPostApply()
Reimplemented from: SceneObject
isAnimated()
onInspect(GuiInspector * )
Reimplemented from: SimObject
onMount(SceneObject * obj, S32 node)
Reimplemented from: SceneObject
onScaleChanged()
Reimplemented from: SceneObject
onUnmount(SceneObject * obj, S32 node)
Reimplemented from: SceneObject
packUpdate(NetConnection * conn, U32 mask, BitStream * stream)
Reimplemented from: SceneObject
prepRenderImage(SceneRenderState * state)
Reimplemented from: SceneObject
reSkin()
setAlphaFade(bool enable, F32 start, F32 end, bool inverse)
setShapeFileName(StringTableEntry shapeName)
setSkinName(const char * name)
setTransform(const MatrixF & mat)
Reimplemented from: SceneObject
unpackUpdate(NetConnection * conn, BitStream * stream)
Reimplemented from: SceneObject
updateMaterials()
Protected Functions
_createShape()
_onAssetChanged()
_onResourceChanged(const Torque::Path & path)
_renderNormals(ObjectRenderInst * ri, SceneRenderState * state, BaseMatInstance * overrideMat)
_updatePhysics()
_updateShouldTick()
Start or stop processing ticks depending on our state.
advanceTime(F32 dt)
Reimplemented from: ProcessObject
buildConvex(const Box3F & box, Convex * convex)
Reimplemented from: SceneObject
buildExportPolyList(ColladaUtils::ExportData * exportData, const Box3F & box, const SphereF & sphere)
Reimplemented from: SceneObject
buildPolyList(PolyListContext context, AbstractPolyList * polyList, const Box3F & box, const SphereF & sphere)
Reimplemented from: SceneObject
castRay(const Point3F & start, const Point3F & end, RayInfo * info)
Reimplemented from: SceneObject
castRayRendered(const Point3F & start, const Point3F & end, RayInfo * info)
Reimplemented from: SceneObject
interpolateTick(F32 delta)
Reimplemented from: ProcessObject
onAdd()
Reimplemented from: SceneObject
onDynamicModified(const char * slotName, const char * newValue)
Reimplemented from: SimObject
onRemove()
Reimplemented from: SceneObject
prepCollision()
processTick(const Move * move)
Reimplemented from: ProcessObject
setShapeAsset(const StringTableEntry shapeAssetId)
Public Static Functions
_getFieldSkin(void * object, const char * data)
_setFieldSkin(void * object, const char * index, const char * data)
_setShapeAsset(void * obj, const char * index, const char * data)
_setShapeName(void * obj, const char * index, const char * data)
consoleInit()
initPersistFields()
Private Functions
onStaticModified(const char * slotName, const char * newValue)
Reimplemented from: SimObject
set_special_typing()
setSelectionFlags(U8 flags)
Reimplemented from: SceneObject