pub struct GltfPhysicsBody {
pub node_name: String,
pub mass: f64,
pub linear_velocity: [f64; 3],
pub angular_velocity: [f64; 3],
pub is_static: bool,
pub friction: f64,
pub restitution: f64,
pub collider: GltfColliderShape,
}Expand description
Physics body descriptor for glTF KHR_physics_rigid_bodies extension.
Fields§
§node_name: StringNode name in the glTF scene.
mass: f64Mass in kg.
linear_velocity: [f64; 3]Linear velocity [vx, vy, vz].
angular_velocity: [f64; 3]Angular velocity [wx, wy, wz].
is_static: boolIs this a static (non-moving) body?
friction: f64Friction coefficient.
restitution: f64Restitution (bounciness).
collider: GltfColliderShapeCollider shape type.
Implementations§
Trait Implementations§
Source§impl Clone for GltfPhysicsBody
impl Clone for GltfPhysicsBody
Source§fn clone(&self) -> GltfPhysicsBody
fn clone(&self) -> GltfPhysicsBody
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GltfPhysicsBody
impl RefUnwindSafe for GltfPhysicsBody
impl Send for GltfPhysicsBody
impl Sync for GltfPhysicsBody
impl Unpin for GltfPhysicsBody
impl UnsafeUnpin for GltfPhysicsBody
impl UnwindSafe for GltfPhysicsBody
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.