pub struct b2RevoluteJointDef { /* private fields */ }Expand description
Revolute joint definition. This requires defining an anchor point where the bodies are joined. The definition uses local anchor points so that the initial configuration can violate the constraint slightly. You also need to specify the initial relative angle for joint limits. This helps when saving and loading a game. The local anchor points are measured from the body’s origin rather than the center of mass because:
- you might not know where the center of mass will be.
- if you add/remove shapes from a body and recompute the mass, the joints will be broken.
Implementations§
Trait Implementations§
Source§impl AsRef<b2JointDef> for b2RevoluteJointDef
impl AsRef<b2JointDef> for b2RevoluteJointDef
Source§fn as_ref(self: &b2RevoluteJointDef) -> &b2JointDef
fn as_ref(self: &b2RevoluteJointDef) -> &b2JointDef
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl CopyNew for b2RevoluteJointDef
impl CopyNew for b2RevoluteJointDef
Source§unsafe fn copy_new(
other: &b2RevoluteJointDef,
this: Pin<&mut MaybeUninit<b2RevoluteJointDef>>,
)
unsafe fn copy_new( other: &b2RevoluteJointDef, this: Pin<&mut MaybeUninit<b2RevoluteJointDef>>, )
Synthesized copy constructor.
Source§impl Drop for b2RevoluteJointDef
impl Drop for b2RevoluteJointDef
Source§fn drop(self: &mut b2RevoluteJointDef)
fn drop(self: &mut b2RevoluteJointDef)
Synthesized destructor.
Source§impl ExternType for b2RevoluteJointDef
impl ExternType for b2RevoluteJointDef
Source§impl MakeCppStorage for b2RevoluteJointDef
impl MakeCppStorage for b2RevoluteJointDef
Source§unsafe fn allocate_uninitialized_cpp_storage() -> *mut b2RevoluteJointDef
unsafe fn allocate_uninitialized_cpp_storage() -> *mut b2RevoluteJointDef
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 b2RevoluteJointDef)
unsafe fn free_uninitialized_cpp_storage(arg0: *mut b2RevoluteJointDef)
Frees a C++ allocation which has not yet
had a constructor called. Read more
Source§impl MoveNew for b2RevoluteJointDef
impl MoveNew for b2RevoluteJointDef
Source§unsafe fn move_new(
other: Pin<MoveRef<'_, b2RevoluteJointDef>>,
this: Pin<&mut MaybeUninit<b2RevoluteJointDef>>,
)
unsafe fn move_new( other: Pin<MoveRef<'_, b2RevoluteJointDef>>, this: Pin<&mut MaybeUninit<b2RevoluteJointDef>>, )
Synthesized move constructor.
impl UniquePtrTarget for b2RevoluteJointDef
impl VectorElement for b2RevoluteJointDef
impl WeakPtrTarget for b2RevoluteJointDef
Auto Trait Implementations§
impl !Send for b2RevoluteJointDef
impl !Sync for b2RevoluteJointDef
impl !Unpin for b2RevoluteJointDef
impl Freeze for b2RevoluteJointDef
impl RefUnwindSafe for b2RevoluteJointDef
impl UnsafeUnpin for b2RevoluteJointDef
impl UnwindSafe for b2RevoluteJointDef
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