PxMultiActor
Engine/source/T3D/physics/physx/pxMultiActor.h
Classes:
Public User Defined
setAllBroken(bool isBroken)
setBroken(const NxMat34 & parentPose, const NxVec3 & parentVel, PxUserData * userData, bool isBroken)
Sets up actors and meshes associated with the passed joint to reflect the desired state.
setMeshHidden(String namePrefix, bool hidden)
setAllHidden(bool hide)
listMeshes(const String & state)
_onJointBreak(NxReal breakForce, NxJoint & brokenJoint)
_onContact(PhysicsUserData * us, PhysicsUserData * them, const Point3F & hitPoint, const Point3F & hitForce)
getDynamicXfms(PxMultiActor * srcObj, F32 dt)
Private Types
MaskBits { MoveMask = Parent::NextFreeMask << 0 WarpMask = Parent::NextFreeMask << 1 LightMask = Parent::NextFreeMask << 2 SleepMask = Parent::NextFreeMask << 3 ForceSleepMask = Parent::NextFreeMask << 4 ImpulseMask = Parent::NextFreeMask << 5 UpdateMask = Parent::NextFreeMask << 6 MountedMask = Parent::NextFreeMask << 7 NextFreeMask = Parent::NextFreeMask << 8 }
Parent
Protected Attributes
The userdata object assigned to all actors and joints of this multi-actor.
bool
Helper for.
bool
bool
A helper set to true if is a client object and is a singlePlayerOnly object.
Vector< NxActor * >
NxActor *
This is the root actor whose transform is the transform of this SceneObject.
Public Functions
applyImpulse(const Point3F & pos, const VectorF & vec)
Applies an impulse force to this object.
applyRadialImpulse(const Point3F & origin, F32 radius, F32 magnitude)
Applies a radial impulse to the object using the impulse origin and force.
getMountTransform(U32 mountPoint, MatrixF * mat)
getRenderMountTransform(U32 index, MatrixF * mat)
Called after any property of the object is changed in the world editor.
interpolateTick(F32 delta)
Interpolates between tick events.
mountObject(SceneObject * obj, U32 node)
bool
onAdd()
Called when the object is added to the sim.
onDeleteNotify(SimObject * object)
Called when a SimObject is deleted.
bool
onNewDataBlock(GameBaseData * dptr, bool reload)
Called when a new datablock is set.
onPhysicsReset(PhysicsResetEvent reset)
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.
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.
processTick(const Move * move)
Processes a move event and updates object state once every 32 milliseconds.
setTransform(const MatrixF & mat)
Sets the Object -> World transform.
unmountObject(SceneObject * obj)
Remove an object mounting.
unpackUpdate(NetConnection * conn, BitStream * stream)
Instructs this object to read state data previously packed with packUpdate.
Public Static Functions
Protected Functions
_applyActorRadialForce(NxActor * inActor, const NxVec3 & origin, F32 radius, F32 magnitude)
bool
_createActors(const MatrixF & xfm)
This creates the physics objects.
_createActorUserData(NxActor * actor, String & userProperties)
Creates a PxUserData and parses userProperties into it.
_createJointUserData(NxJoint * joint, String & userProperties)
Creates a PxUserData for a joint and parses userProperties into it.
_debugRender(ObjectRenderInst * ri, SceneRenderState * state, BaseMatInstance * overrideMat)
Called to cleanup the physics objects.
NxActor *
_findActor(const String & actorName)
_getMeshName(const NxActor * actor)
Get the corresponding meshName for a given actor.
bool
_getNodeTransform(U32 nodeIdx, MatrixF * outXfm)
_updateDeltas(bool clearDelta)
Detailed Description
Public User Defined
setAllBroken(bool isBroken)
Set visibility of all broken/unbroken meshes to match this state.
setBroken(const NxMat34 & parentPose, const NxVec3 & parentVel, PxUserData * userData, bool isBroken)
Sets up actors and meshes associated with the passed joint to reflect the desired state.
setMeshHidden(String namePrefix, bool hidden)
setAllHidden(bool hide)
listMeshes(const String & state)
_onJointBreak(NxReal breakForce, NxJoint & brokenJoint)
_onContact(PhysicsUserData * us, PhysicsUserData * them, const Point3F & hitPoint, const Point3F & hitForce)
applyWarp(const MatrixF & mat, bool interpRender, bool sweep)
getDynamicXfms(PxMultiActor * srcObj, F32 dt)
Private Types
MaskBits
Enumerator
- MoveMask = Parent::NextFreeMask << 0
- WarpMask = Parent::NextFreeMask << 1
- LightMask = Parent::NextFreeMask << 2
- SleepMask = Parent::NextFreeMask << 3
- ForceSleepMask = Parent::NextFreeMask << 4
- ImpulseMask = Parent::NextFreeMask << 5
- UpdateMask = Parent::NextFreeMask << 6
- MountedMask = Parent::NextFreeMask << 7
- NextFreeMask = Parent::NextFreeMask << 8
typedef GameBase Parent
Protected Attributes
Vector< Delta > mActorDeltas
Vector< NxActor * > mActors
VectorF mActorScale
The userdata object assigned to all actors and joints of this multi-actor.
This is the scale the actors were built at and is used to decide if we need to recreate them.
bool mBroken
Helper for.
PxMultiActorData * mDataBlock
Resource< TSShape > mDebrisShape
bool mDebugRender
Delta mDelta
bool mIsDummy
A helper set to true if is a client object and is a singlePlayerOnly object.
Vector< NxJoint * > mJoints
Vector< S32 > mMappedActorDL
Vector< NxActor * > mMappedActors
Vector< S32 > mMappedToActorIndex
MatrixF mResetXfm
The transform of this actor when it was first created.
It is used to reset the physics state when the editor is enabled.
NxActor * mRootActor
This is the root actor whose transform is the transform of this SceneObject.
TSShapeInstance * mShapeInstance
Vector< NxShape * > mShapes
VectorF mStartImpulse
PxWorld * mWorld
Public Functions
PxMultiActor()
applyImpulse(const Point3F & pos, const VectorF & vec)
Reimplemented from: SceneObject
applyRadialImpulse(const Point3F & origin, F32 radius, F32 magnitude)
Reimplemented from: SceneObject
DECLARE_CONOBJECT(PxMultiActor )
getMountTransform(U32 mountPoint, MatrixF * mat)
getRenderMountTransform(U32 index, MatrixF * mat)
inspectPostApply()
Reimplemented from: GameBase
interpolateTick(F32 delta)
Reimplemented from: ProcessObject
mountObject(SceneObject * obj, U32 node)
onAdd()
Reimplemented from: GameBase
onDeleteNotify(SimObject * object)
Reimplemented from: SceneObject
onNewDataBlock(GameBaseData * dptr, bool reload)
Reimplemented from: GameBase
onPhysicsReset(PhysicsResetEvent reset)
onRemove()
Reimplemented from: GameBase
onStaticModified(const char * slotName, const char * newValue)
Reimplemented from: SimObject
packUpdate(NetConnection * conn, U32 mask, BitStream * stream)
Reimplemented from: GameBase
prepRenderImage(SceneRenderState * state)
Reimplemented from: SceneObject
processTick(const Move * move)
Reimplemented from: GameBase
setScale(const VectorF & scale)
Reimplemented from: SceneObject
setTransform(const MatrixF & mat)
Reimplemented from: SceneObject
unmountObject(SceneObject * obj)
Reimplemented from: SceneObject
unpackUpdate(NetConnection * conn, BitStream * stream)
Reimplemented from: GameBase
Public Static Functions
initPersistFields()
Protected Functions
_applyActorRadialForce(NxActor * inActor, const NxVec3 & origin, F32 radius, F32 magnitude)
_createActors(const MatrixF & xfm)
This creates the physics objects.
_createActorUserData(NxActor * actor, String & userProperties)
Creates a PxUserData and parses userProperties into it.
_createJointUserData(NxJoint * joint, String & userProperties)
Creates a PxUserData for a joint and parses userProperties into it.
_debugRender(ObjectRenderInst * ri, SceneRenderState * state, BaseMatInstance * overrideMat)
_destroyActors()
Called to cleanup the physics objects.
_findActor(const String & actorName)
_getMeshName(const NxActor * actor)
Get the corresponding meshName for a given actor.
_getNodeTransform(U32 nodeIdx, MatrixF * outXfm)
_updateBounds()
_updateContainerForces()
_updateDeltas(bool clearDelta)
onFileNotify()
