Internal component storing Jolt soft body reference.
More...
#include <SoftBodyInternal.hpp>
|
| | SoftBodyInternal () |
| | Default constructor (invalid body).
|
| | SoftBodyInternal (JPH::BodyID id) |
| | Construct with body ID.
|
| | SoftBodyInternal (JPH::BodyID id, std::vector< uint32_t > map) |
| | Construct with body ID and vertex map.
|
| | SoftBodyInternal (JPH::BodyID id, std::vector< uint32_t > map, const glm::vec3 &scale) |
| | Construct with body ID, vertex map, and initial scale.
|
| bool | IsValid () const |
| | Check if body ID is valid.
|
Internal component storing Jolt soft body reference.
Automatically created by SoftBodySystem when a SoftBody component is added. Used to track the Jolt physics body for simulation and updates.
- Note
- Users should not create this component directly
◆ SoftBodyInternal() [1/4]
| Physics::Component::SoftBodyInternal::SoftBodyInternal |
( |
| ) |
|
|
inline |
Default constructor (invalid body).
◆ SoftBodyInternal() [2/4]
| Physics::Component::SoftBodyInternal::SoftBodyInternal |
( |
JPH::BodyID | id | ) |
|
|
inlineexplicit |
Construct with body ID.
- Parameters
-
◆ SoftBodyInternal() [3/4]
| Physics::Component::SoftBodyInternal::SoftBodyInternal |
( |
JPH::BodyID | id, |
|
|
std::vector< uint32_t > | map ) |
|
inline |
Construct with body ID and vertex map.
- Parameters
-
| id | Jolt body ID |
| map | Vertex mapping from original to deduplicated indices |
◆ SoftBodyInternal() [4/4]
| Physics::Component::SoftBodyInternal::SoftBodyInternal |
( |
JPH::BodyID | id, |
|
|
std::vector< uint32_t > | map, |
|
|
const glm::vec3 & | scale ) |
|
inline |
Construct with body ID, vertex map, and initial scale.
- Parameters
-
| id | Jolt body ID |
| map | Vertex mapping from original to deduplicated indices |
| scale | Initial scale applied to vertices |
◆ IsValid()
| bool Physics::Component::SoftBodyInternal::IsValid |
( |
| ) |
const |
|
inlinenodiscard |
Check if body ID is valid.
- Returns
- true if body ID is valid
◆ bodyID
| JPH::BodyID Physics::Component::SoftBodyInternal::bodyID |
Jolt body ID for the soft body.
◆ initialScale
| glm::vec3 Physics::Component::SoftBodyInternal::initialScale = glm::vec3(1.0f) |
Initial scale applied to vertices during creation Used to convert Jolt vertices (world-scale) back to local mesh space during sync
◆ vertexMap
| std::vector<uint32_t> Physics::Component::SoftBodyInternal::vertexMap |
Maps original mesh vertex index to deduplicated Jolt vertex index Used to sync Jolt simulation results back to the original mesh
The documentation for this struct was generated from the following file: