pub struct Hull { /* private fields */ }Expand description
Owned convex hull data allocated by Box3D.
Hull values own native memory and are intentionally not Send or Sync.
Implementations§
Source§impl Hull
impl Hull
Sourcepub fn from_points(
points: impl AsRef<[Vec3]>,
max_vertex_count: i32,
) -> Result<Self>
pub fn from_points( points: impl AsRef<[Vec3]>, max_vertex_count: i32, ) -> Result<Self>
Builds a convex hull from points with an upper bound on generated vertices.
Sourcepub fn cylinder(
height: f32,
radius: f32,
y_offset: f32,
sides: i32,
) -> Result<Self>
pub fn cylinder( height: f32, radius: f32, y_offset: f32, sides: i32, ) -> Result<Self>
Creates a cylinder hull.
Sourcepub fn cone(
height: f32,
radius1: f32,
radius2: f32,
slices: i32,
) -> Result<Self>
pub fn cone( height: f32, radius1: f32, radius2: f32, slices: i32, ) -> Result<Self>
Creates a cone or truncated cone hull.
Sourcepub fn clone_transformed(
&self,
transform: Transform,
scale: impl Into<Vec3>,
) -> Result<Self>
pub fn clone_transformed( &self, transform: Transform, scale: impl Into<Vec3>, ) -> Result<Self>
Clones this hull after applying a transform and non-zero scale.
Sourcepub fn as_hull_data(&self) -> &b3HullData
pub fn as_hull_data(&self) -> &b3HullData
Returns the raw Box3D hull data.
Trait Implementations§
Auto Trait Implementations§
impl !Send for Hull
impl !Sync for Hull
impl Freeze for Hull
impl RefUnwindSafe for Hull
impl Unpin for Hull
impl UnsafeUnpin for Hull
impl UnwindSafe for Hull
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