Interface ICellType
Assembly: cs.temp.dll.dll
Syntax
public interface ICellType
Methods
FindPath(Vector3Int, Vector3Int)
Declaration
IEnumerable<CellFaceDir> FindPath(Vector3Int startOffset, Vector3Int endOffset)
Parameters
Type |
Name |
Description |
Vector3Int |
startOffset |
|
Vector3Int |
endOffset |
|
Returns
GetCellCenter(Vector3Int, Vector3, Vector3)
Declaration
Vector3 GetCellCenter(Vector3Int offset, Vector3 center, Vector3 tileSize)
Parameters
Type |
Name |
Description |
Vector3Int |
offset |
|
Vector3 |
center |
|
Vector3 |
tileSize |
|
Returns
GetFaceDirPairs()
Declaration
IEnumerable<(CellFaceDir, CellFaceDir)> GetFaceDirPairs()
Returns
GetFaceDirs()
Declaration
IEnumerable<CellFaceDir> GetFaceDirs()
Returns
GetIdentity()
Declaration
CellRotation GetIdentity()
Returns
GetMatrix(CellRotation)
Declaration
Matrix4x4 GetMatrix(CellRotation cellRotation)
Parameters
Returns
Type |
Description |
Matrix4x4 |
|
GetRotations(Boolean, Boolean, RotationGroupType)
Declaration
IList<CellRotation> GetRotations(bool rotatable = true, bool reflectable = true, RotationGroupType rotationGroupType = RotationGroupType.All)
Parameters
Returns
Invert(CellFaceDir)
Declaration
CellFaceDir Invert(CellFaceDir faceDir)
Parameters
Returns
Invert(CellRotation)
Declaration
CellRotation Invert(CellRotation a)
Parameters
Returns
Multiply(CellRotation, CellRotation)
Declaration
CellRotation Multiply(CellRotation a, CellRotation b)
Parameters
Returns
Realign(ISet<Vector3Int>, CellRotation)
Given a shape, and a rotation, finds the translation that puts the rotated shape back on itself,
and applies that translation to each of the offsets in the shape.
Returns null if no such mapping is possible.
Declaration
IDictionary<Vector3Int, Vector3Int> Realign(ISet<Vector3Int> shape, CellRotation rotation)
Parameters
Type |
Name |
Description |
ISet<Vector3Int> |
shape |
|
CellRotation |
rotation |
|
Returns
Rotate(CellFaceDir, CellRotation)
Declaration
CellFaceDir Rotate(CellFaceDir faceDir, CellRotation rotation)
Parameters
Returns
RotateBy(CellFaceDir, FaceDetails, CellRotation)
Declaration
(CellFaceDir, FaceDetails) RotateBy(CellFaceDir faceDir, FaceDetails faceDetails, CellRotation rot)
Parameters
Returns
TryMove(Vector3Int, CellFaceDir, out Vector3Int)
Declaration
bool TryMove(Vector3Int offset, CellFaceDir dir, out Vector3Int dest)
Parameters
Type |
Name |
Description |
Vector3Int |
offset |
|
CellFaceDir |
dir |
|
Vector3Int |
dest |
|
Returns
TryMoveByOffset(Vector3Int, Vector3Int, Vector3Int, CellRotation, out Vector3Int)
Note startCell/destCell are actually offsets, but naming is hard...
Declaration
bool TryMoveByOffset(Vector3Int startCell, Vector3Int startOffset, Vector3Int destOffset, CellRotation rotation, out Vector3Int destCell)
Parameters
Type |
Name |
Description |
Vector3Int |
startCell |
|
Vector3Int |
startOffset |
|
Vector3Int |
destOffset |
|
CellRotation |
rotation |
|
Vector3Int |
destCell |
|
Returns