pub struct b2Joint { /* private fields */ }Expand description
The base joint class. Joints are used to constraint two bodies together in various fashions. Some joints also feature limits and motors.
Implementations§
Source§impl b2Joint
impl b2Joint
Sourcepub fn GetType(self: &b2Joint) -> b2JointType
pub fn GetType(self: &b2Joint) -> b2JointType
Get the type of the concrete joint.
Sourcepub fn GetNext(self: Pin<&mut b2Joint>) -> *mut b2Joint
pub fn GetNext(self: Pin<&mut b2Joint>) -> *mut b2Joint
Get the next joint the world joint list.
pub fn GetNext1(self: &b2Joint) -> *const b2Joint
Sourcepub fn GetUserData<'a>(
self: Pin<&'a mut b2Joint>,
) -> Pin<&'a mut b2JointUserData>
pub fn GetUserData<'a>( self: Pin<&'a mut b2Joint>, ) -> Pin<&'a mut b2JointUserData>
Get the user data pointer.
Sourcepub fn IsEnabled(self: &b2Joint) -> bool
pub fn IsEnabled(self: &b2Joint) -> bool
Short-cut function to determine if either body is enabled.
Sourcepub fn GetAnchorA(self: &b2Joint) -> b2Vec2
pub fn GetAnchorA(self: &b2Joint) -> b2Vec2
Get the anchor point on bodyA in world coordinates.
Sourcepub fn GetAnchorB(self: &b2Joint) -> b2Vec2
pub fn GetAnchorB(self: &b2Joint) -> b2Vec2
Get the anchor point on bodyB in world coordinates.
Sourcepub fn GetReactionForce(self: &b2Joint, inv_dt: f32) -> b2Vec2
pub fn GetReactionForce(self: &b2Joint, inv_dt: f32) -> b2Vec2
Get the reaction force on bodyB at the joint anchor in Newtons.
Sourcepub fn GetReactionTorque(self: &b2Joint, inv_dt: f32) -> f32
pub fn GetReactionTorque(self: &b2Joint, inv_dt: f32) -> f32
Get the reaction torque on bodyB in N*m.
Sourcepub fn ShiftOrigin(self: Pin<&mut b2Joint>, newOrigin: &b2Vec2)
pub fn ShiftOrigin(self: Pin<&mut b2Joint>, newOrigin: &b2Vec2)
Shift the origin for any points stored in world coordinates.
Source§impl b2Joint
impl b2Joint
Sourcepub fn GetBodyA(self: Pin<&mut Self>) -> *mut b2Body
pub fn GetBodyA(self: Pin<&mut Self>) -> *mut b2Body
Get the first body attached to this joint.
Sourcepub fn GetBodyB(self: Pin<&mut Self>) -> *mut b2Body
pub fn GetBodyB(self: Pin<&mut Self>) -> *mut b2Body
Get the second body attached to this joint.
Sourcepub fn GetCollideConnected(&self) -> bool
pub fn GetCollideConnected(&self) -> bool
Get collide connected. Note: modifying the collide connect flag won’t work correctly because the flag is only checked when fixture AABBs begin to overlap.