Struct rhusics_core::Velocity [−][src]
pub struct Velocity<L, A> { /* fields omitted */ }
Velocity
Type parameters:
L
: Linear velocity, usuallyVector2
orVector3
A
: Angular velocity, usuallyScalar
orVector3
Methods
impl<L, A> Velocity<L, A> where
L: Zero,
A: Clone + Zero,
[src]
impl<L, A> Velocity<L, A> where
L: Zero,
A: Clone + Zero,
pub fn new(linear: L, angular: A) -> Self
[src]
pub fn new(linear: L, angular: A) -> Self
Create new velocity object, with both linear and angular velocity
pub fn from_linear(linear: L) -> Self
[src]
pub fn from_linear(linear: L) -> Self
Create new velocity object with only linear velocity
pub fn set_linear(&mut self, linear: L)
[src]
pub fn set_linear(&mut self, linear: L)
Set linear velocity
ⓘImportant traits for &'a mut Rpub fn linear(&self) -> &L
[src]
ⓘImportant traits for &'a mut R
pub fn linear(&self) -> &L
Get linear velocity
pub fn set_angular(&mut self, angular: A)
[src]
pub fn set_angular(&mut self, angular: A)
Set angular velocity
ⓘImportant traits for &'a mut Rpub fn angular(&self) -> &A
[src]
ⓘImportant traits for &'a mut R
pub fn angular(&self) -> &A
Get angular velocity
pub fn apply<B, P, R>(&self, pose: &B, dt: L::Scalar) -> B where
P: EuclideanSpace<Scalar = L::Scalar, Diff = L>,
L: VectorSpace,
L::Scalar: BaseFloat,
R: ApplyAngular<L::Scalar, A> + Rotation<P>,
B: Pose<P, R>,
[src]
pub fn apply<B, P, R>(&self, pose: &B, dt: L::Scalar) -> B where
P: EuclideanSpace<Scalar = L::Scalar, Diff = L>,
L: VectorSpace,
L::Scalar: BaseFloat,
R: ApplyAngular<L::Scalar, A> + Rotation<P>,
B: Pose<P, R>,
Apply velocity to pose.
Parameters:
pose
: Pose to apply the velocity todt
: Time step
Type parameters:
B
: Transform type (BodyPose3
or similar)P
: Positional quantity, usuallyPoint2
orPoint3
R
: Rotational quantity, usuallyBasis2
orQuaternion
pub fn apply_linear<P>(&self, linear: P, dt: L::Scalar) -> P where
P: EuclideanSpace<Scalar = L::Scalar, Diff = L>,
L::Scalar: BaseFloat,
L: VectorSpace,
[src]
pub fn apply_linear<P>(&self, linear: P, dt: L::Scalar) -> P where
P: EuclideanSpace<Scalar = L::Scalar, Diff = L>,
L::Scalar: BaseFloat,
L: VectorSpace,
Apply linear velocity to a positional quantity
Parameters:
linear
: Positional valuedt
: Time step
Type parameters:
P
: Positional quantity, usuallyPoint2
orPoint3
pub fn apply_angular<R>(&self, rotation: R, dt: L::Scalar) -> R where
R: ApplyAngular<L::Scalar, A>,
L: VectorSpace,
L::Scalar: BaseFloat,
[src]
pub fn apply_angular<R>(&self, rotation: R, dt: L::Scalar) -> R where
R: ApplyAngular<L::Scalar, A>,
L: VectorSpace,
L::Scalar: BaseFloat,
Apply angular velocity to a rotational quantity
Parameters:
rotation
: Rotational valuedt
: Time step
Type parameters:
R
: Rotational quantity, usuallyBasis2
orQuaternion
Trait Implementations
impl<L: Debug, A: Debug> Debug for Velocity<L, A>
[src]
impl<L: Debug, A: Debug> Debug for Velocity<L, A>
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<L: Clone, A: Clone> Clone for Velocity<L, A>
[src]
impl<L: Clone, A: Clone> Clone for Velocity<L, A>
fn clone(&self) -> Velocity<L, A>
[src]
fn clone(&self) -> Velocity<L, A>
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)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<L: PartialEq, A: PartialEq> PartialEq for Velocity<L, A>
[src]
impl<L: PartialEq, A: PartialEq> PartialEq for Velocity<L, A>
fn eq(&self, other: &Velocity<L, A>) -> bool
[src]
fn eq(&self, other: &Velocity<L, A>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Velocity<L, A>) -> bool
[src]
fn ne(&self, other: &Velocity<L, A>) -> bool
This method tests for !=
.
impl<L, A> Default for Velocity<L, A> where
L: Zero,
A: Clone + Zero,
[src]
impl<L, A> Default for Velocity<L, A> where
L: Zero,
A: Clone + Zero,