TSStatic

Engine/source/T3D/tsStatic.h

A simple mesh shape with optional ambient animation.

More...

Classes:

Private Types

enum
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

enum
MeshType {
  None = 0
  Bounds = 1
  CollisionMesh = 2
  VisibleMesh = 3
}

The different types of mesh data types.

Private Static Attributes

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 Functions

The type of mesh data use for collision queries.

bool

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.

Called when the SceneManager is ready for the registration of render instances.

setAlphaFade(bool enable, F32 start, F32 end, bool inverse)
setSkinName(const char * name)

Sets the Object -> World transform.

Instructs this object to read state data previously packed with packUpdate.

Protected Functions

bool

Start or stop processing ticks depending on our state.

Advances simulation time for animations.

buildConvex(const Box3F & box, Convex * convex)

Builds a convex hull for this object.

bool

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
castRay(const Point3F & start, const Point3F & end, RayInfo * info)

Casts a ray and obtain collision information, returns true if RayInfo is modified.

bool

Casts a ray against rendered geometry, returns true if RayInfo is modified.

Interpolates between tick events.

bool

Called when the object is added to the sim.

onDynamicModified(const char * slotName, const char * newValue)

Called when a dynamic field is modified.

Called when the object is removed from the sim.

Processes a move event and updates object state once every 32 milliseconds.

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.

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