Struct TrajectoryModel
Namespace: Unity.Kinematica
Syntax
public struct TrajectoryModel
Properties
Array
Allows direct access to the trajectory array.
Declaration
public MemoryArray<AffineTransform> Array { get; }
Property Value
Type | Description |
---|---|
MemoryArray<AffineTransform> | Memory array that references the trajectory array. |
Item[Int32]
Allows access to a single element of the trajectory.
Declaration
public AffineTransform this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | index |
Property Value
Type | Description |
---|---|
AffineTransform |
TrajectoryLength
Denotes the length of the trajectory.
Declaration
public int TrajectoryLength { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
Display(AffineTransform, Color)
Displays the trajectory model in world space.
Declaration
public void Display(AffineTransform worldRootTransform, Color color)
Parameters
Type | Name | Description |
---|---|---|
AffineTransform | worldRootTransform | Anchor transform to be used as a reference for the trajectory display. |
Color | color | The color to be used for the trajectory display. |
GetRootVelocity(Single, Single)
Calculates the root velocity along the current trajectory at a sampling time in seconds passed as argument.
Declaration
public float3 GetRootVelocity(float sampleTimeInSeconds, float timeHorizon)
Parameters
Type | Name | Description |
---|---|---|
Single | sampleTimeInSeconds | The sampling time in seconds. |
Single | timeHorizon | Time horizon in seconds over which the velocity should be approximated. |
Returns
Type | Description |
---|---|
float3 | Velocity in meters per second subject to the sampling time passed as argument. |
KeepPastTrajectoryInWorldSpace(AffineTransform)
Adjust the past trajectory so that trajectory points conserve their world transform after the root transform has been modified.
Declaration
public void KeepPastTrajectoryInWorldSpace(AffineTransform rootDeltaTransform)
Parameters
Type | Name | Description |
---|---|---|
AffineTransform | rootDeltaTransform |
RootTransformAtTime(Single)
Calculates a root transform along the current trajectory at a sampling time in seconds passed as argument.
Declaration
public AffineTransform RootTransformAtTime(float sampleTimeInSeconds)
Parameters
Type | Name | Description |
---|---|---|
Single | sampleTimeInSeconds | The sampling time in seconds. |
Returns
Type | Description |
---|---|
AffineTransform | Memory array that references the trajectory array. |