Struct Leap::Unity::Movement

struct Leap.Unity.Movement

Public Functions

Movement (Vector3 velocity)

Constructs a linear Movement involving no rotation.

Movement (Vector3 velocity, Vector3 angularVelocity)

Constructs a Movement with a specified linear velocity and an angular velocity.

Movement (Pose fromPose, Pose toPose, float dt = 1f)

Returns the Movement necessary to go from Pose p0 to Pose p1 in dt seconds. You can ignore the time parameter if you wish simply to store delta positions and angle-axis vector rotations.

void Integrate (Vector3 linearAcceleration, float deltaTime)

Discretely integrates this Movement’s velocity by a linear acceleration over deltaTime.

void Integrate (Vector3 linearAcceleration, Vector3 angularAcceleration, float deltaTime)

Discretely integrates this Movement’s velocity and angular velocity by both a linear acceleration term and an angular acceleration term and a deltaTime.

Public Members

Vector3 velocity

The linear velocity of this Movement.

Vector3 angularVelocity

Angular velocity expressed as an angle-axis vector with angle equal to the length of the vector in degrees.