Show / Hide Table of Contents

Interface ICellType

Namespace: Tessera
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
Type Description
IEnumerable<CellFaceDir>

GetCellCenter(Vector3Int, Vector3, Vector3)

Declaration
Vector3 GetCellCenter(Vector3Int offset, Vector3 center, Vector3 tileSize)
Parameters
Type Name Description
Vector3Int offset
Vector3 center
Vector3 tileSize
Returns
Type Description
Vector3

GetFaceDirPairs()

Declaration
IEnumerable<(CellFaceDir, CellFaceDir)> GetFaceDirPairs()
Returns
Type Description
IEnumerable<ValueTuple<CellFaceDir, CellFaceDir>>

GetFaceDirs()

Declaration
IEnumerable<CellFaceDir> GetFaceDirs()
Returns
Type Description
IEnumerable<CellFaceDir>

GetIdentity()

Declaration
CellRotation GetIdentity()
Returns
Type Description
CellRotation

GetMatrix(CellRotation)

Declaration
Matrix4x4 GetMatrix(CellRotation cellRotation)
Parameters
Type Name Description
CellRotation cellRotation
Returns
Type Description
Matrix4x4

GetRotations(Boolean, Boolean, RotationGroupType)

Declaration
IList<CellRotation> GetRotations(bool rotatable = true, bool reflectable = true, RotationGroupType rotationGroupType = RotationGroupType.All)
Parameters
Type Name Description
Boolean rotatable
Boolean reflectable
RotationGroupType rotationGroupType
Returns
Type Description
IList<CellRotation>

Invert(CellFaceDir)

Declaration
CellFaceDir Invert(CellFaceDir faceDir)
Parameters
Type Name Description
CellFaceDir faceDir
Returns
Type Description
CellFaceDir

Invert(CellRotation)

Declaration
CellRotation Invert(CellRotation a)
Parameters
Type Name Description
CellRotation a
Returns
Type Description
CellRotation

Multiply(CellRotation, CellRotation)

Declaration
CellRotation Multiply(CellRotation a, CellRotation b)
Parameters
Type Name Description
CellRotation a
CellRotation b
Returns
Type Description
CellRotation

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
Type Description
IDictionary<Vector3Int, Vector3Int>

Rotate(CellFaceDir, CellRotation)

Declaration
CellFaceDir Rotate(CellFaceDir faceDir, CellRotation rotation)
Parameters
Type Name Description
CellFaceDir faceDir
CellRotation rotation
Returns
Type Description
CellFaceDir

RotateBy(CellFaceDir, FaceDetails, CellRotation)

Declaration
(CellFaceDir, FaceDetails) RotateBy(CellFaceDir faceDir, FaceDetails faceDetails, CellRotation rot)
Parameters
Type Name Description
CellFaceDir faceDir
FaceDetails faceDetails
CellRotation rot
Returns
Type Description
ValueTuple<CellFaceDir, FaceDetails>

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
Type Description
Boolean

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
Type Description
Boolean
Back to top Generated by DocFX