Tanoda
Leap.Unity.Animation.HermiteSpline Struct Reference

Represents a spline that travels from one point in space to another over a specified time frame. The two endpoints are specified, as well as the instantaneous velocity at these two endpoints. More...

Public Member Functions

 HermiteSpline (float pos0, float pos1)
 Constructs a spline by specifying the positions of the two endpoints. The velocity at each endpoint is zero, and the time range of the spline is 0 to 1. More...
 
 HermiteSpline (float pos0, float pos1, float vel0, float vel1)
 Constructs a spline by specifying the positions and velocities of the two endpoints. The time range of the spline is 0 to 1. More...
 
 HermiteSpline (float pos0, float pos1, float vel0, float vel1, float length)
 Constructs a spline by specifying the positions and velocities of the two endpoints. The time range of the spline is 0 to length. More...
 
 HermiteSpline (float t0, float t1, float pos0, float pos1, float vel0, float vel1)
 Constructs a spline by specifying the positions, velocities, and times of the endpoints. More...
 
float PositionAt (float t)
 Gets the position at time t along this spline.
The time is clamped within the t0 - t1 range. More...
 
float VelocityAt (float t)
 Gets the first derivative of position at time t. The time is clamped within the t0 - t1 range. More...
 
void PositionAndVelAt (float t, out float position, out float velocity)
 Gets both the position and the first derivative of position at time ti. The time is clamped within the t0 - t1 range. More...
 

Public Attributes

float t0
 
float t1
 
float pos0
 
float pos1
 
float vel0
 
float vel1
 

Detailed Description

Represents a spline that travels from one point in space to another over a specified time frame. The two endpoints are specified, as well as the instantaneous velocity at these two endpoints.

You may ask for the position or the velocity at any time during the splines duration.

Definition at line 24 of file HermiteSpline.cs.

Constructor & Destructor Documentation

◆ HermiteSpline() [1/4]

Leap.Unity.Animation.HermiteSpline.HermiteSpline ( float  pos0,
float  pos1 
)

Constructs a spline by specifying the positions of the two endpoints. The velocity at each endpoint is zero, and the time range of the spline is 0 to 1.

Definition at line 34 of file HermiteSpline.cs.

◆ HermiteSpline() [2/4]

Leap.Unity.Animation.HermiteSpline.HermiteSpline ( float  pos0,
float  pos1,
float  vel0,
float  vel1 
)

Constructs a spline by specifying the positions and velocities of the two endpoints. The time range of the spline is 0 to 1.

Definition at line 50 of file HermiteSpline.cs.

◆ HermiteSpline() [3/4]

Leap.Unity.Animation.HermiteSpline.HermiteSpline ( float  pos0,
float  pos1,
float  vel0,
float  vel1,
float  length 
)

Constructs a spline by specifying the positions and velocities of the two endpoints. The time range of the spline is 0 to length.

Definition at line 66 of file HermiteSpline.cs.

◆ HermiteSpline() [4/4]

Leap.Unity.Animation.HermiteSpline.HermiteSpline ( float  t0,
float  t1,
float  pos0,
float  pos1,
float  vel0,
float  vel1 
)

Constructs a spline by specifying the positions, velocities, and times of the endpoints.

Definition at line 81 of file HermiteSpline.cs.

Member Function Documentation

◆ PositionAndVelAt()

void Leap.Unity.Animation.HermiteSpline.PositionAndVelAt ( float  t,
out float  position,
out float  velocity 
)

Gets both the position and the first derivative of position at time ti. The time is clamped within the t0 - t1 range.

Definition at line 141 of file HermiteSpline.cs.

◆ PositionAt()

float Leap.Unity.Animation.HermiteSpline.PositionAt ( float  t)

Gets the position at time t along this spline.
The time is clamped within the t0 - t1 range.

Definition at line 96 of file HermiteSpline.cs.

◆ VelocityAt()

float Leap.Unity.Animation.HermiteSpline.VelocityAt ( float  t)

Gets the first derivative of position at time t. The time is clamped within the t0 - t1 range.

Definition at line 113 of file HermiteSpline.cs.

Member Data Documentation

◆ pos0

float Leap.Unity.Animation.HermiteSpline.pos0

Definition at line 26 of file HermiteSpline.cs.

◆ pos1

float Leap.Unity.Animation.HermiteSpline.pos1

Definition at line 26 of file HermiteSpline.cs.

◆ t0

float Leap.Unity.Animation.HermiteSpline.t0

Definition at line 25 of file HermiteSpline.cs.

◆ t1

float Leap.Unity.Animation.HermiteSpline.t1

Definition at line 25 of file HermiteSpline.cs.

◆ vel0

float Leap.Unity.Animation.HermiteSpline.vel0

Definition at line 27 of file HermiteSpline.cs.

◆ vel1

float Leap.Unity.Animation.HermiteSpline.vel1

Definition at line 27 of file HermiteSpline.cs.


The documentation for this struct was generated from the following file: