A* Pathfinding Project
4.1.9
The A* Pathfinding Project for Unity 3D
|
Defines a transformation from graph space to world space. More...
Defines a transformation from graph space to world space.
This is essentially just a simple wrapper around a matrix, but it has several utilities that are useful.
Public Member Functions | |
GraphTransform (Matrix4x4 matrix) | |
Vector3 | InverseTransform (Vector3 point) |
Int3 | InverseTransform (Int3 point) |
void | InverseTransform (Int3[] arr) |
Bounds | InverseTransform (Bounds bounds) |
Vector3 | Transform (Vector3 point) |
void | Transform (Int3[] arr) |
void | Transform (Vector3[] arr) |
Bounds | Transform (Bounds bounds) |
Vector3 | TransformVector (Vector3 point) |
Vector3 | WorldUpAtGraphPosition (Vector3 point) |
Static Public Member Functions | |
static GraphTransform | operator* (GraphTransform lhs, Matrix4x4 rhs) |
static GraphTransform | operator* (Matrix4x4 lhs, GraphTransform rhs) |
Public Attributes | |
readonly bool | identity |
True if this transform is the identity transform (i.e it does not do anything) More... | |
readonly bool | onlyTranslational |
True if this transform is a pure translation without any scaling or rotation. More... | |
Static Public Attributes | |
static readonly GraphTransform | identityTransform = new GraphTransform(Matrix4x4.identity) |
Private Member Functions | |
Vector2 IMovementPlane. | ToPlane (Vector3 point) |
Transforms from world space to the 'ground' plane of the graph. More... | |
Vector2 IMovementPlane. | ToPlane (Vector3 point, out float elevation) |
Transforms from world space to the 'ground' plane of the graph. More... | |
Vector3 IMovementPlane. | ToWorld (Vector2 point, float elevation) |
Transforms from the 'ground' plane of the graph to world space. More... | |
Static Private Member Functions | |
static bool | MatrixIsTranslational (Matrix4x4 matrix) |
Private Attributes | |
readonly Int3 | i3translation |
readonly Matrix4x4 | inverseMatrix |
readonly Quaternion | inverseRotation |
readonly bool | isXY |
readonly bool | isXZ |
readonly Matrix4x4 | matrix |
readonly Quaternion | rotation |
readonly Vector3 | translation |
readonly Vector3 | up |
GraphTransform | ( | Matrix4x4 | matrix | ) |
Vector3 InverseTransform | ( | Vector3 | point | ) |
Implements ITransform.
void InverseTransform | ( | Int3 [] | arr | ) |
Bounds InverseTransform | ( | Bounds | bounds | ) |
|
staticprivate |
|
static |
|
static |
|
private |
Transforms from world space to the 'ground' plane of the graph.
The transformation is purely a rotation so no scale or offset is used.
For a graph rotated with the rotation (-90, 0, 0) this will transform a coordinate (x,y,z) to (x,y). For a graph with the rotation (0,0,0) this will tranform a coordinate (x,y,z) to (x,z). More generally for a graph with a quaternion rotation R this will transform a vector V to R * V (i.e rotate the vector V using the rotation R).
Implements IMovementPlane.
|
private |
Transforms from world space to the 'ground' plane of the graph.
The transformation is purely a rotation so no scale or offset is used.
Implements IMovementPlane.
|
private |
Transforms from the 'ground' plane of the graph to world space.
The transformation is purely a rotation so no scale or offset is used.
Implements IMovementPlane.
Vector3 Transform | ( | Vector3 | point | ) |
Implements ITransform.
void Transform | ( | Int3 [] | arr | ) |
void Transform | ( | Vector3 [] | arr | ) |
Bounds Transform | ( | Bounds | bounds | ) |
Vector3 TransformVector | ( | Vector3 | point | ) |
Vector3 WorldUpAtGraphPosition | ( | Vector3 | point | ) |
|
private |
readonly bool identity |
True if this transform is the identity transform (i.e it does not do anything)
|
static |
|
private |
|
private |
|
private |
|
private |
|
private |
readonly bool onlyTranslational |
True if this transform is a pure translation without any scaling or rotation.
|
private |
|
private |
|
private |