pub struct b2GearJoint { /* private fields */ }Expand description
A gear joint is used to connect two joints together. Either joint can be a revolute or prismatic joint. You specify a gear ratio to bind the motions together: coordinate1 + ratio * coordinate2 = constant The ratio can be negative or positive. If one joint is a revolute joint and the other joint is a prismatic joint, then the ratio will have units of length or units of 1/length. @warning You have to manually destroy the gear joint if joint1 or joint2 is destroyed.
Implementations§
Source§impl b2GearJoint
impl b2GearJoint
pub fn GetAnchorA(self: &b2GearJoint) -> b2Vec2
pub fn GetAnchorB(self: &b2GearJoint) -> b2Vec2
pub fn GetReactionForce(self: &b2GearJoint, inv_dt: f32) -> b2Vec2
pub fn GetReactionTorque(self: &b2GearJoint, inv_dt: f32) -> f32
Sourcepub fn Dump(self: Pin<&mut b2GearJoint>)
pub fn Dump(self: Pin<&mut b2GearJoint>)
Dump joint to dmLog
Source§impl b2GearJoint
impl b2GearJoint
Trait Implementations§
Source§impl AsRef<b2Joint> for b2GearJoint
impl AsRef<b2Joint> for b2GearJoint
Source§fn as_ref(self: &b2GearJoint) -> &b2Joint
fn as_ref(self: &b2GearJoint) -> &b2Joint
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl CopyNew for b2GearJoint
impl CopyNew for b2GearJoint
Source§unsafe fn copy_new(
other: &b2GearJoint,
this: Pin<&mut MaybeUninit<b2GearJoint>>,
)
unsafe fn copy_new( other: &b2GearJoint, this: Pin<&mut MaybeUninit<b2GearJoint>>, )
Synthesized copy constructor.
Source§impl Drop for b2GearJoint
impl Drop for b2GearJoint
Source§fn drop(self: &mut b2GearJoint)
fn drop(self: &mut b2GearJoint)
Synthesized destructor.
Source§impl ExternType for b2GearJoint
impl ExternType for b2GearJoint
Source§impl MakeCppStorage for b2GearJoint
impl MakeCppStorage for b2GearJoint
Source§unsafe fn allocate_uninitialized_cpp_storage() -> *mut b2GearJoint
unsafe fn allocate_uninitialized_cpp_storage() -> *mut b2GearJoint
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 b2GearJoint)
unsafe fn free_uninitialized_cpp_storage(arg0: *mut b2GearJoint)
Frees a C++ allocation which has not yet
had a constructor called. Read more
impl UniquePtrTarget for b2GearJoint
impl WeakPtrTarget for b2GearJoint
Auto Trait Implementations§
impl Freeze for b2GearJoint
impl RefUnwindSafe for b2GearJoint
impl !Send for b2GearJoint
impl !Sync for b2GearJoint
impl !Unpin for b2GearJoint
impl UnwindSafe for b2GearJoint
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