pub enum GroundSupport {
Material,
WorldOffset(Vec3),
CylinderRim {
axis: Vec3,
radius: f64,
quarter_turns: u8,
offset: Vec3,
},
}Expand description
How a ground support point is attached to the body that owns it.
Detection reports this per contact because the gradient of a contact
depends on it: a support point that rides the body rigidly moves with
Rᵀ(q), one that hangs below a curved surface does not, and one on a
cylinder’s rim does neither — it moves with the axis. The convex adjoint
(phyz_diff::contact_adjoint) reconstructs the support point from this,
and getting it wrong is a silently wrong gradient rather than a failure.
Variants§
Material
The support point is a material point of the body: a box corner, a mesh vertex, or a cylinder rim point in the degenerate upright case.
WorldOffset(Vec3)
The support hangs a constant world vector below a material point:
(0, 0, −r) for a sphere or capsule dropping onto a z-plane. Spinning
the body does not move it.
CylinderRim
A point on a cylinder’s cap rim: cap centre + radius · dir, where
dir is the barrel’s steepest-downhill direction û turned
quarter_turns × 90° about the axis (see cylinder_rim_dir).
axis is the cylinder’s axis in world coordinates at detection time.
It is a body-fixed direction, so an adjoint that wants to stay exact
under a perturbation freezes it in the body frame and recomputes dir
from the perturbed axis — û is a function of the configuration, and
holding it fixed drops the whole “the wheel banked, so its contact
moved around the rim” channel.
Fields
Implementations§
Source§impl GroundSupport
impl GroundSupport
Sourcepub fn world_offset(&self) -> Vec3
pub fn world_offset(&self) -> Vec3
The vector from the material point that generated the contact to the support point, in world coordinates, at the configuration it was detected in.
Trait Implementations§
Source§impl Clone for GroundSupport
impl Clone for GroundSupport
Source§fn clone(&self) -> GroundSupport
fn clone(&self) -> GroundSupport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more