pub struct Shape {
pub hollow: Option<bool>,
pub mass: Option<f32>,
pub density: Option<f32>,
pub physics_material: Option<Box<DefInstance<PhysicsMaterial>>>,
pub geom: ShapeGeom,
pub transform: Vec<RigidTransform>,
pub extra: Vec<Extra>,
}
Expand description
Describes components of a RigidBody
.
Fields§
§hollow: Option<bool>
If true, the mass is distributed along the surface of the shape.
mass: Option<f32>
The mass of the shape. If not provided, it is derived from density x shape volume.
density: Option<f32>
The density of the shape. If not provided, it is derived from mass/shape volume.
physics_material: Option<Box<DefInstance<PhysicsMaterial>>>
The PhysicsMaterial
used for this shape.
geom: ShapeGeom
§transform: Vec<RigidTransform>
Transformation for the shape. Any combination of these elements in any order.
See Node
for additional information.
extra: Vec<Extra>
Provides arbitrary additional information about this element.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin 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