Class CubeDirExtensions
Inheritance
System.Object
CubeDirExtensions
Assembly: Sylves.dll
Syntax
public static class CubeDirExtensions : Object
Methods
Forward(CubeDir)
Declaration
public static Vector3Int Forward(this CubeDir dir)
Parameters
Returns
Type |
Description |
Vector3Int |
The normal vector for a given face.
|
GetPosition(CubeCorner)
Declaration
public static Vector3 GetPosition(this CubeCorner corner)
Parameters
Returns
Type |
Description |
Vector3 |
The position of a corner in a unit cube centered on the origin.
|
Inverted(CubeDir)
Declaration
public static CubeDir Inverted(this CubeDir dir)
Parameters
Returns
Type |
Description |
CubeDir |
Returns the face dir with the opposite normal vector.
|
Right(CubeDir)
Declaration
public static Vector3Int Right(this CubeDir dir)
Parameters
Returns
Type |
Description |
Vector3Int |
Cross product of Up() and Forward().
|
Up(CubeDir)
Declaration
public static Vector3Int Up(this CubeDir dir)
Parameters
Returns
Type |
Description |
Vector3Int |
Returns (0, 1, 0) vector for most faces, and returns (0, 0, 1) for the top/bottom faces.
|