pub struct ShapeDefBuilder { /* private fields */ }
Implementations§
Source§impl ShapeDefBuilder
impl ShapeDefBuilder
Sourcepub fn material(self, mat: SurfaceMaterial) -> Self
pub fn material(self, mat: SurfaceMaterial) -> Self
Set the surface material (friction, restitution, etc.).
Sourcepub fn enable_custom_filtering(self, flag: bool) -> Self
pub fn enable_custom_filtering(self, flag: bool) -> Self
Enable user-provided filtering callback.
Note: To receive custom filter calls you must also register a world-level
callback via World::set_custom_filter_callback
.
Sourcepub fn enable_sensor_events(self, flag: bool) -> Self
pub fn enable_sensor_events(self, flag: bool) -> Self
Emit sensor begin/end touch events.
Sourcepub fn enable_contact_events(self, flag: bool) -> Self
pub fn enable_contact_events(self, flag: bool) -> Self
Emit contact begin/end events.
Sourcepub fn enable_hit_events(self, flag: bool) -> Self
pub fn enable_hit_events(self, flag: bool) -> Self
Emit impact hit events when above threshold.
Sourcepub fn enable_pre_solve_events(self, flag: bool) -> Self
pub fn enable_pre_solve_events(self, flag: bool) -> Self
Emit pre-solve events (advanced).
Note: To receive pre-solve events you must also register a world-level
callback via World::set_pre_solve_callback
.
Sourcepub fn invoke_contact_creation(self, flag: bool) -> Self
pub fn invoke_contact_creation(self, flag: bool) -> Self
Invoke user callback on contact creation.
Sourcepub fn update_body_mass(self, flag: bool) -> Self
pub fn update_body_mass(self, flag: bool) -> Self
Recompute body mass when adding/removing this shape.
pub fn build(self) -> ShapeDef
Trait Implementations§
Source§impl Clone for ShapeDefBuilder
impl Clone for ShapeDefBuilder
Source§fn clone(&self) -> ShapeDefBuilder
fn clone(&self) -> ShapeDefBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ShapeDefBuilder
impl RefUnwindSafe for ShapeDefBuilder
impl !Send for ShapeDefBuilder
impl !Sync for ShapeDefBuilder
impl Unpin for ShapeDefBuilder
impl UnwindSafe for ShapeDefBuilder
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