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]
L: Zero,
A: Clone + Zero,
fn new(linear: L, angular: A) -> Self
[src]
Create new velocity object, with both linear and angular velocity
fn from_linear(linear: L) -> Self
[src]
Create new velocity object with only linear velocity
fn set_linear(&mut self, linear: L)
[src]
Set linear velocity
fn linear(&self) -> &L
[src]
Get linear velocity
fn set_angular(&mut self, angular: A)
[src]
Set angular velocity
fn angular(&self) -> &A
[src]
Get angular velocity
fn apply<P, R>(&self, pose: &BodyPose<P, R>, dt: L::Scalar) -> BodyPose<P, R> where
P: EuclideanSpace<Scalar = L::Scalar, Diff = L>,
L: VectorSpace,
L::Scalar: BaseFloat,
R: ApplyAngular<L::Scalar, A> + Rotation<P>,
[src]
P: EuclideanSpace<Scalar = L::Scalar, Diff = L>,
L: VectorSpace,
L::Scalar: BaseFloat,
R: ApplyAngular<L::Scalar, A> + Rotation<P>,
Apply velocity to pose.
Parameters:
pose
: Pose to apply the velocity todt
: Time step
Type parameters:
P
: Positional quantity, usuallyPoint2
orPoint3
R
: Rotational quantity, usuallyBasis2
orQuaternion
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]
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
fn apply_angular<R>(&self, rotation: &R, dt: L::Scalar) -> R where
R: ApplyAngular<L::Scalar, A>,
L: VectorSpace,
L::Scalar: BaseFloat,
[src]
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: Clone, A: Clone> Clone for Velocity<L, A>
[src]
fn clone(&self) -> Velocity<L, A>
[src]
Returns a copy of the value. Read more
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]
fn eq(&self, __arg_0: &Velocity<L, A>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Velocity<L, A>) -> bool
[src]
This method tests for !=
.
impl<L, A> Default for Velocity<L, A> where
L: Zero,
A: Clone + Zero,
[src]
L: Zero,
A: Clone + Zero,