|
Rapier C — 3D / f64 0.36.0+c.0
|
Particle recipes, materials, clusters, deformable meshes, and tearing. More...
Data Structures | |
| struct | R3SoftBodyMaterial |
| Plain configuration data; initialize defaults, edit, then apply. More... | |
| struct | R3SoftRecoverySettings |
| Plain configuration data; initialize defaults, edit, then apply. More... | |
| struct | R3SoftFemParameters |
| Plain configuration data; initialize defaults, edit, then apply. More... | |
| struct | R3SoftBodiesSettings |
| Plain configuration data; initialize defaults, edit, then apply. More... | |
| struct | R3SoftEdgeSoftness |
| Spring-coefficient override for one soft-body edge. More... | |
| struct | R3SoftEdgeSoftnessView |
| Borrowed elements; count counts elements. More... | |
| struct | R3SoftEdgeTear |
| Tear-resistance override for one soft-body edge. More... | |
| struct | R3SoftEdgeTearView |
| Borrowed elements; count counts elements. More... | |
| struct | R3SoftBodyDescView |
| Borrowed array of soft-body descriptions. More... | |
| struct | R3SoftBodyDesc |
| Copyable recipe, not an owned procedural builder. More... | |
| struct | R3SoftBodyHandle |
| Copyable non-owning handle: world pointer plus entity index and generation. More... | |
| struct | R3SoftMeshBindingDesc |
| Non-owning deformable binding description. More... | |
| struct | R3SoftClusterSplit |
| Cluster and proxy remapping after a soft-body split. More... | |
| struct | R3SoftJointMove |
| Impulse-joint movement between rigid proxies after tearing. More... | |
| struct | R3SoftMeshId |
| Stable identity of a live mesh within one soft body; matches Rapier's SoftMeshId. More... | |
| struct | R3SoftMeshInfo |
| Mesh identity and rendering metadata. More... | |
Macros | |
| #define | R3_SOFT_DESC_PARTICLES 0 |
| Soft-body selector: desc particles. | |
| #define | R3_SOFT_DESC_ROPE 1 |
| Soft-body selector: desc rope. | |
| #define | R3_SOFT_DESC_GRID 2 |
| Soft-body selector: desc grid. | |
| #define | R3_SOFT_DESC_CLOTH 3 |
| Soft-body selector: desc cloth. | |
| #define | R3_SOFT_DESC_CUBOID 4 |
| Soft-body selector: desc cuboid. | |
| #define | R3_SOFT_DESC_SURFACE 5 |
| Soft-body selector: desc surface. | |
| #define | R3_SOFT_DESC_DISK 6 |
| Soft-body selector: desc disk. | |
| #define | R3_SOFT_DESC_SPHERE 7 |
| Soft-body selector: desc sphere. | |
| #define | R3_SOFT_DESC_CLOTH_TUBE 8 |
| Soft-body selector: desc cloth tube. | |
| #define | R3_SOFT_DESC_VOLUMETRIC 9 |
| Soft-body selector: desc volumetric. | |
| #define | R3_SOFT_DESC_CLOTH_ANISOTROPIC 12 |
| Soft-body selector: cloth with separate warp, weft and shear softness (3D). | |
| #define | R3_SOFT_BINDING_SKINNED 0 |
| Soft-body selector: binding skinned. | |
| #define | R3_SOFT_BINDING_DIRECT 1 |
| Soft-body selector: binding direct. | |
| #define | R3_SOFT_BINDING_DIRECT_BY_POSITION 2 |
| Soft-body selector: binding direct by position. | |
| #define | R3_SOFT_CELL_VOLUME 0 |
| Cell model that constrains volume without elastic shear response. | |
| #define | R3_SOFT_CELL_COROTATIONAL 1 |
| Corotational elastic cell model. | |
| #define | R3_SOFT_CELL_NEO_HOOKEAN 2 |
| Neo-Hookean elastic cell model. | |
| #define | R3_SOFT_SOLVER_CONSTRAINTS 0 |
| Use the constraint-based soft-body solver. | |
| #define | R3_SOFT_SOLVER_FEM 1 |
| Use the finite-element solver; requires RAPIER_FEM. | |
| #define | R3_SOFT_EDGE_PLASTIC_FLOW_BOTH 0 |
| Edge plastic flow (R3SoftBodyMaterial::edgePlasticFlow): both a squeeze and a stretch set. | |
| #define | R3_SOFT_EDGE_PLASTIC_FLOW_COMPRESSION 1 |
| Edge plastic flow: only a squeeze sets; a stretched edge springs back. | |
| #define | R3_SOFT_EDGE_PLASTIC_FLOW_TENSION 2 |
| Edge plastic flow: only a stretch sets; a squeezed edge springs back. | |
| #define | R3_SOFT_PATCH_CONSTRAINTS_KEEP 0 |
| Overlap patch constraints (R3SoftRecoverySettings::overlapPatchConstraints): keep them. | |
| #define | R3_SOFT_PATCH_CONSTRAINTS_STAND_DOWN 1 |
| Overlap patch constraints: stand them down inside the patch. | |
| #define | R3_SOFT_PATCH_CONSTRAINTS_ALONG_NORMAL 2 |
| Overlap patch constraints: align them with the overlap normal. | |
| #define | R3_SOFT_FRAME 4 |
| Read-only body type of soft-body cluster proxies; cannot be used to construct a rigid body. | |
Typedefs | |
| typedef struct R3SoftBodyMaterial | R3SoftBodyMaterial |
| Plain configuration data; initialize defaults, edit, then apply. | |
| typedef struct R3SoftRecoverySettings | R3SoftRecoverySettings |
| Plain configuration data; initialize defaults, edit, then apply. | |
| typedef struct R3SoftFemParameters | R3SoftFemParameters |
| Plain configuration data; initialize defaults, edit, then apply. | |
| typedef struct R3SoftBodiesSettings | R3SoftBodiesSettings |
| Plain configuration data; initialize defaults, edit, then apply. | |
| typedef struct R3SoftEdgeSoftness | R3SoftEdgeSoftness |
| Spring-coefficient override for one soft-body edge. | |
| typedef struct R3SoftEdgeSoftnessView | R3SoftEdgeSoftnessView |
| Borrowed elements; count counts elements. | |
| typedef struct R3SoftEdgeTear | R3SoftEdgeTear |
| Tear-resistance override for one soft-body edge. | |
| typedef struct R3SoftEdgeTearView | R3SoftEdgeTearView |
| Borrowed elements; count counts elements. | |
| typedef struct R3SoftBodyDescView | R3SoftBodyDescView |
| Borrowed array of soft-body descriptions. | |
| typedef struct R3SoftBodyDesc | R3SoftBodyDesc |
| Copyable recipe, not an owned procedural builder. | |
| typedef struct R3SoftBodyHandle | R3SoftBodyHandle |
| Copyable non-owning handle: world pointer plus entity index and generation. | |
| typedef struct R3SoftMeshBindingDesc | R3SoftMeshBindingDesc |
| Non-owning deformable binding description. | |
| typedef struct R3SoftClusterSplit | R3SoftClusterSplit |
| Cluster and proxy remapping after a soft-body split. | |
| typedef struct R3SoftJointMove | R3SoftJointMove |
| Impulse-joint movement between rigid proxies after tearing. | |
| typedef struct R3SoftMeshId | R3SoftMeshId |
| Stable identity of a live mesh within one soft body; matches Rapier's SoftMeshId. | |
| typedef struct R3SoftMeshInfo | R3SoftMeshInfo |
| Mesh identity and rendering metadata. | |
Functions | |
| struct R3SoftBodyMaterial | r3DefaultSoftBodyMaterial (void) |
| Return native default soft body material. | |
| struct R3SoftRecoverySettings | r3DefaultSoftRecoverySettings (void) |
| Return native default soft recovery settings. | |
| struct R3SoftFemParameters | r3DefaultSoftFemParameters (void) |
| Return native default soft fem parameters. | |
| struct R3SoftBodiesSettings | r3DefaultSoftBodiesSettings (void) |
| Return native default soft bodies settings. | |
| struct R3SoftBodyDesc | r3DefaultSoftBodyDesc (void) |
| Return native default soft body desc. | |
| struct R3SoftBodyHandle | r3InsertSoftBody (struct R3World *world, const struct R3SoftBodyDesc *desc) |
| Consumes no caller-owned resources. | |
| struct R3SoftMeshBindingDesc | r3DefaultSoftMeshBindingDesc (void) |
| Return native default soft mesh binding desc. | |
| size_t | r3SoftBodyCount (const struct R3World *world) |
| Return the number of soft body objects in the world. | |
| size_t | r3SoftBodyHandles (const struct R3World *world, struct R3SoftBodyHandle *buffer, size_t capacity) |
| Copy entity handles. | |
| R3Bool | r3SoftBody_Contains (struct R3SoftBodyHandle handle) |
| Test whether the live world contains this soft body handle. | |
| R3Status | r3SoftBodiesSetResweepStrain (struct R3World *world, R3Real value) |
| Set the world setting documented by R3SoftBodiesSettings::resweepStrain. | |
| R3Real | r3SoftBodiesResweepStrain (const struct R3World *world) |
| Return the world setting documented by R3SoftBodiesSettings::resweepStrain. | |
| R3Status | r3SoftBodiesSetContactStiffening (struct R3World *world, R3Real value) |
| Set the world setting documented by R3SoftBodiesSettings::contactStiffening. | |
| R3Real | r3SoftBodiesContactStiffening (const struct R3World *world) |
| Return the world setting documented by R3SoftBodiesSettings::contactStiffening. | |
| R3Status | r3SoftBodiesSetMaxExtraSubsteps (struct R3World *world, size_t value) |
| Set the world setting documented by R3SoftBodiesSettings::maxExtraSubsteps. | |
| size_t | r3SoftBodiesMaxExtraSubsteps (const struct R3World *world) |
| Return the world setting documented by R3SoftBodiesSettings::maxExtraSubsteps. | |
| R3Status | r3RecoverySetAuthoredVelocityMargin (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::authoredVelocityMargin. | |
| R3Status | r3RecoverySetEdgeSpeculation (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::edgeSpeculation. | |
| R3Status | r3RecoverySetInvertedCellDetection (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::invertedCellDetection. | |
| R3Status | r3RecoverySetSelfCrossingDetection (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::selfCrossingDetection. | |
| R3Status | r3RecoverySetDetectionMotionGating (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::detectionMotionGating. | |
| R3Status | r3RecoverySetCrossBodyDetection (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::crossBodyDetection. | |
| R3Status | r3RecoverySetSelfStandDown (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::selfStandDown. | |
| R3Status | r3RecoverySetCrossBodyExpelGate (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::crossBodyExpelGate. | |
| R3Status | r3RecoverySetEdgeStandDown (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::edgeStandDown. | |
| R3Status | r3RecoverySetCrossingRepulsion (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::crossingRepulsion. | |
| R3Status | r3RecoverySetCrossingRepulsionGuide (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::crossingRepulsionGuide. | |
| R3Status | r3RecoverySetCrossingRepulsionSelfGuide (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::crossingRepulsionSelfGuide. | |
| R3Status | r3RecoverySetRecoveryPace (struct R3World *world, R3Real value) |
| Set the world setting documented by R3SoftRecoverySettings::recoveryPace. | |
| R3Status | r3RecoverySetOverlapConstraints (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::overlapConstraints. | |
| R3Status | r3RecoverySetOverlapRigid (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::overlapRigid. | |
| R3Status | r3RecoverySetOverlapSkipSelfTangled (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::overlapSkipSelfTangled. | |
| R3Status | r3RecoverySetOverlapEdgeStandDown (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::overlapEdgeStandDown. | |
| R3Status | r3RecoverySetOverlapConstraintPace (struct R3World *world, R3Real value) |
| Set the world setting documented by R3SoftRecoverySettings::overlapConstraintPace. | |
| R3Status | r3RecoverySetOverlapSkinVolume (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::overlapSkinVolume. | |
| R3Status | r3RecoverySetOverlapKeptDepth (struct R3World *world, R3Real value) |
| Set the world setting documented by R3SoftRecoverySettings::overlapKeptDepth. | |
| R3Status | r3RecoverySetOverlapSelfRegions (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::overlapSelfRegions. | |
| R3Status | r3RecoverySetOverlapNormalPush (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::overlapNormalPush. | |
| R3Status | r3RecoverySetOverlapMultiVolume (struct R3World *world, R3Bool value) |
| Set the world setting documented by R3SoftRecoverySettings::overlapMultiVolume. | |
| R3Status | r3RecoverySetOverlapProgressMargin (struct R3World *world, R3Real value) |
| Set the world setting documented by R3SoftRecoverySettings::overlapProgressMargin. | |
| R3Status | r3FemSetLinearTolerance (struct R3World *world, R3Real value) |
| Set the world setting documented by R3SoftFemParameters::linearTolerance. | |
| R3Status | r3FemSetMaxLinearIterations (struct R3World *world, size_t value) |
| Set the world setting documented by R3SoftFemParameters::maxLinearIterations. | |
| R3Status | r3FemSetMaxDenseDofs (struct R3World *world, size_t value) |
| Set the world setting documented by R3SoftFemParameters::maxDenseDofs. | |
| R3Status | r3RemoveSoftBody (struct R3SoftBodyHandle handle) |
| Remove a soft body and its associated simulation objects. | |
| R3Status | r3SoftBody_WakeUp (struct R3SoftBodyHandle handle) |
| Wake the soft body and its rigid proxies. | |
| R3Status | r3FreeSoftBodyTearEvent (struct R3SoftBodyTearEvent *event) |
| Release an owned soft body tear event. | |
| struct R3SoftBodyHandle | r3SoftBodyTearEvent_SoftBody (const struct R3SoftBodyTearEvent *event) |
| Return the source soft-body handle for this tear event. | |
| size_t | r3SoftBodyTearEvent_Bodies (const struct R3SoftBodyTearEvent *event, struct R3SoftBodyHandle *buffer, size_t capacity) |
| Copy the soft bodies the torn body is in after the tear, the one keeping the handle first: the torn body alone when nothing was split off. | |
| struct R3ParticleDestination | r3SoftBodyTearEvent_ParticleDestination (const struct R3SoftBodyTearEvent *event, uint32_t particle) |
| Return the destination body and particle index for an original particle. | |
| size_t | r3SoftBodyTearEvent_TornEdges (const struct R3SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity) |
| Flat indices; element arity follows the corresponding Rust event field. | |
| size_t | r3SoftBodyTearEvent_TornCells (const struct R3SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity) |
| Flat indices; element arity follows the corresponding Rust event field. | |
| size_t | r3SoftBodyTearEvent_RemovedEdges (const struct R3SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity) |
| Flat indices; element arity follows the corresponding Rust event field. | |
| size_t | r3SoftBodyTearEvent_SplitParticles (const struct R3SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity) |
| Flat indices; element arity follows the corresponding Rust event field. | |
| size_t | r3SoftBodyTearEvent_InsertedParticles (const struct R3SoftBodyTearEvent *event, uint32_t *buffer, size_t capacity) |
| Flat indices; element arity follows the corresponding Rust event field. | |
| size_t | r3SoftBodyTearEvent_PieceParticles (const struct R3SoftBodyTearEvent *event, size_t piece_index, uint32_t *buffer, size_t capacity) |
| Copy the particles of the piece_index-th body of r3SoftBodyTearEvent_Bodies, as indices in the torn body after the tear (the indices the other event fields use); entry i is the piece's particle i. | |
| size_t | r3SoftBodyTearEvent_Clusters (const struct R3SoftBodyTearEvent *event, struct R3SoftClusterSplit *buffer, size_t capacity) |
| Copy cluster-to-piece and rigid-proxy remapping records. | |
| size_t | r3SoftBodyTearEvent_MovedJoints (const struct R3SoftBodyTearEvent *event, struct R3SoftJointMove *buffer, size_t capacity) |
| Copy impulse-joint remapping records produced by the tear. | |
| struct R3SoftBodyTearEvent * | r3SoftBody_Tear (struct R3SoftBodyHandle handle, const uint32_t *edges, size_t edge_count, const uint32_t *cells, size_t cell_count) |
| Tear the selected edges and return an owned remapping event. | |
| uint32_t | r3SoftBody_AddCluster (struct R3SoftBodyHandle handle, const uint32_t *particles, size_t count) |
| Create a rigid proxy cluster from the supplied particle indices and return its cluster index. | |
| R3Status | r3SoftBody_RemoveCluster (struct R3SoftBodyHandle handle, uint32_t cluster) |
| Remove the selected cluster and its rigid proxy. | |
| struct R3OptionalParticleDestination | r3SoftBodyTearEvent_TryParticleDestination (const struct R3SoftBodyTearEvent *event, uint32_t particle) |
| Optional particle destination after a tear. | |
| struct R3SoftBodyTearEvent * | r3CutSoftBody (struct R3SoftBodyHandle handle, const struct R3Vector *blade) |
| Cut using DIM points (a segment in 2D, triangle in 3D). | |
| struct R3Vector | r3SoftBody_ParticlePosition (struct R3SoftBodyHandle handle, size_t index) |
| Return the world-space position of the indexed particle. | |
| size_t | r3SoftBody_ParticlePositions (struct R3SoftBodyHandle handle, struct R3Vector *buffer, size_t capacity) |
| Copy world-space particle positions. | |
| struct R3SoftBodyMaterial | r3SoftBody_Material (struct R3SoftBodyHandle handle) |
| Return a copy of the soft body material parameters. | |
| R3Status | r3SoftBody_SetParticlePosition (struct R3SoftBodyHandle handle, size_t index, struct R3Vector value) |
| Set the world-space position of the indexed particle. | |
| R3Status | r3SoftBody_SetMaterial (struct R3SoftBodyHandle handle, const struct R3SoftBodyMaterial *data) |
| Copy material parameters into the soft body. | |
| R3Status | r3SoftBody_AddParticleForce (struct R3SoftBodyHandle handle, size_t index, struct R3Vector value, R3Bool wake_up) |
| Add a world-space force to the indexed particle. | |
| R3Status | r3SoftBodyDesc_SetParticles (struct R3SoftBodyDesc *desc, struct R3VectorView positions) |
| Select an explicit particle recipe and borrow its positions. | |
| R3Status | r3SoftBodyDesc_SetSurfaceMesh (struct R3SoftBodyDesc *desc, struct R3VectorView vertices, R3SurfaceElementView elements) |
| Select a surface recipe and borrow its vertices and elements. | |
| R3Status | r3SoftBodyDesc_SetAppended (struct R3SoftBodyDesc *desc, struct R3SoftBodyDescView view) |
| Borrow descriptions to merge into this body (see R3SoftBodyDesc::appended); preserve all other fields. | |
| R3Status | r3SoftBodyDesc_SetAddedEdges (struct R3SoftBodyDesc *desc, struct R3EdgeView view) |
| Borrow structural edges added after appending (see R3SoftBodyDesc::addedEdges); preserve all other fields. | |
| R3Status | r3SoftBodyDesc_SetSkin (struct R3SoftBodyDesc *desc, struct R3VectorView vertices, R3SurfaceElementView elements) |
| Borrow skin geometry. | |
| R3Status | r3SoftBodyDesc_SetMasses (struct R3SoftBodyDesc *desc, struct R3RealView view) |
| Borrow masses; preserve all other fields. | |
| R3Status | r3SoftBodyDesc_SetPinnedParticles (struct R3SoftBodyDesc *desc, struct R3IndexView view) |
| Borrow pinned particles; preserve all other fields. | |
| R3Status | r3SoftBodyDesc_SetEdges (struct R3SoftBodyDesc *desc, struct R3EdgeView view) |
| Borrow edges; preserve all other fields. | |
| R3Status | r3SoftBodyDesc_SetBendEdges (struct R3SoftBodyDesc *desc, struct R3EdgeView view) |
| Borrow bend edges; preserve all other fields. | |
| R3Status | r3SoftBodyDesc_SetCells (struct R3SoftBodyDesc *desc, R3CellView view) |
| Borrow cells; preserve all other fields. | |
| R3Status | r3SoftBodyDesc_SetSurface (struct R3SoftBodyDesc *desc, R3SurfaceElementView view) |
| Borrow surface; preserve all other fields. | |
| R3Status | r3SoftBodyDesc_SetTensionOnlyEdges (struct R3SoftBodyDesc *desc, struct R3IndexView view) |
| Borrow tension only edges; preserve all other fields. | |
| R3Status | r3SoftBodyDesc_SetDihedrals (struct R3SoftBodyDesc *desc, struct R3DihedralView view) |
| Borrow dihedrals; preserve all other fields. | |
| R3Status | r3SoftBodyDesc_SetWire (struct R3SoftBodyDesc *desc, struct R3EdgeView view) |
| Borrow wire; preserve all other fields. | |
| struct R3SoftBodyDesc | r3RopeSoftBodyDesc (struct R3Vector a, struct R3Vector b, size_t particles) |
| Return a rope recipe with particles evenly spaced from a to b, including both endpoints. | |
| struct R3SoftBodyDesc | r3CuboidSoftBodyDesc (struct R3Vector center, struct R3Vector half_extents, size_t nx, size_t ny, size_t nz) |
| Return a solid box recipe on an nx by ny by nz particle grid, subdivided into tetrahedra. | |
| struct R3SoftBodyDesc | r3ClothSoftBodyDesc (struct R3Vector origin, struct R3Vector du, struct R3Vector dv, size_t nu, size_t nv) |
| Return a cloth recipe with nu by nv particles at origin + i * du + j * dv. | |
| struct R3SoftBodyDesc | r3ClothAnisotropicSoftBodyDesc (struct R3Vector origin, struct R3Vector du, struct R3Vector dv, size_t nu, size_t nv, struct R3SpringCoefficients warp, struct R3SpringCoefficients weft, struct R3SpringCoefficients shear) |
| Return a cloth recipe like r3ClothSoftBodyDesc whose edges along du (warp), along dv (weft) and diagonal (shear) get their own softness; the material's bendSoftness still applies to the bending edges. | |
| struct R3SoftBodyDesc | r3SphereSoftBodyDesc (struct R3Vector center, R3Real radius, uint32_t subdivisions) |
| Return a hollow icosphere recipe with the specified refinement levels and volume preservation. | |
| struct R3SoftBodyDesc | r3ClothTubeSoftBodyDesc (struct R3Vector origin, struct R3Vector axis, R3Real radius_start, R3Real radius_end, size_t num_around, size_t num_along) |
| Return a cloth tube recipe from origin to origin + axis with num_along rings of num_around particles; radius varies linearly between the ends. | |
| struct R3SoftBodyDesc | r3VolumetricSoftBodyDesc (struct R3VectorView vertices, R3SurfaceElementView surface, struct R3VolumeMeshParameters parameters) |
| Initializes a borrowed meshing recipe. | |
| struct R3SoftBodyMaterial | r3UniformSoftBodyMaterial (struct R3SpringCoefficients value) |
| Returns a material with the same softness for each constraint family. | |
| size_t | r3SoftBodyDesc_ParticlePositions (const struct R3SoftBodyDesc *desc, struct R3Vector *buffer, size_t capacity) |
| Copies generated particle positions into caller-owned storage; no persistent builder. | |
| size_t | r3SoftBodyDesc_CellIndices (const struct R3SoftBodyDesc *desc, uint32_t *buffer, size_t capacity) |
| Copies generated cell indices into caller-owned storage. | |
| struct R3Vector | r3SoftBody_ParticleVelocity (struct R3SoftBodyHandle handle, size_t index) |
| Return the world-space velocity of the indexed particle. | |
| uint32_t | r3SoftBody_Solver (struct R3SoftBodyHandle handle) |
| Return the solver simulating the soft body's elasticity (R3_SOFT_SOLVER_*). | |
| R3Status | r3SoftBody_SetClusterEdgeSoftness (struct R3SoftBodyHandle handle, uint32_t cluster, const struct R3SpringCoefficients *softness) |
| Override the softness of every structural or bending edge fully contained in a live cluster: regional stiffness for cloth and ropes. | |
| R3Status | r3SoftBody_ApplyImpulseAtPoint (struct R3SoftBodyHandle handle, struct R3Vector impulse, struct R3Vector point, R3Real falloff_radius, R3Bool wake_up) |
| Apply a world-space impulse to every free particle within falloff_radius of the world-space point, scaled linearly from 1 at the point to 0 at that radius and divided by the particle's mass. | |
| R3Status | r3SoftBody_ApplyRadialImpulse (struct R3SoftBodyHandle handle, struct R3Vector center, R3Real magnitude, R3Real falloff_radius, R3Bool wake_up) |
| Apply an impulse of the given magnitude pointing away from the world-space center to every free particle within falloff_radius, scaled linearly from 1 at the center to 0 at that radius and divided by the particle's mass. | |
| R3Status | r3SoftBody_ResetPlasticity (struct R3SoftBodyHandle handle) |
| Undo every permanent (plastic) deformation: edge rest lengths, dihedral rest angles, cell rest shapes and particle rest positions return to their creation state. | |
| R3Status | r3SoftBody_TearEdge (struct R3SoftBodyHandle handle, size_t index) |
| Mark the indexed edge as torn. | |
| R3Status | r3SoftBody_TearCell (struct R3SoftBodyHandle handle, size_t index) |
| Mark the indexed cell as torn. | |
| size_t | r3SoftBodyTearEvent_PieceCount (const struct R3SoftBodyTearEvent *event) |
| Return the number of soft bodies the torn body is in after the tear: the length of r3SoftBodyTearEvent_Bodies, and the exclusive bound of the piece_index of r3SoftBodyTearEvent_PieceParticles. | |
| R3Bool | r3RecoveryAuthoredVelocityMargin (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::authoredVelocityMargin. | |
| R3Bool | r3RecoveryEdgeSpeculation (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::edgeSpeculation. | |
| R3Bool | r3RecoveryInvertedCellDetection (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::invertedCellDetection. | |
| R3Bool | r3RecoverySelfCrossingDetection (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::selfCrossingDetection. | |
| R3Bool | r3RecoveryDetectionMotionGating (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::detectionMotionGating. | |
| R3Bool | r3RecoveryCrossBodyDetection (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::crossBodyDetection. | |
| R3Bool | r3RecoverySelfStandDown (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::selfStandDown. | |
| R3Bool | r3RecoveryCrossBodyExpelGate (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::crossBodyExpelGate. | |
| R3Bool | r3RecoveryEdgeStandDown (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::edgeStandDown. | |
| R3Bool | r3RecoveryCrossingRepulsion (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::crossingRepulsion. | |
| R3Bool | r3RecoveryCrossingRepulsionGuide (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::crossingRepulsionGuide. | |
| R3Bool | r3RecoveryCrossingRepulsionSelfGuide (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::crossingRepulsionSelfGuide. | |
| R3Real | r3RecoveryRecoveryPace (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::recoveryPace. | |
| R3Bool | r3RecoveryOverlapConstraints (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::overlapConstraints. | |
| R3Bool | r3RecoveryOverlapRigid (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::overlapRigid. | |
| R3Bool | r3RecoveryOverlapSkipSelfTangled (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::overlapSkipSelfTangled. | |
| R3Bool | r3RecoveryOverlapEdgeStandDown (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::overlapEdgeStandDown. | |
| R3Real | r3RecoveryOverlapConstraintPace (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::overlapConstraintPace. | |
| uint32_t | r3RecoveryOverlapPatchConstraints (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::overlapPatchConstraints. | |
| R3Status | r3RecoverySetOverlapPatchConstraints (struct R3World *world, uint32_t value) |
| Set the world setting documented by R3SoftRecoverySettings::overlapPatchConstraints. | |
| R3Bool | r3RecoveryOverlapSkinVolume (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::overlapSkinVolume. | |
| R3Real | r3RecoveryOverlapKeptDepth (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::overlapKeptDepth. | |
| R3Bool | r3RecoveryOverlapSelfRegions (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::overlapSelfRegions. | |
| R3Bool | r3RecoveryOverlapNormalPush (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::overlapNormalPush. | |
| R3Bool | r3RecoveryOverlapMultiVolume (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::overlapMultiVolume. | |
| uint32_t | r3RecoveryOverlapSplit (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::overlapSplit. | |
| R3Status | r3RecoverySetOverlapSplit (struct R3World *world, uint32_t value) |
| Set the world setting documented by R3SoftRecoverySettings::overlapSplit. | |
| uint32_t | r3RecoveryOverlapPatience (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::overlapPatience. | |
| R3Status | r3RecoverySetOverlapPatience (struct R3World *world, uint32_t value) |
| Set the world setting documented by R3SoftRecoverySettings::overlapPatience. | |
| R3Real | r3RecoveryOverlapProgressMargin (const struct R3World *world) |
| Return the world setting documented by R3SoftRecoverySettings::overlapProgressMargin. | |
| R3Real | r3FemLinearTolerance (const struct R3World *world) |
| Return the world setting documented by R3SoftFemParameters::linearTolerance. | |
| size_t | r3FemMaxLinearIterations (const struct R3World *world) |
| Return the world setting documented by R3SoftFemParameters::maxLinearIterations. | |
| size_t | r3FemMaxDenseDofs (const struct R3World *world) |
| Return the world setting documented by R3SoftFemParameters::maxDenseDofs. | |
| size_t | r3SoftBody_NumParticles (struct R3SoftBodyHandle handle) |
| Return the soft body particle count. | |
| uint32_t | r3SoftBody_TopologyVersion (struct R3SoftBodyHandle handle) |
| Return a counter that changes when particle connectivity changes; use it to invalidate mesh caches. | |
| R3Real | r3SoftBody_Mass (struct R3SoftBodyHandle handle) |
| Return the soft body mass. | |
| R3Real | r3SoftBody_Volume (struct R3SoftBodyHandle handle) |
| Return the soft body current volume. | |
| R3Real | r3SoftBody_RestVolume (struct R3SoftBodyHandle handle) |
| Return the soft body undeformed volume. | |
| R3Real | r3SoftBody_VolumeFactor (struct R3SoftBodyHandle handle) |
| Return the soft body target volume multiplier. | |
| struct R3Vector | r3SoftBody_CenterOfMass (struct R3SoftBodyHandle handle) |
| Return the soft body world-space center of mass. | |
| struct R3RigidBodyHandle | r3SoftBody_RootBody (struct R3SoftBodyHandle handle) |
| Return the soft body root rigid-proxy handle. | |
| R3Bool | r3SoftBody_IsEnabled (struct R3SoftBodyHandle handle) |
| Return whether the soft body is enabled. | |
| R3Bool | r3SoftBody_IsSleeping (struct R3SoftBodyHandle handle) |
| Return whether the soft body is sleeping. | |
| size_t | r3SoftBody_ParticleVelocities (struct R3SoftBodyHandle handle, struct R3Vector *buffer, size_t capacity) |
| Copy world-space particle velocities. | |
| size_t | r3SoftBody_Edges (struct R3SoftBodyHandle handle, uint32_t *buffer, size_t capacity) |
| Copy flattened edge vertex indices. | |
| size_t | r3SoftBody_Cells (struct R3SoftBodyHandle handle, uint32_t *buffer, size_t capacity) |
| Copy flattened cell vertex indices. | |
| size_t | r3SoftBody_Boundary (struct R3SoftBodyHandle handle, uint32_t *buffer, size_t capacity) |
| Copy flattened boundary element indices. | |
| size_t | r3SoftBody_Pieces (struct R3SoftBodyHandle handle, struct R3SoftBodyHandle *buffer, size_t capacity) |
| Copy piece identifiers. | |
| R3Status | r3SoftBody_SetParticleVelocity (struct R3SoftBodyHandle handle, size_t index, struct R3Vector value) |
| Set the soft body particle world-space velocity. | |
| R3Status | r3SoftBody_SetParticleKinematicTarget (struct R3SoftBodyHandle handle, size_t index, struct R3Vector value) |
| Set the next world-space target position of a pinned particle. | |
| R3Status | r3SoftBody_SetParticlePinned (struct R3SoftBodyHandle handle, size_t index, R3Bool value) |
| Enable or disable pinning the particle for the soft body. | |
| R3Status | r3SoftBody_ApplyParticleImpulse (struct R3SoftBodyHandle handle, size_t index, struct R3Vector value, R3Bool wake_up) |
| Apply a world-space impulse to one particle. | |
| R3Status | r3SoftBody_AddForce (struct R3SoftBodyHandle handle, struct R3Vector value, R3Bool wake_up) |
| Accumulate a world-space force; it persists until reset. | |
| R3Status | r3SoftBody_ApplyImpulse (struct R3SoftBodyHandle handle, struct R3Vector value, R3Bool wake_up) |
| Add the same world-space velocity change to every free particle: the whole body is kicked at the same velocity, whatever the particle masses (the value is not divided by the mass). | |
| R3Status | r3SoftBody_ResetForces (struct R3SoftBodyHandle handle, R3Bool wake_up) |
| Clear accumulated user forces. | |
| R3Status | r3SoftBody_SetEnabled (struct R3SoftBodyHandle handle, R3Bool value) |
| Enable or disable the soft body. | |
| R3Status | r3SoftBody_SetVolumeFactor (struct R3SoftBodyHandle handle, R3Real value) |
| Set the soft body target volume multiplier. | |
| R3Status | r3SoftBody_AttachParticle (struct R3SoftBodyHandle handle, size_t index, struct R3RigidBodyHandle rigid_body) |
| Attach a particle to a rigid body by a two-way point-to-point constraint (unlike pinning). | |
| R3Bool | r3SoftBody_DetachParticle (struct R3SoftBodyHandle handle, size_t index) |
| Detach a particle from every rigid body it was attached to with r3SoftBody_AttachParticle. | |
| size_t | r3SoftBody_Clusters (struct R3SoftBodyHandle handle, uint32_t *buffer, size_t capacity) |
| Copy cluster indices. | |
| struct R3RigidBodyHandle | r3SoftBody_ClusterProxy (struct R3SoftBodyHandle handle, uint32_t cluster) |
| Return the rigid proxy for the selected cluster. | |
| size_t | r3SoftBody_ClusterParticles (struct R3SoftBodyHandle handle, uint32_t cluster, uint32_t *buffer, size_t capacity) |
| Copy particle indices for a cluster. | |
| R3Status | r3SoftBody_SetClusterPinned (struct R3SoftBodyHandle handle, uint32_t cluster, R3Bool value) |
| Enable or disable pinning the cluster for the soft body. | |
| R3Status | r3SoftBody_SetClusterKinematicTarget (struct R3SoftBodyHandle handle, uint32_t cluster, struct R3Pose value) |
| Set the next world-space target pose of a pinned cluster. | |
| R3Status | r3SoftBody_SetClusterShapeMatchingEnabled (struct R3SoftBodyHandle handle, uint32_t cluster, R3Bool value) |
| Enable or disable using cluster shape matching for the soft body. | |
| R3Status | r3SoftBody_SetClusterStiffnessScale (struct R3SoftBodyHandle handle, uint32_t cluster, R3Real value) |
| Scale the material stiffness (Young modulus) of every cell fully contained in a live cluster: regional materials without a separate body. | |
| R3Status | r3SoftBody_SetClusterTearResistance (struct R3SoftBodyHandle handle, uint32_t cluster, R3Real value) |
| Set the soft body cluster tear-resistance multiplier. | |
| size_t | r3SoftBody_Meshes (struct R3SoftBodyHandle handle, struct R3SoftMeshInfo *buffer, size_t capacity) |
| Copy collision mesh metadata. | |
| size_t | r3SoftBody_MeshVerticesById (struct R3SoftBodyHandle handle, struct R3SoftMeshId id, struct R3Vector *buffer, size_t capacity) |
| Copy world-space vertices for a mesh ID. | |
| size_t | r3SoftBody_MeshIndicesById (struct R3SoftBodyHandle handle, struct R3SoftMeshId id, uint32_t *buffer, size_t capacity) |
| Copy flattened indices for a mesh ID. | |
| size_t | r3SoftBody_MeshColliders (struct R3SoftBodyHandle handle, struct R3ColliderHandle *buffer, size_t capacity) |
| Copy collision mesh collider handles. | |
| size_t | r3SoftBody_MeshVertices (struct R3SoftBodyHandle handle, struct R3ColliderHandle collider, struct R3Vector *buffer, size_t capacity) |
| Copy world-space collision mesh vertices. | |
| size_t | r3SoftBody_MeshIndices (struct R3SoftBodyHandle handle, struct R3ColliderHandle collider, uint32_t *buffer, size_t capacity) |
| Copy flattened collision mesh indices. | |
| size_t | r3SoftBody_MeshArity (struct R3SoftBodyHandle handle, struct R3ColliderHandle collider) |
| Return indices per collision-mesh element (2 for segments, 3 for triangles). | |
| uint32_t | r3SoftBody_MeshTopologyVersion (struct R3SoftBodyHandle handle, struct R3ColliderHandle collider) |
| Return the selected collision mesh topology revision for cache invalidation. | |
| R3Status | r3SoftBody_SetSolver (struct R3SoftBodyHandle handle, uint32_t solver) |
| Set the soft body soft solver kind (R3_SOFT_SOLVER_*). | |
| R3Status | r3SoftBody_SetClusterShapeMatchingTarget (struct R3SoftBodyHandle handle, uint32_t cluster, const struct R3Pose *target) |
| Set the soft body cluster shape-matching target pose. | |
| R3Status | r3SoftBody_SetEdgeTearResistance (struct R3SoftBodyHandle handle, size_t index, R3Real resistance) |
| Set the soft body edge tear-resistance multiplier. | |
| R3Bool | r3SoftBody_MeshIsClosed (struct R3SoftBodyHandle handle, struct R3ColliderHandle collider) |
| Return whether the selected collision mesh is closed. | |
| struct R3SoftBodyHandle | r3RigidBody_SoftBody (struct R3RigidBodyHandle handle) |
| Return the associated soft-body handle, or an invalid handle if this is not a soft proxy. | |
| R3Bool | r3RigidBody_IsSoftFrame (struct R3RigidBodyHandle handle) |
| Return whether the rigid body is a soft-body proxy. | |
| R3Status | r3SoftBody_ValidateHandle (struct R3SoftBodyHandle handle) |
| Validate the index and generation in the live owning world. | |
Particle recipes, materials, clusters, deformable meshes, and tearing.
Mesh indices and particle indices can change after tearing; use topology versions and tear remapping events to maintain application data. FEM requires RAPIER_FEM.
| #define R3_SOFT_BINDING_DIRECT 1 |
Soft-body selector: binding direct.
| #define R3_SOFT_BINDING_DIRECT_BY_POSITION 2 |
Soft-body selector: binding direct by position.
| #define R3_SOFT_BINDING_SKINNED 0 |
Soft-body selector: binding skinned.
| #define R3_SOFT_CELL_COROTATIONAL 1 |
Corotational elastic cell model.
| #define R3_SOFT_CELL_NEO_HOOKEAN 2 |
Neo-Hookean elastic cell model.
| #define R3_SOFT_CELL_VOLUME 0 |
Cell model that constrains volume without elastic shear response.
| #define R3_SOFT_DESC_CLOTH 3 |
Soft-body selector: desc cloth.
| #define R3_SOFT_DESC_CLOTH_ANISOTROPIC 12 |
Soft-body selector: cloth with separate warp, weft and shear softness (3D).
| #define R3_SOFT_DESC_CLOTH_TUBE 8 |
Soft-body selector: desc cloth tube.
| #define R3_SOFT_DESC_CUBOID 4 |
Soft-body selector: desc cuboid.
| #define R3_SOFT_DESC_DISK 6 |
Soft-body selector: desc disk.
| #define R3_SOFT_DESC_GRID 2 |
Soft-body selector: desc grid.
| #define R3_SOFT_DESC_PARTICLES 0 |
Soft-body selector: desc particles.
| #define R3_SOFT_DESC_ROPE 1 |
Soft-body selector: desc rope.
| #define R3_SOFT_DESC_SPHERE 7 |
Soft-body selector: desc sphere.
| #define R3_SOFT_DESC_SURFACE 5 |
Soft-body selector: desc surface.
| #define R3_SOFT_DESC_VOLUMETRIC 9 |
Soft-body selector: desc volumetric.
| #define R3_SOFT_EDGE_PLASTIC_FLOW_BOTH 0 |
Edge plastic flow (R3SoftBodyMaterial::edgePlasticFlow): both a squeeze and a stretch set.
| #define R3_SOFT_EDGE_PLASTIC_FLOW_COMPRESSION 1 |
Edge plastic flow: only a squeeze sets; a stretched edge springs back.
| #define R3_SOFT_EDGE_PLASTIC_FLOW_TENSION 2 |
Edge plastic flow: only a stretch sets; a squeezed edge springs back.
| #define R3_SOFT_FRAME 4 |
Read-only body type of soft-body cluster proxies; cannot be used to construct a rigid body.
| #define R3_SOFT_PATCH_CONSTRAINTS_ALONG_NORMAL 2 |
Overlap patch constraints: align them with the overlap normal.
| #define R3_SOFT_PATCH_CONSTRAINTS_KEEP 0 |
Overlap patch constraints (R3SoftRecoverySettings::overlapPatchConstraints): keep them.
| #define R3_SOFT_PATCH_CONSTRAINTS_STAND_DOWN 1 |
Overlap patch constraints: stand them down inside the patch.
| #define R3_SOFT_SOLVER_CONSTRAINTS 0 |
Use the constraint-based soft-body solver.
| #define R3_SOFT_SOLVER_FEM 1 |
Use the finite-element solver; requires RAPIER_FEM.
| typedef struct R3SoftBodiesSettings R3SoftBodiesSettings |
Plain configuration data; initialize defaults, edit, then apply.
No destructor.
| typedef struct R3SoftBodyDesc R3SoftBodyDesc |
Copyable recipe, not an owned procedural builder.
Initialize before editing. All array views borrow caller data until build/insert returns; counts for topology arrays are element counts (edges, triangles, or tetrahedra). Nonempty topology overrides the generator's topology. Zero counts retain it. Generator inputs: a/b are rope ends or center/half-extents; cloth uses a/du/dv. R3_SOFT_DESC_POLYGON reads positions; R3_SOFT_DESC_TRIMESH reads positions and cells (its triangles become edges and a boundary, not cells).
| typedef struct R3SoftBodyDescView R3SoftBodyDescView |
Borrowed array of soft-body descriptions.
count counts descriptions. Data must remain live through the build/insert call that reads the description. NULL is permitted only when count is zero.
| typedef struct R3SoftBodyHandle R3SoftBodyHandle |
Copyable non-owning handle: world pointer plus entity index and generation.
The world must remain alive throughout every use. Copying does not retain it. UINT32_MAX/UINT32_MAX with a NULL world is invalid.
| typedef struct R3SoftBodyMaterial R3SoftBodyMaterial |
Plain configuration data; initialize defaults, edit, then apply.
No destructor.
| typedef struct R3SoftClusterSplit R3SoftClusterSplit |
Cluster and proxy remapping after a soft-body split.
| typedef struct R3SoftEdgeSoftness R3SoftEdgeSoftness |
Spring-coefficient override for one soft-body edge.
| typedef struct R3SoftEdgeSoftnessView R3SoftEdgeSoftnessView |
Borrowed elements; count counts elements.
Data must remain live through insertion.
| typedef struct R3SoftEdgeTear R3SoftEdgeTear |
Tear-resistance override for one soft-body edge.
| typedef struct R3SoftEdgeTearView R3SoftEdgeTearView |
Borrowed elements; count counts elements.
Data must remain live through insertion.
| typedef struct R3SoftFemParameters R3SoftFemParameters |
Plain configuration data; initialize defaults, edit, then apply.
No destructor.
| typedef struct R3SoftJointMove R3SoftJointMove |
Impulse-joint movement between rigid proxies after tearing.
| typedef struct R3SoftMeshBindingDesc R3SoftMeshBindingDesc |
Non-owning deformable binding description.
Direct particle indices are borrowed.
| typedef struct R3SoftMeshId R3SoftMeshId |
Stable identity of a live mesh within one soft body; matches Rapier's SoftMeshId.
| typedef struct R3SoftMeshInfo R3SoftMeshInfo |
Mesh identity and rendering metadata.
A render-only mesh has an invalid collider handle.
| typedef struct R3SoftRecoverySettings R3SoftRecoverySettings |
Plain configuration data; initialize defaults, edit, then apply.
No destructor.
| struct R3SoftBodyDesc r3ClothAnisotropicSoftBodyDesc | ( | struct R3Vector | origin, |
| struct R3Vector | du, | ||
| struct R3Vector | dv, | ||
| size_t | nu, | ||
| size_t | nv, | ||
| struct R3SpringCoefficients | warp, | ||
| struct R3SpringCoefficients | weft, | ||
| struct R3SpringCoefficients | shear ) |
Return a cloth recipe like r3ClothSoftBodyDesc whose edges along du (warp), along dv (weft) and diagonal (shear) get their own softness; the material's bendSoftness still applies to the bending edges.
The softness is stored in warpSoftness, weftSoftness and shearSoftness. Initializes a recipe without allocating. Geometry is validated during preview/insertion.
| struct R3SoftBodyDesc r3ClothSoftBodyDesc | ( | struct R3Vector | origin, |
| struct R3Vector | du, | ||
| struct R3Vector | dv, | ||
| size_t | nu, | ||
| size_t | nv ) |
Return a cloth recipe with nu by nv particles at origin + i * du + j * dv.
Initializes a recipe without allocating. Geometry is validated during preview/insertion.
| struct R3SoftBodyDesc r3ClothTubeSoftBodyDesc | ( | struct R3Vector | origin, |
| struct R3Vector | axis, | ||
| R3Real | radius_start, | ||
| R3Real | radius_end, | ||
| size_t | num_around, | ||
| size_t | num_along ) |
Return a cloth tube recipe from origin to origin + axis with num_along rings of num_around particles; radius varies linearly between the ends.
Initializes a recipe without allocating. Geometry is validated during preview/insertion.
| struct R3SoftBodyDesc r3CuboidSoftBodyDesc | ( | struct R3Vector | center, |
| struct R3Vector | half_extents, | ||
| size_t | nx, | ||
| size_t | ny, | ||
| size_t | nz ) |
Return a solid box recipe on an nx by ny by nz particle grid, subdivided into tetrahedra.
Initializes a recipe without allocating. Geometry is validated during preview/insertion.
| struct R3SoftBodyTearEvent * r3CutSoftBody | ( | struct R3SoftBodyHandle | handle, |
| const struct R3Vector * | blade ) |
Cut using DIM points (a segment in 2D, triangle in 3D).
A no-op returns a null event. The optional owned event must be freed with FreeSoftBodyTearEvent.
| struct R3SoftBodiesSettings r3DefaultSoftBodiesSettings | ( | void | ) |
Return native default soft bodies settings.
This POD value owns no resources.
| struct R3SoftBodyDesc r3DefaultSoftBodyDesc | ( | void | ) |
Return native default soft body desc.
This POD value owns no resources.
| struct R3SoftBodyMaterial r3DefaultSoftBodyMaterial | ( | void | ) |
Return native default soft body material.
This POD value owns no resources.
| struct R3SoftFemParameters r3DefaultSoftFemParameters | ( | void | ) |
Return native default soft fem parameters.
This POD value owns no resources.
| struct R3SoftMeshBindingDesc r3DefaultSoftMeshBindingDesc | ( | void | ) |
Return native default soft mesh binding desc.
This POD value owns no resources.
| struct R3SoftRecoverySettings r3DefaultSoftRecoverySettings | ( | void | ) |
Return native default soft recovery settings.
This POD value owns no resources.
Return the world setting documented by R3SoftFemParameters::linearTolerance.
| size_t r3FemMaxDenseDofs | ( | const struct R3World * | world | ) |
Return the world setting documented by R3SoftFemParameters::maxDenseDofs.
| size_t r3FemMaxLinearIterations | ( | const struct R3World * | world | ) |
Return the world setting documented by R3SoftFemParameters::maxLinearIterations.
Set the world setting documented by R3SoftFemParameters::linearTolerance.
Set the world setting documented by R3SoftFemParameters::maxDenseDofs.
Set the world setting documented by R3SoftFemParameters::maxLinearIterations.
| R3Status r3FreeSoftBodyTearEvent | ( | struct R3SoftBodyTearEvent * | event | ) |
Release an owned soft body tear event.
NULL is allowed. Do not pass borrowed pointers or free the object twice.
| struct R3SoftBodyHandle r3InsertSoftBody | ( | struct R3World * | world, |
| const struct R3SoftBodyDesc * | desc ) |
Consumes no caller-owned resources.
All borrowed arrays may be released on return.
Return the world setting documented by R3SoftRecoverySettings::authoredVelocityMargin.
Return the world setting documented by R3SoftRecoverySettings::crossBodyDetection.
Return the world setting documented by R3SoftRecoverySettings::crossBodyExpelGate.
Return the world setting documented by R3SoftRecoverySettings::crossingRepulsion.
Return the world setting documented by R3SoftRecoverySettings::crossingRepulsionGuide.
Return the world setting documented by R3SoftRecoverySettings::crossingRepulsionSelfGuide.
Return the world setting documented by R3SoftRecoverySettings::detectionMotionGating.
Return the world setting documented by R3SoftRecoverySettings::edgeSpeculation.
Return the world setting documented by R3SoftRecoverySettings::edgeStandDown.
Return the world setting documented by R3SoftRecoverySettings::invertedCellDetection.
Return the world setting documented by R3SoftRecoverySettings::overlapConstraintPace.
Return the world setting documented by R3SoftRecoverySettings::overlapConstraints.
Return the world setting documented by R3SoftRecoverySettings::overlapEdgeStandDown.
Return the world setting documented by R3SoftRecoverySettings::overlapKeptDepth.
Return the world setting documented by R3SoftRecoverySettings::overlapMultiVolume.
Return the world setting documented by R3SoftRecoverySettings::overlapNormalPush.
| uint32_t r3RecoveryOverlapPatchConstraints | ( | const struct R3World * | world | ) |
Return the world setting documented by R3SoftRecoverySettings::overlapPatchConstraints.
| uint32_t r3RecoveryOverlapPatience | ( | const struct R3World * | world | ) |
Return the world setting documented by R3SoftRecoverySettings::overlapPatience.
Return the world setting documented by R3SoftRecoverySettings::overlapProgressMargin.
Return the world setting documented by R3SoftRecoverySettings::overlapRigid.
Return the world setting documented by R3SoftRecoverySettings::overlapSelfRegions.
Return the world setting documented by R3SoftRecoverySettings::overlapSkinVolume.
Return the world setting documented by R3SoftRecoverySettings::overlapSkipSelfTangled.
| uint32_t r3RecoveryOverlapSplit | ( | const struct R3World * | world | ) |
Return the world setting documented by R3SoftRecoverySettings::overlapSplit.
Return the world setting documented by R3SoftRecoverySettings::recoveryPace.
Return the world setting documented by R3SoftRecoverySettings::selfCrossingDetection.
Return the world setting documented by R3SoftRecoverySettings::selfStandDown.
Set the world setting documented by R3SoftRecoverySettings::authoredVelocityMargin.
Set the world setting documented by R3SoftRecoverySettings::crossBodyDetection.
Set the world setting documented by R3SoftRecoverySettings::crossBodyExpelGate.
Set the world setting documented by R3SoftRecoverySettings::crossingRepulsion.
Set the world setting documented by R3SoftRecoverySettings::crossingRepulsionGuide.
Set the world setting documented by R3SoftRecoverySettings::crossingRepulsionSelfGuide.
Set the world setting documented by R3SoftRecoverySettings::detectionMotionGating.
Set the world setting documented by R3SoftRecoverySettings::edgeSpeculation.
Set the world setting documented by R3SoftRecoverySettings::edgeStandDown.
Set the world setting documented by R3SoftRecoverySettings::invertedCellDetection.
Set the world setting documented by R3SoftRecoverySettings::overlapConstraintPace.
Set the world setting documented by R3SoftRecoverySettings::overlapConstraints.
Set the world setting documented by R3SoftRecoverySettings::overlapEdgeStandDown.
Set the world setting documented by R3SoftRecoverySettings::overlapKeptDepth.
Set the world setting documented by R3SoftRecoverySettings::overlapMultiVolume.
Set the world setting documented by R3SoftRecoverySettings::overlapNormalPush.
Set the world setting documented by R3SoftRecoverySettings::overlapPatchConstraints.
Set the world setting documented by R3SoftRecoverySettings::overlapPatience.
Set the world setting documented by R3SoftRecoverySettings::overlapProgressMargin.
Set the world setting documented by R3SoftRecoverySettings::overlapRigid.
Set the world setting documented by R3SoftRecoverySettings::overlapSelfRegions.
Set the world setting documented by R3SoftRecoverySettings::overlapSkinVolume.
Set the world setting documented by R3SoftRecoverySettings::overlapSkipSelfTangled.
Set the world setting documented by R3SoftRecoverySettings::overlapSplit.
Set the world setting documented by R3SoftRecoverySettings::recoveryPace.
Set the world setting documented by R3SoftRecoverySettings::selfCrossingDetection.
Set the world setting documented by R3SoftRecoverySettings::selfStandDown.
| R3Status r3RemoveSoftBody | ( | struct R3SoftBodyHandle | handle | ) |
Remove a soft body and its associated simulation objects.
Invalidates its handle.
| R3Bool r3RigidBody_IsSoftFrame | ( | struct R3RigidBodyHandle | handle | ) |
Return whether the rigid body is a soft-body proxy.
| struct R3SoftBodyHandle r3RigidBody_SoftBody | ( | struct R3RigidBodyHandle | handle | ) |
Return the associated soft-body handle, or an invalid handle if this is not a soft proxy.
| struct R3SoftBodyDesc r3RopeSoftBodyDesc | ( | struct R3Vector | a, |
| struct R3Vector | b, | ||
| size_t | particles ) |
Return a rope recipe with particles evenly spaced from a to b, including both endpoints.
Initializes a recipe without allocating. Geometry is validated during preview/insertion.
Return the world setting documented by R3SoftBodiesSettings::contactStiffening.
| size_t r3SoftBodiesMaxExtraSubsteps | ( | const struct R3World * | world | ) |
Return the world setting documented by R3SoftBodiesSettings::maxExtraSubsteps.
Return the world setting documented by R3SoftBodiesSettings::resweepStrain.
Set the world setting documented by R3SoftBodiesSettings::contactStiffening.
Set the world setting documented by R3SoftBodiesSettings::maxExtraSubsteps.
Set the world setting documented by R3SoftBodiesSettings::resweepStrain.
| uint32_t r3SoftBody_AddCluster | ( | struct R3SoftBodyHandle | handle, |
| const uint32_t * | particles, | ||
| size_t | count ) |
Create a rigid proxy cluster from the supplied particle indices and return its cluster index.
| R3Status r3SoftBody_AddForce | ( | struct R3SoftBodyHandle | handle, |
| struct R3Vector | value, | ||
| R3Bool | wake_up ) |
Accumulate a world-space force; it persists until reset.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3SoftBody_AddParticleForce | ( | struct R3SoftBodyHandle | handle, |
| size_t | index, | ||
| struct R3Vector | value, | ||
| R3Bool | wake_up ) |
Add a world-space force to the indexed particle.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3SoftBody_ApplyImpulse | ( | struct R3SoftBodyHandle | handle, |
| struct R3Vector | value, | ||
| R3Bool | wake_up ) |
Add the same world-space velocity change to every free particle: the whole body is kicked at the same velocity, whatever the particle masses (the value is not divided by the mass).
Pinned particles ignore it. wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3SoftBody_ApplyImpulseAtPoint | ( | struct R3SoftBodyHandle | handle, |
| struct R3Vector | impulse, | ||
| struct R3Vector | point, | ||
| R3Real | falloff_radius, | ||
| R3Bool | wake_up ) |
Apply a world-space impulse to every free particle within falloff_radius of the world-space point, scaled linearly from 1 at the point to 0 at that radius and divided by the particle's mass.
A falloff_radius of zero or less gives every free particle the whole impulse. Pinned particles ignore it. wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3SoftBody_ApplyParticleImpulse | ( | struct R3SoftBodyHandle | handle, |
| size_t | index, | ||
| struct R3Vector | value, | ||
| R3Bool | wake_up ) |
Apply a world-space impulse to one particle.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3SoftBody_ApplyRadialImpulse | ( | struct R3SoftBodyHandle | handle, |
| struct R3Vector | center, | ||
| R3Real | magnitude, | ||
| R3Real | falloff_radius, | ||
| R3Bool | wake_up ) |
Apply an impulse of the given magnitude pointing away from the world-space center to every free particle within falloff_radius, scaled linearly from 1 at the center to 0 at that radius and divided by the particle's mass.
A particle on the center gets nothing; a falloff_radius of zero or less pushes every free particle fully. A negative magnitude pulls toward the center. Pinned particles ignore it. wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3SoftBody_AttachParticle | ( | struct R3SoftBodyHandle | handle, |
| size_t | index, | ||
| struct R3RigidBodyHandle | rigid_body ) |
Attach a particle to a rigid body by a two-way point-to-point constraint (unlike pinning).
The anchor is the particle's current position, expressed in the rigid body's local frame; a particle attached twice keeps both attachments. Undo it with r3SoftBody_DetachParticle.
| size_t r3SoftBody_Boundary | ( | struct R3SoftBodyHandle | handle, |
| uint32_t * | buffer, | ||
| size_t | capacity ) |
Copy flattened boundary element indices.
| size_t r3SoftBody_Cells | ( | struct R3SoftBodyHandle | handle, |
| uint32_t * | buffer, | ||
| size_t | capacity ) |
Copy flattened cell vertex indices.
| struct R3Vector r3SoftBody_CenterOfMass | ( | struct R3SoftBodyHandle | handle | ) |
Return the soft body world-space center of mass.
| size_t r3SoftBody_ClusterParticles | ( | struct R3SoftBodyHandle | handle, |
| uint32_t | cluster, | ||
| uint32_t * | buffer, | ||
| size_t | capacity ) |
Copy particle indices for a cluster.
| struct R3RigidBodyHandle r3SoftBody_ClusterProxy | ( | struct R3SoftBodyHandle | handle, |
| uint32_t | cluster ) |
Return the rigid proxy for the selected cluster.
| size_t r3SoftBody_Clusters | ( | struct R3SoftBodyHandle | handle, |
| uint32_t * | buffer, | ||
| size_t | capacity ) |
Copy cluster indices.
| R3Bool r3SoftBody_Contains | ( | struct R3SoftBodyHandle | handle | ) |
Test whether the live world contains this soft body handle.
A removed/stale handle returns false.
| R3Bool r3SoftBody_DetachParticle | ( | struct R3SoftBodyHandle | handle, |
| size_t | index ) |
Detach a particle from every rigid body it was attached to with r3SoftBody_AttachParticle.
Returns whether it was attached at all.
| size_t r3SoftBody_Edges | ( | struct R3SoftBodyHandle | handle, |
| uint32_t * | buffer, | ||
| size_t | capacity ) |
Copy flattened edge vertex indices.
| R3Bool r3SoftBody_IsEnabled | ( | struct R3SoftBodyHandle | handle | ) |
Return whether the soft body is enabled.
| R3Bool r3SoftBody_IsSleeping | ( | struct R3SoftBodyHandle | handle | ) |
Return whether the soft body is sleeping.
| R3Real r3SoftBody_Mass | ( | struct R3SoftBodyHandle | handle | ) |
Return the soft body mass.
| struct R3SoftBodyMaterial r3SoftBody_Material | ( | struct R3SoftBodyHandle | handle | ) |
Return a copy of the soft body material parameters.
| size_t r3SoftBody_MeshArity | ( | struct R3SoftBodyHandle | handle, |
| struct R3ColliderHandle | collider ) |
Return indices per collision-mesh element (2 for segments, 3 for triangles).
| size_t r3SoftBody_MeshColliders | ( | struct R3SoftBodyHandle | handle, |
| struct R3ColliderHandle * | buffer, | ||
| size_t | capacity ) |
Copy collision mesh collider handles.
| size_t r3SoftBody_Meshes | ( | struct R3SoftBodyHandle | handle, |
| struct R3SoftMeshInfo * | buffer, | ||
| size_t | capacity ) |
Copy collision mesh metadata.
| size_t r3SoftBody_MeshIndices | ( | struct R3SoftBodyHandle | handle, |
| struct R3ColliderHandle | collider, | ||
| uint32_t * | buffer, | ||
| size_t | capacity ) |
Copy flattened collision mesh indices.
| size_t r3SoftBody_MeshIndicesById | ( | struct R3SoftBodyHandle | handle, |
| struct R3SoftMeshId | id, | ||
| uint32_t * | buffer, | ||
| size_t | capacity ) |
Copy flattened indices for a mesh ID.
| R3Bool r3SoftBody_MeshIsClosed | ( | struct R3SoftBodyHandle | handle, |
| struct R3ColliderHandle | collider ) |
Return whether the selected collision mesh is closed.
| uint32_t r3SoftBody_MeshTopologyVersion | ( | struct R3SoftBodyHandle | handle, |
| struct R3ColliderHandle | collider ) |
Return the selected collision mesh topology revision for cache invalidation.
| size_t r3SoftBody_MeshVertices | ( | struct R3SoftBodyHandle | handle, |
| struct R3ColliderHandle | collider, | ||
| struct R3Vector * | buffer, | ||
| size_t | capacity ) |
Copy world-space collision mesh vertices.
| size_t r3SoftBody_MeshVerticesById | ( | struct R3SoftBodyHandle | handle, |
| struct R3SoftMeshId | id, | ||
| struct R3Vector * | buffer, | ||
| size_t | capacity ) |
Copy world-space vertices for a mesh ID.
| size_t r3SoftBody_NumParticles | ( | struct R3SoftBodyHandle | handle | ) |
Return the soft body particle count.
| struct R3Vector r3SoftBody_ParticlePosition | ( | struct R3SoftBodyHandle | handle, |
| size_t | index ) |
Return the world-space position of the indexed particle.
| size_t r3SoftBody_ParticlePositions | ( | struct R3SoftBodyHandle | handle, |
| struct R3Vector * | buffer, | ||
| size_t | capacity ) |
Copy world-space particle positions.
| size_t r3SoftBody_ParticleVelocities | ( | struct R3SoftBodyHandle | handle, |
| struct R3Vector * | buffer, | ||
| size_t | capacity ) |
Copy world-space particle velocities.
| struct R3Vector r3SoftBody_ParticleVelocity | ( | struct R3SoftBodyHandle | handle, |
| size_t | index ) |
Return the world-space velocity of the indexed particle.
| size_t r3SoftBody_Pieces | ( | struct R3SoftBodyHandle | handle, |
| struct R3SoftBodyHandle * | buffer, | ||
| size_t | capacity ) |
Copy piece identifiers.
| R3Status r3SoftBody_RemoveCluster | ( | struct R3SoftBodyHandle | handle, |
| uint32_t | cluster ) |
Remove the selected cluster and its rigid proxy.
| R3Status r3SoftBody_ResetForces | ( | struct R3SoftBodyHandle | handle, |
| R3Bool | wake_up ) |
Clear accumulated user forces.
wake_up = 1 wakes affected bodies; 0 preserves their sleep state.
| R3Status r3SoftBody_ResetPlasticity | ( | struct R3SoftBodyHandle | handle | ) |
Undo every permanent (plastic) deformation: edge rest lengths, dihedral rest angles, cell rest shapes and particle rest positions return to their creation state.
The particles stay put and spring back elastically.
| R3Real r3SoftBody_RestVolume | ( | struct R3SoftBodyHandle | handle | ) |
Return the soft body undeformed volume.
| struct R3RigidBodyHandle r3SoftBody_RootBody | ( | struct R3SoftBodyHandle | handle | ) |
Return the soft body root rigid-proxy handle.
| R3Status r3SoftBody_SetClusterEdgeSoftness | ( | struct R3SoftBodyHandle | handle, |
| uint32_t | cluster, | ||
| const struct R3SpringCoefficients * | softness ) |
Override the softness of every structural or bending edge fully contained in a live cluster: regional stiffness for cloth and ropes.
A NULL softness restores the body material's.
| R3Status r3SoftBody_SetClusterKinematicTarget | ( | struct R3SoftBodyHandle | handle, |
| uint32_t | cluster, | ||
| struct R3Pose | value ) |
Set the next world-space target pose of a pinned cluster.
| R3Status r3SoftBody_SetClusterPinned | ( | struct R3SoftBodyHandle | handle, |
| uint32_t | cluster, | ||
| R3Bool | value ) |
Enable or disable pinning the cluster for the soft body.
| R3Status r3SoftBody_SetClusterShapeMatchingEnabled | ( | struct R3SoftBodyHandle | handle, |
| uint32_t | cluster, | ||
| R3Bool | value ) |
Enable or disable using cluster shape matching for the soft body.
| R3Status r3SoftBody_SetClusterShapeMatchingTarget | ( | struct R3SoftBodyHandle | handle, |
| uint32_t | cluster, | ||
| const struct R3Pose * | target ) |
Set the soft body cluster shape-matching target pose.
| R3Status r3SoftBody_SetClusterStiffnessScale | ( | struct R3SoftBodyHandle | handle, |
| uint32_t | cluster, | ||
| R3Real | value ) |
Scale the material stiffness (Young modulus) of every cell fully contained in a live cluster: regional materials without a separate body.
Cells straddling the cluster's boundary keep their stiffness; use r3SoftBody_SetClusterEdgeSoftness for edges.
| R3Status r3SoftBody_SetClusterTearResistance | ( | struct R3SoftBodyHandle | handle, |
| uint32_t | cluster, | ||
| R3Real | value ) |
Set the soft body cluster tear-resistance multiplier.
| R3Status r3SoftBody_SetEdgeTearResistance | ( | struct R3SoftBodyHandle | handle, |
| size_t | index, | ||
| R3Real | resistance ) |
Set the soft body edge tear-resistance multiplier.
| R3Status r3SoftBody_SetEnabled | ( | struct R3SoftBodyHandle | handle, |
| R3Bool | value ) |
Enable or disable the soft body.
| R3Status r3SoftBody_SetMaterial | ( | struct R3SoftBodyHandle | handle, |
| const struct R3SoftBodyMaterial * | data ) |
Copy material parameters into the soft body.
| R3Status r3SoftBody_SetParticleKinematicTarget | ( | struct R3SoftBodyHandle | handle, |
| size_t | index, | ||
| struct R3Vector | value ) |
Set the next world-space target position of a pinned particle.
| R3Status r3SoftBody_SetParticlePinned | ( | struct R3SoftBodyHandle | handle, |
| size_t | index, | ||
| R3Bool | value ) |
Enable or disable pinning the particle for the soft body.
| R3Status r3SoftBody_SetParticlePosition | ( | struct R3SoftBodyHandle | handle, |
| size_t | index, | ||
| struct R3Vector | value ) |
Set the world-space position of the indexed particle.
| R3Status r3SoftBody_SetParticleVelocity | ( | struct R3SoftBodyHandle | handle, |
| size_t | index, | ||
| struct R3Vector | value ) |
Set the soft body particle world-space velocity.
| R3Status r3SoftBody_SetSolver | ( | struct R3SoftBodyHandle | handle, |
| uint32_t | solver ) |
Set the soft body soft solver kind (R3_SOFT_SOLVER_*).
| R3Status r3SoftBody_SetVolumeFactor | ( | struct R3SoftBodyHandle | handle, |
| R3Real | value ) |
Set the soft body target volume multiplier.
| uint32_t r3SoftBody_Solver | ( | struct R3SoftBodyHandle | handle | ) |
Return the solver simulating the soft body's elasticity (R3_SOFT_SOLVER_*).
Always R3_SOFT_SOLVER_CONSTRAINTS in a library built without FEM.
| struct R3SoftBodyTearEvent * r3SoftBody_Tear | ( | struct R3SoftBodyHandle | handle, |
| const uint32_t * | edges, | ||
| size_t | edge_count, | ||
| const uint32_t * | cells, | ||
| size_t | cell_count ) |
Tear the selected edges and return an owned remapping event.
Release it with r3FreeSoftBodyTearEvent.
| R3Status r3SoftBody_TearCell | ( | struct R3SoftBodyHandle | handle, |
| size_t | index ) |
Mark the indexed cell as torn.
The tear is applied at the end of the next step and reported by a tear event: no cell is removed, one of its particles splits along the plane perpendicular to the cell's principal rest stretch.
| R3Status r3SoftBody_TearEdge | ( | struct R3SoftBodyHandle | handle, |
| size_t | index ) |
Mark the indexed edge as torn.
The tear is applied at the end of the next step and reported by a tear event; use r3SoftBody_Tear to tear immediately.
| uint32_t r3SoftBody_TopologyVersion | ( | struct R3SoftBodyHandle | handle | ) |
Return a counter that changes when particle connectivity changes; use it to invalidate mesh caches.
| R3Status r3SoftBody_ValidateHandle | ( | struct R3SoftBodyHandle | handle | ) |
Validate the index and generation in the live owning world.
Cannot detect a world pointer that has already been freed.
| R3Real r3SoftBody_Volume | ( | struct R3SoftBodyHandle | handle | ) |
Return the soft body current volume.
| R3Real r3SoftBody_VolumeFactor | ( | struct R3SoftBodyHandle | handle | ) |
Return the soft body target volume multiplier.
| R3Status r3SoftBody_WakeUp | ( | struct R3SoftBodyHandle | handle | ) |
Wake the soft body and its rigid proxies.
| size_t r3SoftBodyCount | ( | const struct R3World * | world | ) |
Return the number of soft body objects in the world.
| size_t r3SoftBodyDesc_CellIndices | ( | const struct R3SoftBodyDesc * | desc, |
| uint32_t * | buffer, | ||
| size_t | capacity ) |
Copies generated cell indices into caller-owned storage.
Counts scalar indices.
| size_t r3SoftBodyDesc_ParticlePositions | ( | const struct R3SoftBodyDesc * | desc, |
| struct R3Vector * | buffer, | ||
| size_t | capacity ) |
Copies generated particle positions into caller-owned storage; no persistent builder.
| R3Status r3SoftBodyDesc_SetAddedEdges | ( | struct R3SoftBodyDesc * | desc, |
| struct R3EdgeView | view ) |
Borrow structural edges added after appending (see R3SoftBodyDesc::addedEdges); preserve all other fields.
No allocation or element reads. Invalid view metadata leaves the description unchanged.
| R3Status r3SoftBodyDesc_SetAppended | ( | struct R3SoftBodyDesc * | desc, |
| struct R3SoftBodyDescView | view ) |
Borrow descriptions to merge into this body (see R3SoftBodyDesc::appended); preserve all other fields.
No allocation or element reads. Invalid view metadata leaves the description unchanged.
| R3Status r3SoftBodyDesc_SetBendEdges | ( | struct R3SoftBodyDesc * | desc, |
| struct R3EdgeView | view ) |
Borrow bend edges; preserve all other fields.
No allocation or element reads. Zero counts retain the recipe's generated defaults at insertion, as with directly assigned views. Invalid view metadata leaves the description unchanged.
| R3Status r3SoftBodyDesc_SetCells | ( | struct R3SoftBodyDesc * | desc, |
| R3CellView | view ) |
Borrow cells; preserve all other fields.
No allocation or element reads. Zero counts retain the recipe's generated defaults at insertion, as with directly assigned views. Invalid view metadata leaves the description unchanged.
| R3Status r3SoftBodyDesc_SetDihedrals | ( | struct R3SoftBodyDesc * | desc, |
| struct R3DihedralView | view ) |
Borrow dihedrals; preserve all other fields.
No allocation or element reads. Zero counts retain the recipe's generated defaults at insertion, as with directly assigned views. Invalid view metadata leaves the description unchanged.
| R3Status r3SoftBodyDesc_SetEdges | ( | struct R3SoftBodyDesc * | desc, |
| struct R3EdgeView | view ) |
Borrow edges; preserve all other fields.
No allocation or element reads. Zero counts retain the recipe's generated defaults at insertion, as with directly assigned views. Invalid view metadata leaves the description unchanged.
| R3Status r3SoftBodyDesc_SetMasses | ( | struct R3SoftBodyDesc * | desc, |
| struct R3RealView | view ) |
Borrow masses; preserve all other fields.
No allocation or element reads. Zero counts retain the recipe's generated defaults at insertion, as with directly assigned views. Invalid view metadata leaves the description unchanged.
| R3Status r3SoftBodyDesc_SetParticles | ( | struct R3SoftBodyDesc * | desc, |
| struct R3VectorView | positions ) |
Select an explicit particle recipe and borrow its positions.
Other fields are preserved.
| R3Status r3SoftBodyDesc_SetPinnedParticles | ( | struct R3SoftBodyDesc * | desc, |
| struct R3IndexView | view ) |
Borrow pinned particles; preserve all other fields.
No allocation or element reads. Zero counts retain the recipe's generated defaults at insertion, as with directly assigned views. Invalid view metadata leaves the description unchanged.
| R3Status r3SoftBodyDesc_SetSkin | ( | struct R3SoftBodyDesc * | desc, |
| struct R3VectorView | vertices, | ||
| R3SurfaceElementView | elements ) |
Borrow skin geometry.
Other fields, including skinCollision, are preserved.
| R3Status r3SoftBodyDesc_SetSurface | ( | struct R3SoftBodyDesc * | desc, |
| R3SurfaceElementView | view ) |
Borrow surface; preserve all other fields.
No allocation or element reads. Zero counts retain the recipe's generated defaults at insertion, as with directly assigned views. Invalid view metadata leaves the description unchanged.
| R3Status r3SoftBodyDesc_SetSurfaceMesh | ( | struct R3SoftBodyDesc * | desc, |
| struct R3VectorView | vertices, | ||
| R3SurfaceElementView | elements ) |
Select a surface recipe and borrow its vertices and elements.
Other fields are preserved.
| R3Status r3SoftBodyDesc_SetTensionOnlyEdges | ( | struct R3SoftBodyDesc * | desc, |
| struct R3IndexView | view ) |
Borrow tension only edges; preserve all other fields.
No allocation or element reads. Zero counts retain the recipe's generated defaults at insertion, as with directly assigned views. Invalid view metadata leaves the description unchanged.
| R3Status r3SoftBodyDesc_SetWire | ( | struct R3SoftBodyDesc * | desc, |
| struct R3EdgeView | view ) |
Borrow wire; preserve all other fields.
No allocation or element reads. Zero counts retain the recipe's generated defaults at insertion, as with directly assigned views. Invalid view metadata leaves the description unchanged.
| size_t r3SoftBodyHandles | ( | const struct R3World * | world, |
| struct R3SoftBodyHandle * | buffer, | ||
| size_t | capacity ) |
Copy entity handles.
| size_t r3SoftBodyTearEvent_Bodies | ( | const struct R3SoftBodyTearEvent * | event, |
| struct R3SoftBodyHandle * | buffer, | ||
| size_t | capacity ) |
Copy the soft bodies the torn body is in after the tear, the one keeping the handle first: the torn body alone when nothing was split off.
Entry i holds the particles given by r3SoftBodyTearEvent_PieceParticles(event, i, ...).
| size_t r3SoftBodyTearEvent_Clusters | ( | const struct R3SoftBodyTearEvent * | event, |
| struct R3SoftClusterSplit * | buffer, | ||
| size_t | capacity ) |
Copy cluster-to-piece and rigid-proxy remapping records.
| size_t r3SoftBodyTearEvent_InsertedParticles | ( | const struct R3SoftBodyTearEvent * | event, |
| uint32_t * | buffer, | ||
| size_t | capacity ) |
Flat indices; element arity follows the corresponding Rust event field.
| size_t r3SoftBodyTearEvent_MovedJoints | ( | const struct R3SoftBodyTearEvent * | event, |
| struct R3SoftJointMove * | buffer, | ||
| size_t | capacity ) |
Copy impulse-joint remapping records produced by the tear.
| struct R3ParticleDestination r3SoftBodyTearEvent_ParticleDestination | ( | const struct R3SoftBodyTearEvent * | event, |
| uint32_t | particle ) |
Return the destination body and particle index for an original particle.
| size_t r3SoftBodyTearEvent_PieceCount | ( | const struct R3SoftBodyTearEvent * | event | ) |
Return the number of soft bodies the torn body is in after the tear: the length of r3SoftBodyTearEvent_Bodies, and the exclusive bound of the piece_index of r3SoftBodyTearEvent_PieceParticles.
It is 1 when nothing was split off.
| size_t r3SoftBodyTearEvent_PieceParticles | ( | const struct R3SoftBodyTearEvent * | event, |
| size_t | piece_index, | ||
| uint32_t * | buffer, | ||
| size_t | capacity ) |
Copy the particles of the piece_index-th body of r3SoftBodyTearEvent_Bodies, as indices in the torn body after the tear (the indices the other event fields use); entry i is the piece's particle i.
piece_index must be less than r3SoftBodyTearEvent_PieceCount.
| size_t r3SoftBodyTearEvent_RemovedEdges | ( | const struct R3SoftBodyTearEvent * | event, |
| uint32_t * | buffer, | ||
| size_t | capacity ) |
Flat indices; element arity follows the corresponding Rust event field.
| struct R3SoftBodyHandle r3SoftBodyTearEvent_SoftBody | ( | const struct R3SoftBodyTearEvent * | event | ) |
Return the source soft-body handle for this tear event.
| size_t r3SoftBodyTearEvent_SplitParticles | ( | const struct R3SoftBodyTearEvent * | event, |
| uint32_t * | buffer, | ||
| size_t | capacity ) |
Flat indices; element arity follows the corresponding Rust event field.
| size_t r3SoftBodyTearEvent_TornCells | ( | const struct R3SoftBodyTearEvent * | event, |
| uint32_t * | buffer, | ||
| size_t | capacity ) |
Flat indices; element arity follows the corresponding Rust event field.
| size_t r3SoftBodyTearEvent_TornEdges | ( | const struct R3SoftBodyTearEvent * | event, |
| uint32_t * | buffer, | ||
| size_t | capacity ) |
Flat indices; element arity follows the corresponding Rust event field.
| struct R3OptionalParticleDestination r3SoftBodyTearEvent_TryParticleDestination | ( | const struct R3SoftBodyTearEvent * | event, |
| uint32_t | particle ) |
Optional particle destination after a tear.
Missing destinations are normal and set found to false; body/index are only written when a destination exists.
| struct R3SoftBodyDesc r3SphereSoftBodyDesc | ( | struct R3Vector | center, |
| R3Real | radius, | ||
| uint32_t | subdivisions ) |
Return a hollow icosphere recipe with the specified refinement levels and volume preservation.
Initializes a recipe without allocating. Geometry is validated during preview/insertion.
| struct R3SoftBodyMaterial r3UniformSoftBodyMaterial | ( | struct R3SpringCoefficients | value | ) |
Returns a material with the same softness for each constraint family.
| struct R3SoftBodyDesc r3VolumetricSoftBodyDesc | ( | struct R3VectorView | vertices, |
| R3SurfaceElementView | surface, | ||
| struct R3VolumeMeshParameters | parameters ) |
Initializes a borrowed meshing recipe.
Mesh generation happens on preview/insertion.