A* Pathfinding Project  4.1.20
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Events Macros Groups Pages
SimpleMovementPlane Class Reference

Public Member Functions

 SimpleMovementPlane ()
 
 SimpleMovementPlane (Quaternion rotation)
 
void CopyTo (SimpleMovementPlane plane)
 
void Set (Quaternion rotation)
 
Vector2 ToPlane (Vector3 point)
 Transforms from world space to the 'ground' plane of the graph.
 
Vector2 ToPlane (Vector3 point, out float elevation)
 Transforms from world space to the 'ground' plane of the graph.
 
Vector3 ToWorld (Vector2 point, float elevation=0)
 Transforms from the 'ground' plane of the graph to world space.
 
- Public Member Functions inherited from IMovementPlane
void CopyTo (SimpleMovementPlane plane)
 
Vector2 ToPlane (Vector3 p)
 
Vector2 ToPlane (Vector3 p, out float elevation)
 
Vector3 ToWorld (Vector2 p, float elevation=0)
 

Public Attributes

Quaternion inverseRotation = Quaternion.identity
 
bool isXY = false
 
bool isXZ = true
 
Quaternion rotation = Quaternion.identity
 

Constructor & Destructor Documentation

SimpleMovementPlane ( Quaternion  rotation)

Member Function Documentation

void CopyTo ( SimpleMovementPlane  plane)
void Set ( Quaternion  rotation)
Vector2 ToPlane ( Vector3  point)

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).

Vector2 ToPlane ( Vector3  point,
out float  elevation 
)

Transforms from world space to the 'ground' plane of the graph.

The transformation is purely a rotation so no scale or offset is used.

Vector3 ToWorld ( Vector2  point,
float  elevation = 0 
)

Transforms from the 'ground' plane of the graph to world space.

The transformation is purely a rotation so no scale or offset is used.

Member Data Documentation

Quaternion inverseRotation = Quaternion.identity
bool isXY = false
bool isXZ = true
Quaternion rotation = Quaternion.identity

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