[−][src]Struct box2d_rs::joints::b2_prismatic_joint::B2prismaticJoint
A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in body_a. Relative rotation is prevented. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint friction.
Implementations
impl<D: UserDataType> B2prismaticJoint<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_local_axis_a(&self) -> B2vec2
[src]
The local joint axis relative to body_a.
pub fn get_reference_angle(&self) -> f32
[src]
Get the reference angle.
pub fn get_joint_translation(&self) -> f32
[src]
Get the current joint translation, usually in meters.
pub fn get_joint_speed(&self) -> f32
[src]
Get the current joint translation speed, usually in meters 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, usually in meters.
pub fn get_upper_limit(&self) -> f32
[src]
Get the upper joint limit, usually in meters.
pub fn set_limits(&mut self, lower: f32, upper: f32)
[src]
Set the joint limits, usually in meters.
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, usually in meters per second.
pub fn get_motor_speed(&self) -> f32
[src]
Get the motor speed, usually in meters per second.
pub fn set_max_motor_force(&mut self, force: f32)
[src]
Set the maximum motor force, usually in n.
pub fn get_max_motor_force(&self) -> f32
[src]
pub fn get_motor_force(&self, inv_dt: f32) -> f32
[src]
Get the current motor force given the inverse time step, usually in n.
Trait Implementations
impl<D: UserDataType> B2jointTraitDyn<D> for B2prismaticJoint<D>
[src]
pub fn get_base(&self) -> &B2joint<D>
[src]
pub fn get_base_mut(&mut self) -> &mut B2joint<D>
[src]
pub fn get_anchor_a(&self) -> B2vec2
[src]
pub fn get_anchor_b(&self) -> B2vec2
[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]
pub fn init_velocity_constraints(
&mut self,
data: &mut B2solverData,
positions: &mut [B2position],
velocities: &mut [B2velocity]
)
[src]
&mut self,
data: &mut B2solverData,
positions: &mut [B2position],
velocities: &mut [B2velocity]
)
pub fn solve_velocity_constraints(
&mut self,
data: &mut B2solverData,
velocities: &mut [B2velocity]
)
[src]
&mut self,
data: &mut B2solverData,
velocities: &mut [B2velocity]
)
pub fn solve_position_constraints(
&mut self,
data: &mut B2solverData,
positions: &mut [B2position]
) -> bool
[src]
&mut self,
data: &mut B2solverData,
positions: &mut [B2position]
) -> bool
pub fn dump(&self)
[src]
Dump to b2Log
pub fn draw(&self, draw: &mut dyn B2drawTrait)
[src]
pub fn shift_origin(&mut self, new_origin: B2vec2)
[src]
impl<D: UserDataType> ToDerivedJoint<D> for B2prismaticJoint<D>
[src]
pub fn as_derived(&self) -> JointAsDerived<'_, D>
[src]
pub fn as_derived_mut(&mut self) -> JointAsDerivedMut<'_, D>
[src]
Auto Trait Implementations
impl<D> !RefUnwindSafe for B2prismaticJoint<D>
impl<D> !Send for B2prismaticJoint<D>
impl<D> !Sync for B2prismaticJoint<D>
impl<D> Unpin for B2prismaticJoint<D> where
<D as UserDataType>::Joint: Unpin,
<D as UserDataType>::Joint: Unpin,
impl<D> !UnwindSafe for B2prismaticJoint<D>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,