pub struct WorldDefBuilder { /* private fields */ }Expand description
Builder for WorldDef.
Implementations§
Source§impl WorldDefBuilder
impl WorldDefBuilder
Sourcepub fn gravity(self, gravity: impl Into<Vec3>) -> Self
pub fn gravity(self, gravity: impl Into<Vec3>) -> Self
Sets the gravity vector used by the world, usually in meters per second squared.
Sourcepub fn worker_count(self, worker_count: u32) -> Self
pub fn worker_count(self, worker_count: u32) -> Self
Sets the number of worker slots Box3D may use while stepping the world.
Sourcepub fn task_system(self, task_system: TaskSystem) -> Self
pub fn task_system(self, task_system: TaskSystem) -> Self
Installs the task-system adapter used by Box3D during World::step.
Sourcepub fn restitution_threshold(self, threshold: f32) -> Self
pub fn restitution_threshold(self, threshold: f32) -> Self
Sets the restitution speed threshold.
Sourcepub fn hit_event_threshold(self, threshold: f32) -> Self
pub fn hit_event_threshold(self, threshold: f32) -> Self
Sets the hit-event speed threshold.
Sourcepub fn contact_tuning(self, hertz: f32, damping_ratio: f32, speed: f32) -> Self
pub fn contact_tuning(self, hertz: f32, damping_ratio: f32, speed: f32) -> Self
Sets contact solver tuning and maximum recovery speed.
Sourcepub fn maximum_linear_speed(self, speed: f32) -> Self
pub fn maximum_linear_speed(self, speed: f32) -> Self
Sets the maximum linear speed for bodies.
Sourcepub fn enable_sleep(self, enabled: bool) -> Self
pub fn enable_sleep(self, enabled: bool) -> Self
Enables or disables body sleeping.
Sourcepub fn enable_continuous(self, enabled: bool) -> Self
pub fn enable_continuous(self, enabled: bool) -> Self
Enables or disables continuous collision detection.
Trait Implementations§
Source§impl Clone for WorldDefBuilder
impl Clone for WorldDefBuilder
Source§fn clone(&self) -> WorldDefBuilder
fn clone(&self) -> WorldDefBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WorldDefBuilder
impl RefUnwindSafe for WorldDefBuilder
impl Send for WorldDefBuilder
impl Sync for WorldDefBuilder
impl Unpin for WorldDefBuilder
impl UnsafeUnpin for WorldDefBuilder
impl UnwindSafe for WorldDefBuilder
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