pub struct JointBase(/* private fields */);Expand description
Base joint definition builder for common properties.
This configures b2JointDef fields shared by all joint types. Typically
you construct a specific joint def (e.g. RevoluteJointDef) with this as
its base.
Implementations§
Source§impl JointBase
impl JointBase
Sourcepub fn builder() -> JointBaseBuilder
pub fn builder() -> JointBaseBuilder
Start building a new JointBase from defaults.
Sourcepub fn from_raw(raw: b2JointDef) -> Self
pub fn from_raw(raw: b2JointDef) -> Self
Construct from the raw Box2D joint base definition value.
Sourcepub fn local_frame_a(&self) -> Transform
pub fn local_frame_a(&self) -> Transform
Local frame on body A.
Sourcepub fn local_frame_b(&self) -> Transform
pub fn local_frame_b(&self) -> Transform
Local frame on body B.
Sourcepub fn collide_connected(&self) -> bool
pub fn collide_connected(&self) -> bool
Whether the connected bodies should collide with each other.
Sourcepub fn force_threshold(&self) -> f32
pub fn force_threshold(&self) -> f32
Force threshold used for joint events.
Sourcepub fn torque_threshold(&self) -> f32
pub fn torque_threshold(&self) -> f32
Torque threshold used for joint events.
Sourcepub fn constraint_tuning(&self) -> ConstraintTuning
pub fn constraint_tuning(&self) -> ConstraintTuning
Shared constraint tuning on the base definition.
Sourcepub fn draw_scale(&self) -> f32
pub fn draw_scale(&self) -> f32
Debug draw scale.
Sourcepub fn into_raw(self) -> b2JointDef
pub fn into_raw(self) -> b2JointDef
Convert into the raw Box2D joint base definition value.
pub fn validate(&self) -> ApiResult<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JointBase
impl RefUnwindSafe for JointBase
impl !Send for JointBase
impl !Sync for JointBase
impl Unpin for JointBase
impl UnsafeUnpin for JointBase
impl UnwindSafe for JointBase
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