[][src]Trait box2d_rs::b2_joint::B2jointTraitDyn

pub trait B2jointTraitDyn<D: UserDataType>: ToDerivedJoint<D> {
    pub fn get_base(&self) -> &B2joint<D>;
pub fn get_base_mut(&mut self) -> &mut B2joint<D>;
pub fn get_anchor_a(&self) -> B2vec2;
pub fn get_anchor_b(&self) -> B2vec2;
pub fn get_reaction_force(&self, inv_dt: f32) -> B2vec2;
pub fn get_reaction_torque(&self, inv_dt: f32) -> f32;
pub fn init_velocity_constraints(
        &mut self,
        data: &mut B2solverData,
        positions: &mut [B2position],
        velocities: &mut [B2velocity]
    );
pub fn solve_velocity_constraints(
        &mut self,
        data: &mut B2solverData,
        velocities: &mut [B2velocity]
    );
pub fn solve_position_constraints(
        &mut self,
        data: &mut B2solverData,
        positions: &mut [B2position]
    ) -> bool; pub fn dump(&self) { ... }
pub fn shift_origin(&mut self, new_origin: B2vec2) { ... }
pub fn draw(&self, draw: &mut dyn B2drawTrait) { ... } }

Required methods

pub fn get_base(&self) -> &B2joint<D>

pub fn get_base_mut(&mut self) -> &mut B2joint<D>

pub fn get_anchor_a(&self) -> B2vec2

Get the anchor point on body_a in world coordinates.

pub fn get_anchor_b(&self) -> B2vec2

Get the anchor point on body_b in world coordinates.

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

Get the reaction force on body_b at the joint anchor in Newtons.

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

Get the reaction torque on body_b in n*m.

pub fn init_velocity_constraints(
    &mut self,
    data: &mut B2solverData,
    positions: &mut [B2position],
    velocities: &mut [B2velocity]
)

pub fn solve_velocity_constraints(
    &mut self,
    data: &mut B2solverData,
    velocities: &mut [B2velocity]
)

pub fn solve_position_constraints(
    &mut self,
    data: &mut B2solverData,
    positions: &mut [B2position]
) -> bool

Loading content...

Provided methods

pub fn dump(&self)

dump this joint to the log file.

pub fn shift_origin(&mut self, new_origin: B2vec2)

Shift the origin for any points stored in world coordinates.

pub fn draw(&self, draw: &mut dyn B2drawTrait)

Debug draw this joint

Loading content...

Implementors

impl<D: UserDataType> B2jointTraitDyn<D> for B2distanceJoint<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 given the inverse time step. Unit is n*m. This is always zero for a distance joint.

pub fn dump(&self)[src]

dump joint to dmLog

impl<D: UserDataType> B2jointTraitDyn<D> for B2frictionJoint<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 dump(&self)[src]

dump joint to dmLog

impl<D: UserDataType> B2jointTraitDyn<D> for B2gearJoint<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 dump(&self)[src]

dump joint to dmLog

impl<D: UserDataType> B2jointTraitDyn<D> for B2motorJoint<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 dump(&self)[src]

Dump to b2Log

impl<D: UserDataType> B2jointTraitDyn<D> for B2mouseJoint<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 given the inverse time step. Unit is n*m. This is always zero for a distance joint.

pub fn shift_origin(&mut self, new_origin: B2vec2)[src]

Implement B2joint::shift_origin

pub fn dump(&self)[src]

dump joint to dmLog

impl<D: UserDataType> B2jointTraitDyn<D> for B2prismaticJoint<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 dump(&self)[src]

Dump to b2Log

pub fn draw(&self, draw: &mut dyn B2drawTrait)[src]

impl<D: UserDataType> B2jointTraitDyn<D> for B2pulleyJoint<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 shift_origin(&mut self, new_origin: B2vec2)[src]

Implement B2joint::shift_origin

pub fn dump(&self)[src]

dump joint to dmLog

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> B2jointTraitDyn<D> for B2ropeJoint<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 dump(&self)[src]

dump joint to dmLog

impl<D: UserDataType> B2jointTraitDyn<D> for B2weldJoint<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 dump(&self)[src]

dump joint to dmLog

impl<D: UserDataType> B2jointTraitDyn<D> for B2wheelJoint<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 dump(&self)[src]

dump joint to dmLog

pub fn draw(&self, draw: &mut dyn B2drawTrait)[src]

Debug draw this joint

Loading content...