[][src]Struct nphysics2d::algebra::Force2

#[repr(C)]
pub struct Force2<N: Real> { pub linear: Vector2<N>, pub angular: N, }

A force with a linear and angular (torque) component.

Fields

The linear force.

The torque.

Methods

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

Creates a force from its linear and angular components.

A zero force.

Create a force from a slice where the entries 0 and 1 are for the linear part and 2 for the angular part.

Create a force from a vector where the entries 0 and 1 are for the linear part and 2 for the angular part.

Create a pure torque.

Create a pure torque.

Create a pure linear force.

Creates the resultant of a linear force applied at the given point (relative to the center of mass).

Creates the resultant of a torque applied at the given point (relative to the center of mass).

Creates the resultant of a torque applied at the given point (relative to the center of mass).

The angular part of the force.

Apply the given transformation to this force.

This force seen as a slice.

The two first entries contain the linear part and the third entry contais the angular part.

This force seen as a vector.

The two first entries contain the linear part and the third entry contais the angular part.

This force seen as a mutable vector.

The two first entries contain the linear part and the third entry contais the angular part.

Trait Implementations

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

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

Performs copy-assignment from source. Read more

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

The resulting type after applying the + operator.

impl<N: Real> Sub<Force2<N>> for Force2<N>
[src]

The resulting type after applying the - operator.

impl<N: Real> Mul<N> for Force2<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> Neg for Force2<N>
[src]

The resulting type after applying the - operator.

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

impl<N: Real> SubAssign<Force2<N>> for Force2<N>
[src]

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

Auto Trait Implementations

impl<N> Send for Force2<N> where
    N: Scalar

impl<N> Sync for Force2<N> where
    N: Scalar

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> ClosedNeg for T where
    T: Neg<Output = T>, 

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

impl<T, Right> ClosedSub for T where
    T: Sub<Right, Output = T> + SubAssign<Right>, 

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

impl<T> Same for T

Should always be Self