[][src]Struct box2d_rs::joints::b2_revolute_joint::B2revoluteJoint

pub struct B2revoluteJoint<D: UserDataType> { /* fields omitted */ }

A revolute joint constrains two bodies to share a common point while they are free to rotate about the point. The relative rotation about the shared point is the joint angle. You can limit the relative rotation with a joint limit that specifies a lower and upper angle. You can use a motor to drive the relative rotation about the shared point. A maximum motor torque is provided so that infinite forces are not generated.

Implementations

impl<D: UserDataType> B2revoluteJoint<D>[src]

pub fn get_local_anchor_a(&self) -> B2vec2[src]

The local anchor point relative to body_a's origin.

pub fn get_local_anchor_b(&self) -> B2vec2[src]

The local anchor point relative to body_b's origin.

pub fn get_reference_angle(&self) -> f32[src]

Get the reference angle.

pub fn get_joint_angle(&self) -> f32[src]

Get the current joint angle in radians.

pub fn get_joint_speed(&self) -> f32[src]

Get the current joint angle speed in radians per second.

pub fn is_limit_enabled(&self) -> bool[src]

Is the joint limit enabled?

pub fn enable_limit(&mut self, flag: bool)[src]

Enable/disable the joint limit.

pub fn get_lower_limit(&self) -> f32[src]

Get the lower joint limit in radians.

pub fn get_upper_limit(&self) -> f32[src]

Get the upper joint limit in radians.

pub fn set_limits(&mut self, lower: f32, upper: f32)[src]

Set the joint limits in radians.

pub fn is_motor_enabled(&self) -> bool[src]

Is the joint motor enabled?

pub fn enable_motor(&mut self, flag: bool)[src]

Enable/disable the joint motor.

pub fn set_motor_speed(&mut self, speed: f32)[src]

Set the motor speed in radians per second.

pub fn get_motor_speed(&self) -> f32[src]

Get the motor speed in radians per second.

pub fn set_max_motor_torque(&mut self, torque: f32)[src]

Set the maximum motor torque, usually in n-m.

pub fn get_max_motor_torque(&self) -> f32[src]

pub fn get_motor_torque(&self, inv_dt: f32) -> f32[src]

Get the current motor torque given the inverse time step. Unit is n*m.

Trait Implementations

impl<D: UserDataType> B2jointTraitDyn<D> for B2revoluteJoint<D>[src]

pub fn get_reaction_force(&self, inv_dt: f32) -> B2vec2[src]

Get the reaction force given the inverse time step. Unit is n.

pub fn get_reaction_torque(&self, inv_dt: f32) -> f32[src]

Get the reaction torque due to the joint limit given the inverse time step. Unit is n*m.

pub fn dump(&self)[src]

dump joint to dmLog

impl<D: UserDataType> ToDerivedJoint<D> for B2revoluteJoint<D>[src]

Auto Trait Implementations

impl<D> !RefUnwindSafe for B2revoluteJoint<D>

impl<D> !Send for B2revoluteJoint<D>

impl<D> !Sync for B2revoluteJoint<D>

impl<D> Unpin for B2revoluteJoint<D> where
    <D as UserDataType>::Joint: Unpin

impl<D> !UnwindSafe for B2revoluteJoint<D>

Blanket Implementations

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

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

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

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

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

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.