[−][src]Struct box2d_rs::joints::b2_rope_joint::B2ropeJoint
A rope joint enforces a maximum distance between two points on two bodies. It has no other effect. Warning: if you attempt to change the maximum length during the simulation you will get some non-physical behavior. A model that would allow you to dynamically modify the length would have some sponginess, so i chose not to implement it that way. See B2distanceJoint if you want to dynamically control length.
Implementations
impl<D: UserDataType> B2ropeJoint<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 set_max_length(&mut self, length: f32)
[src]
Set/Get the maximum length of the rope.
pub fn get_max_length(&self) -> f32
[src]
pub fn get_length(&self) -> f32
[src]
Trait Implementations
impl<D: UserDataType> B2jointTraitDyn<D> for B2ropeJoint<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 joint to dmLog
pub fn shift_origin(&mut self, new_origin: B2vec2)
[src]
pub fn draw(&self, draw: &mut dyn B2drawTrait)
[src]
impl<D: UserDataType> ToDerivedJoint<D> for B2ropeJoint<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 B2ropeJoint<D>
impl<D> !Send for B2ropeJoint<D>
impl<D> !Sync for B2ropeJoint<D>
impl<D> Unpin for B2ropeJoint<D> where
<D as UserDataType>::Joint: Unpin,
<D as UserDataType>::Joint: Unpin,
impl<D> !UnwindSafe for B2ropeJoint<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>,