Struct dae_parser::Shape [−][src]
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.
Trait Implementations
Parse an XML element into this type. In most cases, the parser will require with a
debug_assert
that the element to parse has name Self::NAME
. Read more
Parse an XML element and return the data structure in a Box
.
This can be faster in some cases when the data structure is large. Read more
Parse a single required element from the given element iterator.
Parse an optional element from the given element iterator, using Self::NAME
to
determine if it is the correct type. Read more
Parse an optional boxed element from the given element iterator, using Self::NAME
to
determine if it is the correct type. Read more
Parse a list of elements from the given element iterator,
as long as it continues yielding elements of name Self::NAME
. Read more
Parse a list of elements from the given element iterator,
as long as it continues yielding elements of name Self::NAME
,
and assert that the resulting list has length at least N
. Read more
Auto Trait Implementations
impl RefUnwindSafe for Shape
impl UnwindSafe for Shape
Blanket Implementations
Mutably borrows from an owned value. Read more