pub struct BoxHull { /* private fields */ }Expand description
Convex hull data for box-shaped hulls generated by Box3D.
Implementations§
Source§impl BoxHull
impl BoxHull
Sourcepub fn cube(half_width: f32) -> Result<Self>
pub fn cube(half_width: f32) -> Result<Self>
Creates an axis-aligned cube hull from a positive half-width.
Sourcepub fn new(hx: f32, hy: f32, hz: f32) -> Result<Self>
pub fn new(hx: f32, hy: f32, hz: f32) -> Result<Self>
Creates an axis-aligned box hull from positive half-widths.
Sourcepub fn offset(
hx: f32,
hy: f32,
hz: f32,
offset: impl Into<Vec3>,
) -> Result<Self>
pub fn offset( hx: f32, hy: f32, hz: f32, offset: impl Into<Vec3>, ) -> Result<Self>
Creates an axis-aligned box hull offset from the local origin.
Sourcepub fn transformed(
hx: f32,
hy: f32,
hz: f32,
transform: Transform,
) -> Result<Self>
pub fn transformed( hx: f32, hy: f32, hz: f32, transform: Transform, ) -> Result<Self>
Creates a box hull with a local transform baked into the hull data.
Sourcepub fn scaled(
half_widths: impl Into<Vec3>,
transform: Transform,
post_scale: impl Into<Vec3>,
) -> Result<Self>
pub fn scaled( half_widths: impl Into<Vec3>, transform: Transform, post_scale: impl Into<Vec3>, ) -> Result<Self>
Creates a box hull after applying a post scale.
Sourcepub fn scale_box(
half_widths: impl Into<Vec3>,
transform: Transform,
post_scale: impl Into<Vec3>,
min_half_width: f32,
) -> Result<ScaledBox>
pub fn scale_box( half_widths: impl Into<Vec3>, transform: Transform, post_scale: impl Into<Vec3>, min_half_width: f32, ) -> Result<ScaledBox>
Scales box half-widths and transform while preserving a minimum half-width.
Sourcepub const fn hull_data(&self) -> &b3HullData
pub const fn hull_data(&self) -> &b3HullData
Returns the hull portion of the box hull data.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BoxHull
impl RefUnwindSafe for BoxHull
impl Send for BoxHull
impl Sync for BoxHull
impl Unpin for BoxHull
impl UnsafeUnpin for BoxHull
impl UnwindSafe for BoxHull
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