Struct rhusics_core::Velocity[][src]

pub struct Velocity<L, A> { /* fields omitted */ }

Velocity

Type parameters:

  • L: Linear velocity, usually Vector2 or Vector3
  • A: Angular velocity, usually Scalar or Vector3

Methods

impl<L, A> Velocity<L, A> where
    L: Zero,
    A: Clone + Zero
[src]

Create new velocity object, with both linear and angular velocity

Create new velocity object with only linear velocity

Set linear velocity

Important traits for &'a mut R

Get linear velocity

Set angular velocity

Important traits for &'a mut R

Get angular velocity

Apply velocity to pose.

Parameters:

  • pose: Pose to apply the velocity to
  • dt: Time step

Type parameters:

  • B: Transform type (BodyPose3 or similar)
  • P: Positional quantity, usually Point2 or Point3
  • R: Rotational quantity, usually Basis2 or Quaternion

Apply linear velocity to a positional quantity

Parameters:

  • linear: Positional value
  • dt: Time step

Type parameters:

  • P: Positional quantity, usually Point2 or Point3

Apply angular velocity to a rotational quantity

Parameters:

  • rotation: Rotational value
  • dt: Time step

Type parameters:

  • R: Rotational quantity, usually Basis2 or Quaternion

Trait Implementations

impl<L: Debug, A: Debug> Debug for Velocity<L, A>
[src]

Formats the value using the given formatter. Read more

impl<L: Clone, A: Clone> Clone for Velocity<L, A>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<L: PartialEq, A: PartialEq> PartialEq for Velocity<L, A>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<L, A> Default for Velocity<L, A> where
    L: Zero,
    A: Clone + Zero
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl<L, A> Send for Velocity<L, A> where
    A: Send,
    L: Send

impl<L, A> Sync for Velocity<L, A> where
    A: Sync,
    L: Sync