|
Rapier C — 3D / f32 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 R3Vector | a |
| Recipe origin/center or first rope endpoint; use a recipe constructor. | |
| struct R3Vector | b |
| Recipe half extents, second rope endpoint, or tube axis; use a recipe constructor. | |
| struct R3Vector | du |
| Cloth basis step along its first parameter axis. | |
| struct R3Vector | dv |
| Cloth basis step along its second parameter axis. | |
| struct R3SpringCoefficients | warpSoftness |
| Softness of the anisotropic cloth edges along du (warp). | |
| struct R3SpringCoefficients | weftSoftness |
| Softness of the anisotropic cloth edges along dv (weft). | |
| struct R3SpringCoefficients | shearSoftness |
| Softness of the anisotropic cloth diagonal edges (shear). | |
| 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. | |
| R3Real | radius |
| Radius for the selected primitive or recipe. | |
| R3Real | radiusEnd |
| Radius at the second end of a tapered cloth tube. | |
| struct R3Vector | translation |
| Translation vector. | |
| struct R3OptionalReal | totalMass |
| Optional total mass override for generated particles. | |
| struct R3VolumeMeshParameters | meshing |
| Volume-meshing parameters for a volumetric recipe. | |
| struct R3VectorView | positions |
| Borrowed initial particle positions. | |
| struct R3RealView | masses |
| Borrowed per-particle masses; when empty, particleMass is used. | |
| struct R3IndexView | pinned |
| Borrowed indices of pinned particles. | |
| struct R3EdgeView | edges |
| Borrowed edge topology; count is edges. | |
| struct R3EdgeView | bendEdges |
| Borrowed bending edge constraints. | |
| struct R3IndexView | tensionOnlyEdges |
| Borrowed indices of edges that resist tension only. | |
| struct R3SoftEdgeSoftnessView | edgeSoftness |
| Borrowed per-edge softness overrides. | |
| struct R3SoftEdgeTearView | edgeTearResistance |
| Borrowed per-edge tear-resistance overrides. | |
| R3CellView | cells |
| Borrowed triangles in 2D or tetrahedra in 3D. | |
| R3SurfaceElementView | surface |
| Borrowed boundary edges in 2D or triangles in 3D. | |
| struct R3DihedralView | dihedrals |
| Borrowed four-vertex bending constraints. | |
| struct R3EdgeView | wire |
| Borrowed wire edges for a surface recipe. | |
| struct R3VectorView | skinVertices |
| Borrowed skin vertex positions. | |
| R3SurfaceElementView | skinIndices |
| Borrowed skin topology. | |
| struct R3SoftBodyDescView | appended |
| Borrowed descriptions merged into this body, their particles numbered after this one's in order. | |
| struct R3EdgeView | addedEdges |
| Borrowed structural edges added after appending (seams); indices count this body's particles then the appended ones. | |
| struct R3SoftBodyMaterial | material |
| Soft-body material coefficients. | |
| uint32_t | cellModel |
| R3_SOFT_CELL_VOLUME, R3_SOFT_CELL_COROTATIONAL, or R3_SOFT_CELL_NEO_HOOKEAN. | |
| uint32_t | solver |
| 0 = constraints, 1 = FEM (requires a library built with FEM). | |
| R3Real | particleMass |
| Default nonnegative particle mass. | |
| struct R3OptionalReal | particleRadius |
| Disabled by default: retain the radius computed by the generator. | |
| R3Bool | volumePreservation |
| Whether to preserve volume. | |
| R3Real | volumeFactor |
| Target volume multiplier. | |
| struct R3OptionalBool | shapeMatching |
| Optional shape-matching override; disabled retains recipe defaults. | |
| struct R3OptionalBool | oriented |
| Optional override of the ORIENTED flag of the generated collision surface (when disabled, a closed surface is oriented). | |
| R3Bool | selfContacts |
| Whether self-collision is enabled. | |
| R3Bool | skinCollision |
| Whether skin elements participate in collision detection. | |
| R3Bool | collisionEnabled |
| Whether the generated collision geometry is enabled. | |
| struct R3ColliderDesc | collider |
| Collider configuration used by the recipe; shape comes from the generated geometry. | |
| R3Real | linearDamping |
| Nonnegative linear damping coefficient. | |
| R3Real | 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. | |
| R3Bool | canSleep |
| Whether automatic sleeping is allowed. | |
| int8_t | dominanceGroup |
| Signed dominance group; larger groups dominate smaller groups. | |
| struct R3UserData | 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. R3_SOFT_DESC_POLYGON reads positions; R3_SOFT_DESC_TRIMESH reads positions and cells (its triangles become edges and a boundary, not cells).
| struct R3Vector R3SoftBodyDesc::a |
Recipe origin/center or first rope endpoint; use a recipe constructor.
| struct R3EdgeView R3SoftBodyDesc::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 R3SoftBodyDesc::additionalPgsIterations |
Extra PGS iterations for this body.
| size_t R3SoftBodyDesc::additionalSolverIterations |
Extra solver iterations for this body and connected bodies.
| struct R3SoftBodyDescView R3SoftBodyDesc::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 R3Vector R3SoftBodyDesc::b |
Recipe half extents, second rope endpoint, or tube axis; use a recipe constructor.
| struct R3EdgeView R3SoftBodyDesc::bendEdges |
Borrowed bending edge constraints.
| R3Bool R3SoftBodyDesc::canSleep |
Whether automatic sleeping is allowed.
| uint32_t R3SoftBodyDesc::cellModel |
R3_SOFT_CELL_VOLUME, R3_SOFT_CELL_COROTATIONAL, or R3_SOFT_CELL_NEO_HOOKEAN.
| R3CellView R3SoftBodyDesc::cells |
Borrowed triangles in 2D or tetrahedra in 3D.
| struct R3ColliderDesc R3SoftBodyDesc::collider |
Collider configuration used by the recipe; shape comes from the generated geometry.
| R3Bool R3SoftBodyDesc::collisionEnabled |
Whether the generated collision geometry is enabled.
| struct R3DihedralView R3SoftBodyDesc::dihedrals |
Borrowed four-vertex bending constraints.
| int8_t R3SoftBodyDesc::dominanceGroup |
Signed dominance group; larger groups dominate smaller groups.
| struct R3Vector R3SoftBodyDesc::du |
Cloth basis step along its first parameter axis.
| struct R3Vector R3SoftBodyDesc::dv |
Cloth basis step along its second parameter axis.
| struct R3EdgeView R3SoftBodyDesc::edges |
Borrowed edge topology; count is edges.
| struct R3SoftEdgeSoftnessView R3SoftBodyDesc::edgeSoftness |
Borrowed per-edge softness overrides.
| struct R3SoftEdgeTearView R3SoftBodyDesc::edgeTearResistance |
Borrowed per-edge tear-resistance overrides.
| R3Real R3SoftBodyDesc::gravityScale |
Multiplier applied to world gravity.
| uint32_t R3SoftBodyDesc::kind |
Discriminant selecting which description fields are read.
| R3Real R3SoftBodyDesc::linearDamping |
Nonnegative linear damping coefficient.
| struct R3RealView R3SoftBodyDesc::masses |
Borrowed per-particle masses; when empty, particleMass is used.
| struct R3SoftBodyMaterial R3SoftBodyDesc::material |
Soft-body material coefficients.
| struct R3VolumeMeshParameters R3SoftBodyDesc::meshing |
Volume-meshing parameters for a volumetric recipe.
| size_t R3SoftBodyDesc::nx |
First recipe resolution; interpretation depends on kind.
| size_t R3SoftBodyDesc::ny |
Second recipe resolution; interpretation depends on kind.
| size_t R3SoftBodyDesc::nz |
Third recipe resolution; interpretation depends on kind.
| struct R3OptionalBool R3SoftBodyDesc::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.
| R3Real R3SoftBodyDesc::particleMass |
Default nonnegative particle mass.
| struct R3OptionalReal R3SoftBodyDesc::particleRadius |
Disabled by default: retain the radius computed by the generator.
| struct R3IndexView R3SoftBodyDesc::pinned |
Borrowed indices of pinned particles.
| struct R3VectorView R3SoftBodyDesc::positions |
Borrowed initial particle positions.
| R3Real R3SoftBodyDesc::radius |
Radius for the selected primitive or recipe.
| R3Real R3SoftBodyDesc::radiusEnd |
Radius at the second end of a tapered cloth tube.
| R3Bool R3SoftBodyDesc::selfContacts |
Whether self-collision is enabled.
| struct R3OptionalBool R3SoftBodyDesc::shapeMatching |
Optional shape-matching override; disabled retains recipe defaults.
| struct R3SpringCoefficients R3SoftBodyDesc::shearSoftness |
Softness of the anisotropic cloth diagonal edges (shear).
| R3Bool R3SoftBodyDesc::skinCollision |
Whether skin elements participate in collision detection.
| R3SurfaceElementView R3SoftBodyDesc::skinIndices |
Borrowed skin topology.
| struct R3VectorView R3SoftBodyDesc::skinVertices |
Borrowed skin vertex positions.
| uint32_t R3SoftBodyDesc::solver |
0 = constraints, 1 = FEM (requires a library built with FEM).
| R3SurfaceElementView R3SoftBodyDesc::surface |
Borrowed boundary edges in 2D or triangles in 3D.
| struct R3IndexView R3SoftBodyDesc::tensionOnlyEdges |
Borrowed indices of edges that resist tension only.
| struct R3OptionalReal R3SoftBodyDesc::totalMass |
Optional total mass override for generated particles.
| struct R3Vector R3SoftBodyDesc::translation |
Translation vector.
| struct R3UserData R3SoftBodyDesc::userData |
Application data; Rapier does not own pointers encoded in it.
| R3Real R3SoftBodyDesc::volumeFactor |
Target volume multiplier.
| R3Bool R3SoftBodyDesc::volumePreservation |
Whether to preserve volume.
| struct R3SpringCoefficients R3SoftBodyDesc::warpSoftness |
Softness of the anisotropic cloth edges along du (warp).
| struct R3SpringCoefficients R3SoftBodyDesc::weftSoftness |
Softness of the anisotropic cloth edges along dv (weft).
| struct R3EdgeView R3SoftBodyDesc::wire |
Borrowed wire edges for a surface recipe.