Struct nphysics3d::algebra::Velocity3 [−][src]
A velocity structure combining both the linear angular velocities of a point.
Fields
linear: Vector3<N>
The linear velocity.
angular: Vector3<N>
The angular velocity.
Methods
impl<N: Real> Velocity3<N>
[src]
impl<N: Real> Velocity3<N>
pub fn new(linear: Vector3<N>, angular: Vector3<N>) -> Self
[src]
pub fn new(linear: Vector3<N>, angular: Vector3<N>) -> Self
Create velocity from its linear and angular parts.
pub fn new_with_vectors(linear: Vector3<N>, angular: Vector3<N>) -> Self
[src]
pub fn new_with_vectors(linear: Vector3<N>, angular: Vector3<N>) -> Self
Create velocity from its linear and angular parts.
pub fn angular(wx: N, wy: N, wz: N) -> Self
[src]
pub fn angular(wx: N, wy: N, wz: N) -> Self
Create a purely angular velocity.
pub fn linear(vx: N, vy: N, vz: N) -> Self
[src]
pub fn linear(vx: N, vy: N, vz: N) -> Self
Create a purely linear velocity.
pub fn zero() -> Self
[src]
pub fn zero() -> Self
Create a zero velocity.
pub fn angular_vector(&self) -> Vector3<N>
[src]
pub fn angular_vector(&self) -> Vector3<N>
The angular part of the velocity.
pub fn as_slice(&self) -> &[N]
[src]
pub fn as_slice(&self) -> &[N]
This velocity seen as a slice.
The linear part is stored first.
pub fn as_mut_slice(&mut self) -> &mut [N]
[src]
pub fn as_mut_slice(&mut self) -> &mut [N]
This velocity seen as a mutable slice.
The linear part is stored first.
pub fn as_vector(&self) -> &Vector6<N>
[src]
pub fn as_vector(&self) -> &Vector6<N>
This velocity seen as a vector.
The linear part is stored first. #[inline]
pub fn as_vector_mut(&mut self) -> &mut Vector6<N>
[src]
pub fn as_vector_mut(&mut self) -> &mut Vector6<N>
This velocity seen as a mutable vector.
The linear part is stored first. #[inline]
pub fn from_vector<S: Storage<N, U6>>(data: &Vector<N, U6, S>) -> Self
[src]
pub fn from_vector<S: Storage<N, U6>>(data: &Vector<N, U6, S>) -> Self
Create a velocity from a vector.
The linear part of the velocity is expected to be first inside of the input vector.
pub fn from_slice(data: &[N]) -> Self
[src]
pub fn from_slice(data: &[N]) -> Self
Create a velocity from a slice.
The linear part of the velocity is expected to be first inside of the input slice.
pub fn shift(&self, shift: &Vector3<N>) -> Self
[src]
pub fn shift(&self, shift: &Vector3<N>) -> Self
Compute the velocity of a point that is located at the coordinates shift
relative to the point having self
as velocity.
pub fn transformed(&self, iso: &Isometry3<N>) -> Self
[src]
pub fn transformed(&self, iso: &Isometry3<N>) -> Self
Transform each component of self
by iso
.
pub fn rotated(&self, rot: &UnitQuaternion<N>) -> Self
[src]
pub fn rotated(&self, rot: &UnitQuaternion<N>) -> Self
Rotate each component of self
by rot
.
Trait Implementations
impl<N: Copy + Real> Copy for Velocity3<N>
[src]
impl<N: Copy + Real> Copy for Velocity3<N>
impl<N: Clone + Real> Clone for Velocity3<N>
[src]
impl<N: Clone + Real> Clone for Velocity3<N>
fn clone(&self) -> Velocity3<N>
[src]
fn clone(&self) -> Velocity3<N>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<N: Debug + Real> Debug for Velocity3<N>
[src]
impl<N: Debug + Real> Debug for Velocity3<N>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<N: Real> Add<Velocity3<N>> for Velocity3<N>
[src]
impl<N: Real> Add<Velocity3<N>> for Velocity3<N>
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self
[src]
fn add(self, rhs: Self) -> Self
Performs the +
operation.
impl<N: Real> AddAssign<Velocity3<N>> for Velocity3<N>
[src]
impl<N: Real> AddAssign<Velocity3<N>> for Velocity3<N>
fn add_assign(&mut self, rhs: Self)
[src]
fn add_assign(&mut self, rhs: Self)
Performs the +=
operation.
impl<N: Real> Sub<Velocity3<N>> for Velocity3<N>
[src]
impl<N: Real> Sub<Velocity3<N>> for Velocity3<N>
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Self
[src]
fn sub(self, rhs: Self) -> Self
Performs the -
operation.
impl<N: Real> SubAssign<Velocity3<N>> for Velocity3<N>
[src]
impl<N: Real> SubAssign<Velocity3<N>> for Velocity3<N>
fn sub_assign(&mut self, rhs: Self)
[src]
fn sub_assign(&mut self, rhs: Self)
Performs the -=
operation.
impl<N: Real> Mul<N> for Velocity3<N>
[src]
impl<N: Real> Mul<N> for Velocity3<N>
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: N) -> Self
[src]
fn mul(self, rhs: N) -> Self
Performs the *
operation.
impl<N: Real> Mul<Velocity3<N>> for Inertia3<N>
[src]
impl<N: Real> Mul<Velocity3<N>> for Inertia3<N>