Struct heron::rapier_plugin::rapier::dynamics::PrismaticJoint[]

pub struct PrismaticJoint {
Show fields pub local_anchor1: Point<f32, 3_usize>, pub local_anchor2: Point<f32, 3_usize>, pub impulse: Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 5_usize, 1_usize>>, pub limits_enabled: bool, pub limits: [f32; 2], pub limits_impulse: f32, pub motor_target_vel: f32, pub motor_target_pos: f32, pub motor_stiffness: f32, pub motor_damping: f32, pub motor_max_impulse: f32, pub motor_impulse: f32, pub motor_model: SpringModel, // some fields omitted
}

A joint that removes all relative motion between two bodies, except for the translations along one axis.

Fields

local_anchor1: Point<f32, 3_usize>

Where the prismatic joint is attached on the first body, expressed in the local space of the first attached body.

local_anchor2: Point<f32, 3_usize>

Where the prismatic joint is attached on the second body, expressed in the local space of the second attached body.

impulse: Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 5_usize, 1_usize>>

The impulse applied by this joint on the first body.

The impulse applied to the second body is given by -impulse.

limits_enabled: bool

Whether or not this joint should enforce translational limits along its axis.

limits: [f32; 2]

The min an max relative position of the attached bodies along this joint’s axis.

limits_impulse: f32

The impulse applied by this joint on the first body to enforce the position limit along this joint’s axis.

The impulse applied to the second body is given by -impulse.

motor_target_vel: f32

The target relative angular velocity the motor will attempt to reach.

motor_target_pos: f32

The target relative angle along the joint axis the motor will attempt to reach.

motor_stiffness: f32

The motor’s stiffness. See the documentation of SpringModel for more information on this parameter.

motor_damping: f32

The motor’s damping. See the documentation of SpringModel for more information on this parameter.

motor_max_impulse: f32

The maximal impulse the motor is able to deliver.

motor_impulse: f32

The angular impulse applied by the motor.

motor_model: SpringModel

The spring-like model used by the motor to reach the target velocity and .

Implementations

impl PrismaticJoint

pub fn new(
    local_anchor1: Point<f32, 3_usize>,
    local_axis1: Unit<Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>>,
    local_tangent1: Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>,
    local_anchor2: Point<f32, 3_usize>,
    local_axis2: Unit<Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>>,
    local_tangent2: Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>
) -> PrismaticJoint

Creates a new prismatic joint with the given point of applications and axis, all expressed in the local-space of the affected bodies.

The local tangent are vector orthogonal to the local axis. It is used to compute a basis orthonormal to the joint’s axis. If this tangent is set to zero, te orthonormal basis will be automatically computed arbitrarily.

pub fn local_axis1(
    &self
) -> Unit<Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>>

The local axis of this joint, expressed in the local-space of the first attached body.

pub fn local_axis2(
    &self
) -> Unit<Matrix<f32, Const<{_: usize}>, Const<1_usize>, ArrayStorage<f32, 3_usize, 1_usize>>>

The local axis of this joint, expressed in the local-space of the second attached body.

pub fn supports_simd_constraints(&self) -> bool

Can a SIMD constraint be used for resolving this joint?

pub fn configure_motor_model(&mut self, model: SpringModel)

Set the spring-like model used by the motor to reach the desired target velocity and position.

pub fn configure_motor_velocity(&mut self, target_vel: f32, factor: f32)

Sets the target velocity this motor needs to reach.

pub fn configure_motor_position(
    &mut self,
    target_pos: f32,
    stiffness: f32,
    damping: f32
)

Sets the target position this motor needs to reach.

pub fn configure_motor(
    &mut self,
    target_pos: f32,
    target_vel: f32,
    stiffness: f32,
    damping: f32
)

Configure both the target position and target velocity of the motor.

Trait Implementations

impl Clone for PrismaticJoint

impl Copy for PrismaticJoint

impl From<PrismaticJoint> for JointParams

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Any + Clone

impl<T> Component for T where
    T: 'static + Send + Sync

impl<T> Downcast for T where
    T: Any

impl<T> Downcast<T> for T

impl<T> DowncastSync for T where
    T: Any + Send + Sync

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> TypeData for T where
    T: 'static + Send + Sync + Clone

impl<T> Upcast<T> for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,