Expand description
Reference-space rope definitions, native construction and world-bound registration.
Enable exactly one precision feature. The caller owns the world and stepping.
use rapier_rope::{build_rope, CollisionSettings, NativeRopeMaterial,
RopeSpec, SamplingSettings, SpringSettings};
let spec = RopeSpec::new("cable", vec![[0.0; 3], [1.0, 0.0, 0.0]],
NativeRopeMaterial::new(0.1, SpringSettings::new(500.0, 1.0),
SpringSettings::new(20.0, 0.8)),
SamplingSettings::new(1.0 / 32.0), CollisionSettings::new(0.005));
let (native, samples, specification) = build_rope(&spec)?.into_parts();
let mut world = rapier_rope::rapier::prelude::PhysicsWorld::new();
let handle = world.insert_soft_body(native);
assert_eq!(samples.reference_length_m(), 1.0);Re-exports§
pub use attachment::AttachmentCommand;pub use attachment::AttachmentPreparation;pub use attachment::LocatedSample;pub use builder::RopeBuild;pub use builder::build_rope;pub use command::CreatedAttachment;pub use command::PreparedStep;pub use command::RopeCommand;pub use error::RopeError;pub use error::RopeErrorKind;pub use harness_output::HarnessSnapshot;pub use id::AttachmentHandle;pub use id::HarnessHandle;pub use id::RopeHandle;pub use id::RopeSetId;pub use id::WorldId;pub use sampling::ResolvedLocation;pub use sampling::SampledRope;pub use sampling::sample_rope;pub use set::AttachmentView;pub use set::RegistryPhase;pub use set::RemovedRope;pub use set::RopeSet;pub use set::RopeSetError;pub use set::RopeSetErrorKind;pub use set::RopeStepObservation;pub use set::RopeView;pub use set::StepReport;pub use rapier_f32 as rapier;pub use diagnostics::*;pub use harness::*;pub use model::*;pub use output::*;
Modules§
- attachment
- Material-location operations resolved against the registered reference samples.
- builder
- Conversion to an unregistered native Rapier builder.
- command
- Particle-index commands for the step-validation layer.
- diagnostics
- Geometric estimates and explicitly qualified native observations.
- error
- harness
- Connected tree harnesses: one native body, shared junction particles. Span material coordinates remain independent; there is no global arc length.
- harness_
output - Graph snapshots, with curvature evaluated separately inside each span.
- id
- Opaque registry identities. Handles are not native Rapier handles.
- model
- Engine-independent rope definitions. Lengths are metres, masses kilograms.
- output
- Renderer-independent checked views, owned snapshots and experimental playback JSON. Tracks are not checkpoints and contain no complete solver restart state.
- sampling
- Reference-space sampling, nominal mass and material-location maps.
- set
- World-bound registration, lifetime checks and a caller-driven step protocol.