Entity
Classes:
Public Types
MaskBits { TransformMask = Parent::NextFreeMask << 0 BoundsMask = Parent::NextFreeMask << 1 ComponentsMask = Parent::NextFreeMask << 2 NoWarpMask = Parent::NextFreeMask << 3 NextFreeMask = Parent::NextFreeMask << 4 }
Private Types
Parent
Public Friends
class
Private Attributes
bool
Public Attributes
Protected Functions
advanceTime(F32 dt)
Advances simulation time for animations.
interpolateTick(F32 delta)
Interpolates between tick events.
bool
onAdd()
Called when the object is added to the sim.
prepRenderImage(SceneRenderState * state)
Called when the SceneManager is ready for the registration of render instances.
processTick(const Move * move)
Processes a move event and updates object state once every 32 milliseconds.
Public Functions
Entity()
~Entity()
bool
addComponent(Component * comp)
addTamlChild(SimObject * pSimObject)
Called when Taml attempts to populate an objects children during a read.
buildConvex(const Box3F & box, Convex * convex)
Builds a convex hull for this object.
bool
buildPolyList(PolyListContext context, AbstractPolyList * polyList, const Box3F & box, const SphereF & sphere)
Builds a list of polygons which intersect a bounding volume.
bool
bool
clearComponents(bool deleteComponents)
bool
findObjectByInternalName(StringTableEntry internalName, bool searchChildren)
getCameraTransform(F32 * pos, MatrixF * mat)
T *
getComponent(const U32 index)
getComponent(String componentType)
Returns the position of the object.
getTamlChild(const U32 childIndex)
Called when Taml attempts to compile a list of children.
Called when Taml attempts to compile a list of children.
mountObject(SceneObject * obj, S32 node, const MatrixF & xfm)
ex: Mount B to A at A's node N A.mountObject( B, N )
mountObject(SceneObject * objB, MatrixF txfm)
onCameraScopeQuery(NetConnection * cr, CameraScopeQuery * camInfo)
Queries the object about information used to determine scope.
onMount(SceneObject * obj, S32 node)
Callback when this object is mounted.
Called when the adding of the object to the sim is complete, all sub-objects have been processed as well.
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.
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.
bool
removeComponent(Component * comp, bool deleteComponent)
removeObject(SimObject * object)
Remove the given object from the set.
setComponentDirty(Component * comp, bool forceUpdate)
setDataField(StringTableEntry slotName, const char * array, const char * value)
setForwardVector(VectorF newForward, VectorF upVector)
setMountOffset(Point3F posOffset)
setMountRotation(EulerF rotOffset)
setObjectBox(Box3F objBox)
setRenderTransform(const MatrixF & mat)
This sets the render transform for this object.
setRenderTransform(Point3F position, RotationF rotation)
setRotation(RotationF rotation)
setTransform(const MatrixF & mat)
Sets the Object -> World transform.
setTransform(Point3F position, RotationF rotation)
unpackUpdate(NetConnection * conn, BitStream * stream)
Instructs this object to read state data previously packed with packUpdate.
Public Static Functions
const char *
_getPosition(void * obj, const char * data)
const char *
_getRotation(void * obj, const char * data)
bool
_setPosition(void * object, const char * index, const char * data)
bool
_setRotation(void * object, const char * index, const char * data)
Detailed Description
Public Types
MaskBits
Enumerator
- TransformMask = Parent::NextFreeMask << 0
- BoundsMask = Parent::NextFreeMask << 1
- ComponentsMask = Parent::NextFreeMask << 2
- NoWarpMask = Parent::NextFreeMask << 3
- NextFreeMask = Parent::NextFreeMask << 4
Private Types
typedef GameBase Parent
Public Friends
Private Attributes
ContainerQueryInfo containerInfo
Vector< Component * > mComponents
bool mInitialized
Point3F mPos
RotationF mRot
bool mStartComponentUpdate
Vector< Component * > mToLoadComponents
Signal< void(Component *) > onComponentAdded
Signal< void(Component *) > onComponentRemoved
Signal< void(MatrixF *) > onTransformSet
Public Attributes
Move lastMove
StateDelta mDelta
S32 mPredictionCount
Number of ticks to predict.
Signal< void(SimObject *, String, String) > onDataSet
Protected Functions
advanceTime(F32 dt)
Reimplemented from: ProcessObject
interpolateTick(F32 delta)
Reimplemented from: ProcessObject
onAdd()
Reimplemented from: SceneObject
onRemove()
Reimplemented from: SceneObject
prepRenderImage(SceneRenderState * state)
Reimplemented from: SceneObject
processTick(const Move * move)
Reimplemented from: ProcessObject
Public Functions
Entity()
~Entity()
addComponent(Component * comp)
addObject(SimObject * object)
Reimplemented from: SimGroup
addTamlChild(SimObject * pSimObject)
Reimplemented from: SimSet
buildConvex(const Box3F & box, Convex * convex)
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
clearComponents(bool deleteComponents)
DECLARE_CONOBJECT(Entity )
deferAddingComponents()
findObjectByInternalName(StringTableEntry internalName, bool searchChildren)
Reimplemented from: SimSet
getCameraTransform(F32 * pos, MatrixF * mat)
Reimplemented from: GameBase
getComponent()
getComponent(const U32 index)
getComponent(String componentType)
getComponentCount()
getComponents()
getContainerInfo()
getMountTransform(S32 index, const MatrixF & xfm, MatrixF * outMat)
Reimplemented from: SceneObject
getObjectBox()
getObjToWorld()
getPosition()
Reimplemented from: SceneObject
getRenderMountTransform(F32 delta, S32 index, const MatrixF & xfm, MatrixF * outMat)
Reimplemented from: SceneObject
getRotation()
getTamlChild(const U32 childIndex)
Reimplemented from: SimSet
getTamlChildCount(void )
Reimplemented from: SimSet
getTransform()
getWorldToObj()
mountObject(SceneObject * obj, S32 node, const MatrixF & xfm)
Reimplemented from: SceneObject
mountObject(SceneObject * objB, MatrixF txfm)
onCameraScopeQuery(NetConnection * cr, CameraScopeQuery * camInfo)
Reimplemented from: SceneObject
onEndInspect()
onInspect()
onMount(SceneObject * obj, S32 node)
Reimplemented from: GameBase
onPostAdd()
Reimplemented from: SimObject
onStaticModified(const char * slotName, const char * newValue)
Reimplemented from: SimObject
onUnmount(SceneObject * obj, S32 node)
Reimplemented from: GameBase
packUpdate(NetConnection * conn, U32 mask, BitStream * stream)
Reimplemented from: SceneObject
removeComponent(Component * comp, bool deleteComponent)
removeObject(SimObject * object)
Reimplemented from: SimGroup
resetObjectBox()
resetRenderWorldBox()
resetWorldBox()
setComponentDirty(Component * comp, bool forceUpdate)
setComponentsDirty()
setDataField(StringTableEntry slotName, const char * array, const char * value)
setForwardVector(VectorF newForward, VectorF upVector)
setMountOffset(Point3F posOffset)
setMountRotation(EulerF rotOffset)
setObjectBox(Box3F objBox)
setRenderTransform(const MatrixF & mat)
Reimplemented from: SceneObject
setRenderTransform(Point3F position, RotationF rotation)
setRotation(RotationF rotation)
setTransform(const MatrixF & mat)
Reimplemented from: SceneObject
setTransform(Point3F position, RotationF rotation)
unpackUpdate(NetConnection * conn, BitStream * stream)
Reimplemented from: SceneObject
updateContainer()
write(Stream & stream, U32 tabStop, U32 flags)
Reimplemented from: SimSet
Public Static Functions
_getPosition(void * obj, const char * data)
_getRotation(void * obj, const char * data)
_setPosition(void * object, const char * index, const char * data)
_setRotation(void * object, const char * index, const char * data)
initPersistFields()
