|
Rapier C — 2D / f64 0.36.0+c.0
|
Copyable recipe, not an owned procedural builder. More...
#include <rapier.h>
Data Fields | |
| uint32_t | kind |
| Discriminant selecting which description fields are read. | |
| struct R2Vector | a |
| Recipe origin/center or first rope endpoint; use a recipe constructor. | |
| struct R2Vector | b |
| Recipe half extents, second rope endpoint, or tube axis; use a recipe constructor. | |
| struct R2Vector | du |
| Cloth basis step along its first parameter axis. | |
| struct R2Vector | dv |
| Cloth basis step along its second parameter axis. | |
| size_t | nx |
| First recipe resolution; interpretation depends on kind. | |
| size_t | ny |
| Second recipe resolution; interpretation depends on kind. | |
| size_t | nz |
| Third recipe resolution; interpretation depends on kind. | |
| R2Real | radius |
| Radius for the selected primitive or recipe. | |
| R2Real | radiusEnd |
| Radius at the second end of a tapered cloth tube. | |
| struct R2Vector | translation |
| Translation vector. | |
| struct R2OptionalReal | totalMass |
| Optional total mass override for generated particles. | |
| struct R2VolumeMeshParameters | meshing |
| Volume-meshing parameters for a volumetric recipe. | |
| struct R2VectorView | positions |
| Borrowed initial particle positions. | |
| struct R2RealView | masses |
| Borrowed per-particle masses; when empty, particleMass is used. | |
| struct R2IndexView | pinned |
| Borrowed indices of pinned particles. | |
| struct R2EdgeView | edges |
| Borrowed edge topology; count is edges. | |
| struct R2EdgeView | bendEdges |
| Borrowed bending edge constraints. | |
| struct R2IndexView | tensionOnlyEdges |
| Borrowed indices of edges that resist tension only. | |
| struct R2SoftEdgeSoftnessView | edgeSoftness |
| Borrowed per-edge softness overrides. | |
| struct R2SoftEdgeTearView | edgeTearResistance |
| Borrowed per-edge tear-resistance overrides. | |
| R2CellView | cells |
| Borrowed triangles in 2D or tetrahedra in 3D. | |
| R2SurfaceElementView | surface |
| Borrowed boundary edges in 2D or triangles in 3D. | |
| struct R2VectorView | skinVertices |
| Borrowed skin vertex positions. | |
| R2SurfaceElementView | skinIndices |
| Borrowed skin topology. | |
| struct R2SoftBodyDescView | appended |
| Borrowed descriptions merged into this body, their particles numbered after this one's in order. | |
| struct R2EdgeView | addedEdges |
| Borrowed structural edges added after appending (seams); indices count this body's particles then the appended ones. | |
| struct R2SoftBodyMaterial | material |
| Soft-body material coefficients. | |
| uint32_t | cellModel |
| R2_SOFT_CELL_VOLUME, R2_SOFT_CELL_COROTATIONAL, or R2_SOFT_CELL_NEO_HOOKEAN. | |
| uint32_t | solver |
| 0 = constraints, 1 = FEM (requires a library built with FEM). | |
| R2Real | particleMass |
| Default nonnegative particle mass. | |
| struct R2OptionalReal | particleRadius |
| Disabled by default: retain the radius computed by the generator. | |
| R2Bool | volumePreservation |
| Whether to preserve volume. | |
| R2Real | volumeFactor |
| Target volume multiplier. | |
| struct R2OptionalBool | shapeMatching |
| Optional shape-matching override; disabled retains recipe defaults. | |
| struct R2OptionalBool | oriented |
| Optional override of the ORIENTED flag of the generated collision surface (when disabled, a closed surface is oriented). | |
| R2Bool | selfContacts |
| Whether self-collision is enabled. | |
| R2Bool | skinCollision |
| Whether skin elements participate in collision detection. | |
| R2Bool | collisionEnabled |
| Whether the generated collision geometry is enabled. | |
| struct R2ColliderDesc | collider |
| Collider configuration used by the recipe; shape comes from the generated geometry. | |
| R2Real | linearDamping |
| Nonnegative linear damping coefficient. | |
| R2Real | gravityScale |
| Multiplier applied to world gravity. | |
| size_t | additionalSolverIterations |
| Extra solver iterations for this body and connected bodies. | |
| size_t | additionalPgsIterations |
| Extra PGS iterations for this body. | |
| R2Bool | canSleep |
| Whether automatic sleeping is allowed. | |
| int8_t | dominanceGroup |
| Signed dominance group; larger groups dominate smaller groups. | |
| struct R2UserData | userData |
| Application data; Rapier does not own pointers encoded in it. | |
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. R2_SOFT_DESC_POLYGON reads positions; R2_SOFT_DESC_TRIMESH reads positions and cells (its triangles become edges and a boundary, not cells).
| struct R2Vector R2SoftBodyDesc::a |
Recipe origin/center or first rope endpoint; use a recipe constructor.
| struct R2EdgeView R2SoftBodyDesc::addedEdges |
Borrowed structural edges added after appending (seams); indices count this body's particles then the appended ones.
Their rest length is the current distance of their particles.
| size_t R2SoftBodyDesc::additionalPgsIterations |
Extra PGS iterations for this body.
| size_t R2SoftBodyDesc::additionalSolverIterations |
Extra solver iterations for this body and connected bodies.
| struct R2SoftBodyDescView R2SoftBodyDesc::appended |
Borrowed descriptions merged into this body, their particles numbered after this one's in order.
Each contributes its particles, masses, pinned particles and elements (after its own translation and total mass); every other setting comes from this description. Appended descriptions cannot append others nor have a skin.
| struct R2Vector R2SoftBodyDesc::b |
Recipe half extents, second rope endpoint, or tube axis; use a recipe constructor.
| struct R2EdgeView R2SoftBodyDesc::bendEdges |
Borrowed bending edge constraints.
| R2Bool R2SoftBodyDesc::canSleep |
Whether automatic sleeping is allowed.
| uint32_t R2SoftBodyDesc::cellModel |
R2_SOFT_CELL_VOLUME, R2_SOFT_CELL_COROTATIONAL, or R2_SOFT_CELL_NEO_HOOKEAN.
| R2CellView R2SoftBodyDesc::cells |
Borrowed triangles in 2D or tetrahedra in 3D.
| struct R2ColliderDesc R2SoftBodyDesc::collider |
Collider configuration used by the recipe; shape comes from the generated geometry.
| R2Bool R2SoftBodyDesc::collisionEnabled |
Whether the generated collision geometry is enabled.
| int8_t R2SoftBodyDesc::dominanceGroup |
Signed dominance group; larger groups dominate smaller groups.
| struct R2Vector R2SoftBodyDesc::du |
Cloth basis step along its first parameter axis.
| struct R2Vector R2SoftBodyDesc::dv |
Cloth basis step along its second parameter axis.
| struct R2EdgeView R2SoftBodyDesc::edges |
Borrowed edge topology; count is edges.
| struct R2SoftEdgeSoftnessView R2SoftBodyDesc::edgeSoftness |
Borrowed per-edge softness overrides.
| struct R2SoftEdgeTearView R2SoftBodyDesc::edgeTearResistance |
Borrowed per-edge tear-resistance overrides.
| R2Real R2SoftBodyDesc::gravityScale |
Multiplier applied to world gravity.
| uint32_t R2SoftBodyDesc::kind |
Discriminant selecting which description fields are read.
| R2Real R2SoftBodyDesc::linearDamping |
Nonnegative linear damping coefficient.
| struct R2RealView R2SoftBodyDesc::masses |
Borrowed per-particle masses; when empty, particleMass is used.
| struct R2SoftBodyMaterial R2SoftBodyDesc::material |
Soft-body material coefficients.
| struct R2VolumeMeshParameters R2SoftBodyDesc::meshing |
Volume-meshing parameters for a volumetric recipe.
| size_t R2SoftBodyDesc::nx |
First recipe resolution; interpretation depends on kind.
| size_t R2SoftBodyDesc::ny |
Second recipe resolution; interpretation depends on kind.
| size_t R2SoftBodyDesc::nz |
Third recipe resolution; interpretation depends on kind.
| struct R2OptionalBool R2SoftBodyDesc::oriented |
Optional override of the ORIENTED flag of the generated collision surface (when disabled, a closed surface is oriented).
Set it to false for a shell whose inner side holds bodies.
| R2Real R2SoftBodyDesc::particleMass |
Default nonnegative particle mass.
| struct R2OptionalReal R2SoftBodyDesc::particleRadius |
Disabled by default: retain the radius computed by the generator.
| struct R2IndexView R2SoftBodyDesc::pinned |
Borrowed indices of pinned particles.
| struct R2VectorView R2SoftBodyDesc::positions |
Borrowed initial particle positions.
| R2Real R2SoftBodyDesc::radius |
Radius for the selected primitive or recipe.
| R2Real R2SoftBodyDesc::radiusEnd |
Radius at the second end of a tapered cloth tube.
| R2Bool R2SoftBodyDesc::selfContacts |
Whether self-collision is enabled.
| struct R2OptionalBool R2SoftBodyDesc::shapeMatching |
Optional shape-matching override; disabled retains recipe defaults.
| R2Bool R2SoftBodyDesc::skinCollision |
Whether skin elements participate in collision detection.
| R2SurfaceElementView R2SoftBodyDesc::skinIndices |
Borrowed skin topology.
| struct R2VectorView R2SoftBodyDesc::skinVertices |
Borrowed skin vertex positions.
| uint32_t R2SoftBodyDesc::solver |
0 = constraints, 1 = FEM (requires a library built with FEM).
| R2SurfaceElementView R2SoftBodyDesc::surface |
Borrowed boundary edges in 2D or triangles in 3D.
| struct R2IndexView R2SoftBodyDesc::tensionOnlyEdges |
Borrowed indices of edges that resist tension only.
| struct R2OptionalReal R2SoftBodyDesc::totalMass |
Optional total mass override for generated particles.
| struct R2Vector R2SoftBodyDesc::translation |
Translation vector.
| struct R2UserData R2SoftBodyDesc::userData |
Application data; Rapier does not own pointers encoded in it.
| R2Real R2SoftBodyDesc::volumeFactor |
Target volume multiplier.
| R2Bool R2SoftBodyDesc::volumePreservation |
Whether to preserve volume.