Unity specific FixedPoint math utilities. All conversions between Unity float into Quantum FP (e.g. Vector2 to FPVector2) are considered non-deterministic and should never be used in the Quantum simulation directly.
More...
|
| static FP | FlipRotation (this FP r) |
| | Inverts the FP if QUANTUM_XY is not defined. More...
|
| |
| static void | LoadLookupTables (Boolean force=false) |
| | Load the lookup tables. By default, loaded from Resources. More...
|
| |
| static async System.Threading.Tasks.Task | LoadLookupTablesAsync (bool force=false) |
| | Load the lookup tables asynchronously. By default, loaded from Resources. More...
|
| |
| static Vector2 | RoundToInt (this Vector2 v) |
| | Rounds all components of the Unity vector to the nearest integer. More...
|
| |
| static Vector3 | RoundToInt (this Vector3 v) |
| | Rounds all components of the Unity vector to the nearest integer. More...
|
| |
| static Color | ToColor (this ColorRGBA clr) |
| | Obsolete More...
|
| |
| static Color32 | ToColor32 (this ColorRGBA clr) |
| | Obsolete More...
|
| |
| static FP | ToFP (this Single v) |
| | Convert a float to an FP, with rounding towards zero. To round towards nearest representable FP, use ToRoundedFP. This is always considered to be unsafe and non-deterministic and should never be used in conjunction with the simulation. More...
|
| |
| static FPMatrix4x4 | ToFPMatrix4X4 (this Matrix4x4 m) |
| | Converts a Unity Matrix4x4 to a Quantum FPMatrix4x4, with each component being rounded towards the nearest representable FP. More...
|
| |
| static FPQuaternion | ToFPQuaternion (this Quaternion r) |
| | Convert a Unity quaternion to a Quantum FPQuaternion. More...
|
| |
| static FP | ToFPRotation2D (this Quaternion r) |
| | Converts a Unity quaternion to 2D rotation in radians by only using the y (or z axis if QUANTUM_XY is defined) More...
|
| |
| static FP | ToFPRotation2DDegrees (this Quaternion r) |
| | Converts a Unity quaternion to 2D rotation in degrees by only using the y (or z axis if QUANTUM_XY is defined) More...
|
| |
| static FPVector2 | ToFPVector2 (this Vector2 v) |
| | Converts a Unity Vector2 to a Quantum FPVector2, with each component being rounded towards zero. To round towards the nearest representable FP, use ToRoundedFPVector2. More...
|
| |
| static FPVector2 | ToFPVector2 (this Vector3 v) |
| | Converts a Unity Vector3 to a Quantum FPVector2 by removing the y component (removing the z component if QUANTUM_XY is defined). Each component is rounded towards zero. More...
|
| |
| static FPVector3 | ToFPVector3 (this Vector3 v) |
| | Converts a Unity Vector3 to a Quantum FPVector3, with each component being rounded towards zero. More...
|
| |
| static FP | ToFPVerticalPosition (this Vector3 v) |
| | Extracts the vertical position of a Unity Vector3 and converts it to a Quantum FP. Will use the inverse z component if QUANTUM_XY is defined. More...
|
| |
| static FP | ToRoundedFP (this Single v) |
| | Convert a float to an FP, with rounding to the nearest representable FP. This is always considered to be unsafe and non-deterministic and should never be used in conjunction with the simulation. More...
|
| |
| static FPVector2 | ToRoundedFPVector2 (this Vector3 v) |
| | Converts a Unity Vector3 to a Quantum FPVector2 by removing the y component (removing the z component if QUANTUM_XY is defined). Each component is rounded towards the nearest representable FP. More...
|
| |
| static FPVector3 | ToRoundedFPVector3 (this Vector3 v) |
| | Converts a Unity vector3 to a Quantum FPVector3, with each component being rounded towards the nearest representable FP. More...
|
| |
| static Quaternion | ToUnityQuaternion (this FP r) |
| | Creates a Quaternion from a y rotation in radians. Internally checks QUANTUM_XY to rotate around z instead. More...
|
| |
| static Quaternion | ToUnityQuaternion (this FPQuaternion r) |
| | Converts a Quantum FPQuaternion to a Unity Quaternion. More...
|
| |
| static Quaternion | ToUnityQuaternion (this FPQuaternion r, bool swizzle) |
| | Converts a Quantum FPQuaternion to a Unity Quaternion with swizzling the y and z axis. More...
|
| |
| static Quaternion | ToUnityQuaternionDegrees (this FP r) |
| | Create a Quaternion from a y rotation in degrees. Internally checks QUANTUM_XY to rotate around z instead. More...
|
| |
| static Vector2 | ToUnityVector2 (this FPVector2 v) |
| | Converts a Quantum FPVector2 to a Unity Vector2. More...
|
| |
| static Vector2 | ToUnityVector2 (this FPVector3 v) |
| | Obsolete More...
|
| |
| static Vector3 | ToUnityVector3 (this FPVector2 v) |
| | Converts a Quantum vector2 to a Unity vector3 by setting the y component to 0. (sets the z component to 0 if QUANTUM_XY is defined). More...
|
| |
| static Vector3 | ToUnityVector3 (this FPVector3 v) |
| | Converts a Quantum vector3 to a Unity vector3. More...
|
| |
| static Vector3 | ToUnityVector3 (this FPVector3 v, bool quantumXYSwizzle) |
| | Use this version of ToUnityVector3() when converting a 3D position from the XZ plane in the simulation to the 2D XY plane in Unity. More...
|
| |
| static Vector2Int | ToVector2Int (this IntVector2 v) |
| | Converts a Quantum IntVector2 into a Unity Vector2Int. More...
|
| |
| static Vector3Int | ToVector3Int (this IntVector3 v) |
| | Converts a Quantum IntVector3 object to a Unity Vector3Int. More...
|
| |
Unity specific FixedPoint math utilities. All conversions between Unity float into Quantum FP (e.g. Vector2 to FPVector2) are considered non-deterministic and should never be used in the Quantum simulation directly.