[][src]Struct nphysics2d::algebra::Inertia2

pub struct Inertia2<N: Real> {
    pub linear: N,
    pub angular: N,
}

The inertia of a rigid body grouping both its mass and its angular inertia.

Fields

The linear part (mass) of the inertia.

The angular inertia.

Methods

impl<N: Real> Inertia2<N>
[src]

Creates an inertia from its linear and angular components.

Creates an inertia from its linear and angular components.

Get the mass.

Create a zero inertia.

Get the angular inertia tensor.

Convert the inertia into a matrix where the mass is represented as a 2x2 diagonal matrix on the upper-left corner, and the angular part as a 1x1 matrix on the lower-rigth corner.

Compute the inertia on the given coordinate frame.

Inverts this inetia matrix.

Sets the angular part to zero if it is not invertible.

Trait Implementations

impl<N: Copy + Real> Copy for Inertia2<N>
[src]

impl<N: Clone + Real> Clone for Inertia2<N>
[src]

Performs copy-assignment from source. Read more

impl<N: Real> Add<Inertia2<N>> for Inertia2<N>
[src]

The resulting type after applying the + operator.

impl<N: Real> Mul<Velocity2<N>> for Inertia2<N>
[src]

The resulting type after applying the * operator.

impl<N: Real> Mul<Force2<N>> for Inertia2<N>
[src]

The resulting type after applying the * operator.

impl<N: Real> AddAssign<Inertia2<N>> for Inertia2<N>
[src]

impl<N: Debug + Real> Debug for Inertia2<N>
[src]

Auto Trait Implementations

impl<N> Send for Inertia2<N>

impl<N> Sync for Inertia2<N>

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T, Right> ClosedAdd for T where
    T: Add<Right, Output = T> + AddAssign<Right>, 

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 

impl<T> Same for T

Should always be Self