pub enum Shape {
Sphere {
center: Vec3,
radius: f32,
},
HalfSpace {
normal: Vec3,
offset: f32,
},
HalfSpace4D {
normal: Vec4,
offset: f32,
},
Box3 {
half_extents: Vec3,
},
Polygon2D {
vertices: Vec<Vec2>,
},
ConvexPolytope3D {
vertices: Vec<Vec3>,
},
ConvexPolytope4D {
vertices: Vec<Vec4>,
},
HyperSphere4D {
center: Vec4,
radius: f32,
},
}Variants§
Sphere
HalfSpace
HalfSpace4D
Only meaningful on a static body (inv_mass = 0).
Box3
Polygon2D
ConvexPolytope3D
ConvexPolytope4D
HyperSphere4D
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Shape
impl<'de> Deserialize<'de> for Shape
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Shape, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Shape, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Primitive4 for Shape
impl Primitive4 for Shape
Source§impl Serialize for Shape
impl Serialize for Shape
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnsafeUnpin for Shape
impl UnwindSafe for Shape
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