Interface ICoordinateSpace
Defines conversion between a coordinate space and Unity's native Right-Up-Forward (RUF) frame.
Namespace: Unity.SimulationPro.Foundation
Assembly: Unity.SimulationPro.Foundation.dll
Syntax
public interface ICoordinateSpace
Remarks
Implement this interface to define a custom coordinate frame. Built-in implementations include RUF, FLU, FRD, NED, ENU, NEDLocal, and ENULocal. Use Vector3<C> and Quaternion<C> to work with typed coordinate values.
Methods
ConvertAngularVelocityFromRUF(Vector3)
Converts a Unity (RUF) angular velocity vector into this coordinate space.
Declaration
Vector3 ConvertAngularVelocityFromRUF(Vector3 angularVelocity)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | angularVelocity | The angular velocity in Unity (RUF) space. |
Returns
| Type | Description |
|---|---|
| Vector3 | The equivalent angular velocity in this coordinate space. |
ConvertAngularVelocityToRUF(Vector3)
Converts an angular velocity vector in this coordinate space to Unity (RUF) space.
Declaration
Vector3 ConvertAngularVelocityToRUF(Vector3 angularVelocity)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | angularVelocity | The angular velocity in this coordinate space. |
Returns
| Type | Description |
|---|---|
| Vector3 | The equivalent angular velocity in Unity (RUF) space. |
ConvertFromRUF(Quaternion)
Converts a Unity (RUF) quaternion into this coordinate space.
Declaration
Quaternion ConvertFromRUF(Quaternion q)
Parameters
| Type | Name | Description |
|---|---|---|
| Quaternion | q | The quaternion in Unity (RUF) space. |
Returns
| Type | Description |
|---|---|
| Quaternion | The equivalent quaternion in this coordinate space. |
ConvertFromRUF(Vector3)
Converts a Unity (RUF) vector into this coordinate space.
Declaration
Vector3 ConvertFromRUF(Vector3 v)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | v | The vector in Unity (RUF) space. |
Returns
| Type | Description |
|---|---|
| Vector3 | The equivalent vector in this coordinate space. |
ConvertToRUF(Quaternion)
Converts a quaternion in this coordinate space to Unity (RUF) space.
Declaration
Quaternion ConvertToRUF(Quaternion q)
Parameters
| Type | Name | Description |
|---|---|---|
| Quaternion | q | The quaternion in this coordinate space. |
Returns
| Type | Description |
|---|---|
| Quaternion | The equivalent quaternion in Unity (RUF) space. |
ConvertToRUF(Vector3)
Converts a vector in this coordinate space to Unity (RUF) space.
Declaration
Vector3 ConvertToRUF(Vector3 v)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | v | The vector in this coordinate space. |
Returns
| Type | Description |
|---|---|
| Vector3 | The equivalent vector in Unity (RUF) space. |