[][src]Trait physme::dim3::JointBehaviour

pub trait JointBehaviour: Send + Sync + 'static {
    const STAGE: &'static str;
    fn position(
        &mut self,
        _offset: Vec3,
        _anchor: &RigidBody,
        _target: &RigidBody
    ) -> Option<Vec3> { ... }
fn rotation(
        &mut self,
        _angle: Quat,
        _anchor: &RigidBody,
        _target: &RigidBody
    ) -> Option<Quat> { ... }
fn linear_velocity(
        &mut self,
        _offset: Vec3,
        _anchor: &RigidBody,
        _target: &RigidBody
    ) -> Option<Vec3> { ... }
fn angular_velocity(
        &mut self,
        _angle: Quat,
        _anchor: &RigidBody,
        _target: &RigidBody
    ) -> Option<Quat> { ... }
fn linear_impulse(
        &mut self,
        _offset: Vec3,
        _anchor: &RigidBody,
        _target: &RigidBody
    ) -> Option<Vec3> { ... }
fn angular_impulse(
        &mut self,
        _angle: Quat,
        _anchor: &RigidBody,
        _target: &RigidBody
    ) -> Option<Quat> { ... } }

Defines a set of behaviours on how joints should move the anchored body relative to the anchor.

Associated Constants

const STAGE: &'static str

Loading content...

Provided methods

fn position(
    &mut self,
    _offset: Vec3,
    _anchor: &RigidBody,
    _target: &RigidBody
) -> Option<Vec3>

Returns a new position for target based on self and anchor.

fn rotation(
    &mut self,
    _angle: Quat,
    _anchor: &RigidBody,
    _target: &RigidBody
) -> Option<Quat>

Returns a new rotation for target based on self and anchor.

fn linear_velocity(
    &mut self,
    _offset: Vec3,
    _anchor: &RigidBody,
    _target: &RigidBody
) -> Option<Vec3>

Returns a new linear velocity for target based on self and anchor.

fn angular_velocity(
    &mut self,
    _angle: Quat,
    _anchor: &RigidBody,
    _target: &RigidBody
) -> Option<Quat>

Returns a new angular velocity for target based on self and anchor.

fn linear_impulse(
    &mut self,
    _offset: Vec3,
    _anchor: &RigidBody,
    _target: &RigidBody
) -> Option<Vec3>

Returns a linear impulse to apply to target based on self and anchor.

fn angular_impulse(
    &mut self,
    _angle: Quat,
    _anchor: &RigidBody,
    _target: &RigidBody
) -> Option<Quat>

Returns an angular impulse to apply to target based on self and anchor.

Loading content...

Implementors

impl JointBehaviour for FixedJointBehaviour[src]

impl JointBehaviour for MechanicalJointBehaviour[src]

impl JointBehaviour for SpringJointBehaviour[src]

Loading content...