Class: RigidBodyMapping
A bidirectional mapping between RigidBody objects and 3D objects.
Constructors
Accessors
Methods
Constructors
constructor
• new RigidBodyMapping(): RigidBodyMapping
Returns
Accessors
getAllPhysicsObjectMap
• get
getAllPhysicsObjectMap(): Map
<btRigidBody
, Object3D
>
Retrieves the entire mapping of all RigidBody objects.
Returns
Map
<btRigidBody
, Object3D
>
A map of RigidBody objects to 3D objects.
Defined in
packages/physics/utils/RigidBodyMapping.ts:14
getAllGraphicObjectMap
• get
getAllGraphicObjectMap(): Map
<Object3D
, btRigidBody
>
Retrieves the entire mapping of all 3D objects.
Returns
Map
<Object3D
, btRigidBody
>
A map of 3D objects to RigidBody objects.
Defined in
packages/physics/utils/RigidBodyMapping.ts:22
Methods
addMapping
▸ addMapping(object3D
, physics
): void
Adds a mapping between a 3D object and a RigidBody object.
Parameters
Name | Type | Description |
---|---|---|
object3D | Object3D | The 3D object. |
physics | btRigidBody | The RigidBody object. |
Returns
void
Defined in
packages/physics/utils/RigidBodyMapping.ts:31
getPhysicsObject
▸ getPhysicsObject(object3D
): btRigidBody
Retrieves the RigidBody object associated with a given 3D object.
Parameters
Name | Type | Description |
---|---|---|
object3D | Object3D | The 3D object. |
Returns
The associated RigidBody object, or undefined if not found.
Defined in
packages/physics/utils/RigidBodyMapping.ts:40
getGraphicObject
▸ getGraphicObject(physics
): Object3D
Retrieves the 3D object associated with a given RigidBody object.
Parameters
Name | Type | Description |
---|---|---|
physics | btRigidBody | The RigidBody object. |
Returns
Object3D
The associated 3D object, or undefined if not found.
Defined in
packages/physics/utils/RigidBodyMapping.ts:49
removeMappingByGraphic
▸ removeMappingByGraphic(object3D
): void
Removes the mapping associated with a given 3D object.
Parameters
Name | Type | Description |
---|---|---|
object3D | Object3D | The 3D object. |
Returns
void
Defined in
packages/physics/utils/RigidBodyMapping.ts:57
removeMappingByPhysics
▸ removeMappingByPhysics(physics
): void
Removes the mapping associated with a given RigidBody object.
Parameters
Name | Type | Description |
---|---|---|
physics | btRigidBody | The RigidBody object. |
Returns
void