Struct libliquidfun_sys::box2d::ffi::b2DistanceJoint
source · #[repr(C, align(8))]pub struct b2DistanceJoint { /* private fields */ }Expand description
A distance joint constrains two points on two bodies to remain at a fixed distance from each other. You can view this as a massless, rigid rod.
Implementations§
source§impl b2DistanceJoint
impl b2DistanceJoint
sourcepub fn GetLength(self: &b2DistanceJoint) -> f32
pub fn GetLength(self: &b2DistanceJoint) -> f32
Get the rest length
sourcepub fn SetDamping(self: Pin<&mut b2DistanceJoint>, damping: f32)
pub fn SetDamping(self: Pin<&mut b2DistanceJoint>, damping: f32)
Set/get linear damping in N*s/m
pub fn GetDamping(self: &b2DistanceJoint) -> f32
pub fn GetAnchorA(self: &b2DistanceJoint) -> b2Vec2
pub fn GetAnchorB(self: &b2DistanceJoint) -> b2Vec2
sourcepub fn GetReactionForce(self: &b2DistanceJoint, inv_dt: f32) -> b2Vec2
pub fn GetReactionForce(self: &b2DistanceJoint, inv_dt: f32) -> b2Vec2
Get the reaction force given the inverse time step. Unit is N.
sourcepub fn GetReactionTorque(self: &b2DistanceJoint, inv_dt: f32) -> f32
pub fn GetReactionTorque(self: &b2DistanceJoint, inv_dt: f32) -> f32
Get the reaction torque given the inverse time step. Unit is N*m. This is always zero for a distance joint.
sourcepub fn Dump(self: Pin<&mut b2DistanceJoint>)
pub fn Dump(self: Pin<&mut b2DistanceJoint>)
Dump joint to dmLog
pub unsafe fn Draw(self: &b2DistanceJoint, draw: *mut b2Draw)
source§impl<'a> b2DistanceJoint
impl<'a> b2DistanceJoint
sourcepub fn GetLocalAnchorA(&'a self) -> &'a b2Vec2
pub fn GetLocalAnchorA(&'a self) -> &'a b2Vec2
The local anchor point relative to bodyA’s origin.
source§impl<'a> b2DistanceJoint
impl<'a> b2DistanceJoint
sourcepub fn GetLocalAnchorB(&'a self) -> &'a b2Vec2
pub fn GetLocalAnchorB(&'a self) -> &'a b2Vec2
The local anchor point relative to bodyB’s origin.
source§impl b2DistanceJoint
impl b2DistanceJoint
sourcepub fn GetMinLength(&self) -> f32
pub fn GetMinLength(&self) -> f32
Get the minimum length
source§impl b2DistanceJoint
impl b2DistanceJoint
sourcepub fn GetMaxLength(&self) -> f32
pub fn GetMaxLength(&self) -> f32
Get the maximum length
source§impl b2DistanceJoint
impl b2DistanceJoint
sourcepub fn GetCurrentLength(&self) -> f32
pub fn GetCurrentLength(&self) -> f32
Get the current length
source§impl b2DistanceJoint
impl b2DistanceJoint
sourcepub fn SetStiffness(self: Pin<&mut Self>, stiffness: f32)
pub fn SetStiffness(self: Pin<&mut Self>, stiffness: f32)
Set/get the linear stiffness in N/m
source§impl b2DistanceJoint
impl b2DistanceJoint
pub fn GetStiffness(&self) -> f32
Trait Implementations§
source§impl AsRef<b2Joint> for b2DistanceJoint
impl AsRef<b2Joint> for b2DistanceJoint
source§fn as_ref(self: &b2DistanceJoint) -> &b2Joint
fn as_ref(self: &b2DistanceJoint) -> &b2Joint
Converts this type into a shared reference of the (usually inferred) input type.
source§impl CopyNew for b2DistanceJoint
impl CopyNew for b2DistanceJoint
source§unsafe fn copy_new(
other: &b2DistanceJoint,
this: Pin<&mut MaybeUninit<b2DistanceJoint>>
)
unsafe fn copy_new( other: &b2DistanceJoint, this: Pin<&mut MaybeUninit<b2DistanceJoint>> )
Synthesized copy constructor.
source§impl Drop for b2DistanceJoint
impl Drop for b2DistanceJoint
source§fn drop(self: &mut b2DistanceJoint)
fn drop(self: &mut b2DistanceJoint)
Synthesized destructor.
source§impl ExternType for b2DistanceJoint
impl ExternType for b2DistanceJoint
source§impl MakeCppStorage for b2DistanceJoint
impl MakeCppStorage for b2DistanceJoint
source§unsafe fn allocate_uninitialized_cpp_storage() -> *mut b2DistanceJoint
unsafe fn allocate_uninitialized_cpp_storage() -> *mut b2DistanceJoint
Allocates heap space for this type in C++ and return a pointer
to that space, but do not initialize that space (i.e. do not
yet call a constructor). Read more
source§unsafe fn free_uninitialized_cpp_storage(arg0: *mut b2DistanceJoint)
unsafe fn free_uninitialized_cpp_storage(arg0: *mut b2DistanceJoint)
Frees a C++ allocation which has not yet
had a constructor called. Read more
impl UniquePtrTarget for b2DistanceJoint
impl WeakPtrTarget for b2DistanceJoint
Auto Trait Implementations§
impl RefUnwindSafe for b2DistanceJoint
impl !Send for b2DistanceJoint
impl !Sync for b2DistanceJoint
impl !Unpin for b2DistanceJoint
impl UnwindSafe for b2DistanceJoint
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more