pub enum PartShape {
Ball {
at: [f32; 2],
z: f32,
r: f32,
},
Drop {
at: [f32; 2],
z: f32,
r: f32,
squash: f32,
stretch: f32,
},
Capsule {
from: [f32; 2],
to: [f32; 2],
z: f32,
r: f32,
},
Tube {
points: Vec<[f32; 2]>,
z: f32,
r: f32,
},
Torus {
at: [f32; 2],
z: f32,
major: f32,
minor: f32,
},
Box {
at: [f32; 2],
z: f32,
half: [f32; 3],
round: f32,
angle: f32,
},
}Variants§
Implementations§
Source§impl PartShape
impl PartShape
pub fn ball() -> Self
pub fn drop() -> Self
pub fn capsule(from: [f32; 2], to: [f32; 2]) -> Self
pub fn tube(points: Vec<[f32; 2]>) -> Self
pub fn torus() -> Self
pub fn cube() -> Self
pub fn objects(&self) -> usize
pub fn distance(&self, p: [f32; 3]) -> f32
pub fn bounds(&self) -> ([f32; 3], [f32; 3])
pub fn mesh(&self, error: f32) -> Mesh
Trait Implementations§
impl StructuralPartialEq for PartShape
Auto Trait Implementations§
impl Freeze for PartShape
impl RefUnwindSafe for PartShape
impl Send for PartShape
impl Sync for PartShape
impl Unpin for PartShape
impl UnsafeUnpin for PartShape
impl UnwindSafe for PartShape
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