[−][src]Struct rapier3d::dynamics::MassProperties
The local mass properties of a rigid-body.
Fields
local_com: Point<f32, U3>
The center of mass of a rigid-body expressed in its local-space.
inv_mass: f32
The inverse of the mass of a rigid-body.
If this is zero, the rigid-body is assumed to have infinite mass.
inv_principal_inertia_sqrt: Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
The inverse of the principal angular inertia of the rigid-body.
Components set to zero are assumed to be infinite along the corresponding principal axis.
principal_inertia_local_frame: Unit<Quaternion<f32>>
The principal vectors of the local angular inertia tensor of the rigid-body.
Implementations
impl MassProperties
[src]
pub fn new(
local_com: Point<f32, U3>,
mass: f32,
principal_inertia: Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
) -> MassProperties
[src]
local_com: Point<f32, U3>,
mass: f32,
principal_inertia: Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
) -> MassProperties
Initializes the mass properties from the given center-of-mass, mass, and principal angular inertia.
The center-of-mass is specified in the local-space of the rigid-body. The principal angular inertia are the angular inertia along the coordinate axes in the local-space of the rigid-body.
pub fn with_principal_inertia_frame(
local_com: Point<f32, U3>,
mass: f32,
principal_inertia: Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>,
principal_inertia_local_frame: Unit<Quaternion<f32>>
) -> MassProperties
[src]
local_com: Point<f32, U3>,
mass: f32,
principal_inertia: Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>,
principal_inertia_local_frame: Unit<Quaternion<f32>>
) -> MassProperties
Initializes the mass properties from the given center-of-mass, mass, and principal angular inertia.
The center-of-mass is specified in the local-space of the rigid-body.
The principal angular inertia are the angular inertia along the coordinate axes defined by
the principal_inertia_local_frame
expressed in the local-space of the rigid-body.
pub fn with_inertia_matrix(
local_com: Point<f32, U3>,
mass: f32,
inertia: Matrix<f32, U3, U3, <DefaultAllocator as Allocator<f32, U3, U3>>::Buffer>
) -> MassProperties
[src]
local_com: Point<f32, U3>,
mass: f32,
inertia: Matrix<f32, U3, U3, <DefaultAllocator as Allocator<f32, U3, U3>>::Buffer>
) -> MassProperties
Initialize a new MassProperties
from a given center-of-mass, mass, and angular inertia matrix.
The angular inertia matrix will be diagonalized in order to extract the principal inertia values and principal inertia frame.
pub fn world_com(
&self,
pos: &Isometry<f32, U3, Unit<Quaternion<f32>>>
) -> Point<f32, U3>
[src]
&self,
pos: &Isometry<f32, U3, Unit<Quaternion<f32>>>
) -> Point<f32, U3>
The world-space center of mass of the rigid-body.
pub fn world_inv_inertia_sqrt(
&self,
rot: &Unit<Quaternion<f32>>
) -> SdpMatrix3<f32>
[src]
&self,
rot: &Unit<Quaternion<f32>>
) -> SdpMatrix3<f32>
The world-space inverse angular inertia tensor of the rigid-body.
pub fn reconstruct_inverse_inertia_matrix(
&self
) -> Matrix<f32, U3, U3, <DefaultAllocator as Allocator<f32, U3, U3>>::Buffer>
[src]
&self
) -> Matrix<f32, U3, U3, <DefaultAllocator as Allocator<f32, U3, U3>>::Buffer>
Reconstructs the inverse angular inertia tensor of the rigid body from its principal inertia values and axes.
pub fn reconstruct_inertia_matrix(
&self
) -> Matrix<f32, U3, U3, <DefaultAllocator as Allocator<f32, U3, U3>>::Buffer>
[src]
&self
) -> Matrix<f32, U3, U3, <DefaultAllocator as Allocator<f32, U3, U3>>::Buffer>
Reconstructs the angular inertia tensor of the rigid body from its principal inertia values and axes.
pub fn transform_by(
&self,
m: &Isometry<f32, U3, Unit<Quaternion<f32>>>
) -> MassProperties
[src]
&self,
m: &Isometry<f32, U3, Unit<Quaternion<f32>>>
) -> MassProperties
Transform each element of the mass properties.
impl MassProperties
[src]
pub fn from_ball(density: f32, radius: f32) -> MassProperties
[src]
Computes the mass properties of a ball.
impl MassProperties
[src]
pub fn from_capsule(
density: f32,
a: Point<f32, U3>,
b: Point<f32, U3>,
radius: f32
) -> MassProperties
[src]
density: f32,
a: Point<f32, U3>,
b: Point<f32, U3>,
radius: f32
) -> MassProperties
Computes the mass properties of a capsule.
impl MassProperties
[src]
pub fn from_compound(
density: f32,
shapes: &[(Isometry<f32, U3, Unit<Quaternion<f32>>>, SharedShape)]
) -> MassProperties
[src]
density: f32,
shapes: &[(Isometry<f32, U3, Unit<Quaternion<f32>>>, SharedShape)]
) -> MassProperties
Computes the mass properties of a compound shape.
impl MassProperties
[src]
pub fn from_cone(density: f32, half_height: f32, radius: f32) -> MassProperties
[src]
Computes the mass properties of a cone.
impl MassProperties
[src]
pub fn from_convex_polyhedron(
density: f32,
vertices: &[Point<f32, U3>],
indices: &[[u32; 3]]
) -> MassProperties
[src]
density: f32,
vertices: &[Point<f32, U3>],
indices: &[[u32; 3]]
) -> MassProperties
Computes the mass properties of a convex polyhedron.
impl MassProperties
[src]
pub fn from_cuboid(
density: f32,
half_extents: Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
) -> MassProperties
[src]
density: f32,
half_extents: Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
) -> MassProperties
Computes the mass properties of a cuboid.
impl MassProperties
[src]
pub fn from_cylinder(
density: f32,
half_height: f32,
radius: f32
) -> MassProperties
[src]
density: f32,
half_height: f32,
radius: f32
) -> MassProperties
Computes the mass properties of a cylinder.
Trait Implementations
impl AbsDiffEq<MassProperties> for MassProperties
[src]
type Epsilon = f32
Used for specifying relative comparisons.
pub fn default_epsilon(
) -> <MassProperties as AbsDiffEq<MassProperties>>::Epsilon
[src]
) -> <MassProperties as AbsDiffEq<MassProperties>>::Epsilon
pub fn abs_diff_eq(
&self,
other: &MassProperties,
epsilon: <MassProperties as AbsDiffEq<MassProperties>>::Epsilon
) -> bool
[src]
&self,
other: &MassProperties,
epsilon: <MassProperties as AbsDiffEq<MassProperties>>::Epsilon
) -> bool
pub fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
[src]
impl Add<MassProperties> for MassProperties
[src]
type Output = MassProperties
The resulting type after applying the +
operator.
pub fn add(self, other: MassProperties) -> MassProperties
[src]
impl AddAssign<MassProperties> for MassProperties
[src]
pub fn add_assign(&mut self, rhs: MassProperties)
[src]
impl Clone for MassProperties
[src]
pub fn clone(&self) -> MassProperties
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for MassProperties
[src]
impl Debug for MassProperties
[src]
impl PartialEq<MassProperties> for MassProperties
[src]
pub fn eq(&self, other: &MassProperties) -> bool
[src]
pub fn ne(&self, other: &MassProperties) -> bool
[src]
impl RelativeEq<MassProperties> for MassProperties
[src]
pub fn default_max_relative(
) -> <MassProperties as AbsDiffEq<MassProperties>>::Epsilon
[src]
) -> <MassProperties as AbsDiffEq<MassProperties>>::Epsilon
pub fn relative_eq(
&self,
other: &MassProperties,
epsilon: <MassProperties as AbsDiffEq<MassProperties>>::Epsilon,
max_relative: <MassProperties as AbsDiffEq<MassProperties>>::Epsilon
) -> bool
[src]
&self,
other: &MassProperties,
epsilon: <MassProperties as AbsDiffEq<MassProperties>>::Epsilon,
max_relative: <MassProperties as AbsDiffEq<MassProperties>>::Epsilon
) -> bool
pub fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
impl StructuralPartialEq for MassProperties
[src]
impl Sub<MassProperties> for MassProperties
[src]
type Output = MassProperties
The resulting type after applying the -
operator.
pub fn sub(self, other: MassProperties) -> MassProperties
[src]
impl SubAssign<MassProperties> for MassProperties
[src]
pub fn sub_assign(&mut self, rhs: MassProperties)
[src]
impl Sum<MassProperties> for MassProperties
[src]
pub fn sum<I>(iter: I) -> MassProperties where
I: Iterator<Item = MassProperties>,
[src]
I: Iterator<Item = MassProperties>,
impl Zero for MassProperties
[src]
Auto Trait Implementations
impl RefUnwindSafe for MassProperties
[src]
impl Send for MassProperties
[src]
impl Sync for MassProperties
[src]
impl Unpin for MassProperties
[src]
impl UnwindSafe for MassProperties
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, Right> ClosedAdd<Right> for T where
T: Add<Right, Output = T> + AddAssign<Right>,
[src]
T: Add<Right, Output = T> + AddAssign<Right>,
impl<T, Right> ClosedSub<Right> for T where
T: Sub<Right, Output = T> + SubAssign<Right>,
[src]
T: Sub<Right, Output = T> + SubAssign<Right>,
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
[src]
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Scalar for T where
T: PartialEq<T> + Copy + Any + Debug,
[src]
T: PartialEq<T> + Copy + Any + Debug,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,