Show / Hide Table of Contents

Class BaseSubstitutionTilingGrid

Base class for SubstitutionTilingGrid This contains common utilities and calculations that do no rely on caching.

Inheritance
System.Object
BaseSubstitutionTilingGrid
RawSubstitutionTilingGrid
SubstitutionTilingGrid
Implements
IGrid
Namespace: Sylves
Assembly: Sylves.dll
Syntax
public abstract class BaseSubstitutionTilingGrid : Object, IGrid

Constructors

BaseSubstitutionTilingGrid(BaseSubstitutionTilingGrid, SubstitutionTilingBound)

Declaration
protected BaseSubstitutionTilingGrid(BaseSubstitutionTilingGrid other, SubstitutionTilingBound bound)
Parameters
Type Name Description
BaseSubstitutionTilingGrid other
SubstitutionTilingBound bound

BaseSubstitutionTilingGrid(BaseSubstitutionTilingGrid, Func<Int32, BaseSubstitutionTilingGrid.InternalPrototile>, Matrix4x4)

Declaration
protected BaseSubstitutionTilingGrid(BaseSubstitutionTilingGrid other, Func<int, BaseSubstitutionTilingGrid.InternalPrototile> hierarchy, Matrix4x4 baseTransform)
Parameters
Type Name Description
BaseSubstitutionTilingGrid other
System.Func<System.Int32, BaseSubstitutionTilingGrid.InternalPrototile> hierarchy
Matrix4x4 baseTransform

BaseSubstitutionTilingGrid(Prototile[], Func<Int32, String>, SubstitutionTilingBound)

Declaration
public BaseSubstitutionTilingGrid(Prototile[] prototiles, Func<int, string> hierarchy, SubstitutionTilingBound bound = null)
Parameters
Type Name Description
Prototile[] prototiles
System.Func<System.Int32, System.String> hierarchy
SubstitutionTilingBound bound

BaseSubstitutionTilingGrid(Prototile[], String[], SubstitutionTilingBound)

Declaration
public BaseSubstitutionTilingGrid(Prototile[] prototiles, string[] hierarchy, SubstitutionTilingBound bound = null)
Parameters
Type Name Description
Prototile[] prototiles
System.String[] hierarchy
SubstitutionTilingBound bound

Fields

baseTransform

Declaration
protected Matrix4x4 baseTransform
Field Value
Type Description
Matrix4x4

bound

Declaration
protected SubstitutionTilingBound bound
Field Value
Type Description
SubstitutionTilingBound

cellTypes

Declaration
protected List<ICellType> cellTypes
Field Value
Type Description
System.Collections.Generic.List<ICellType>

DeadZone

Declaration
protected const int DeadZone = 3
Field Value
Type Description
System.Int32

hierarchy

Declaration
protected Func<int, BaseSubstitutionTilingGrid.InternalPrototile> hierarchy
Field Value
Type Description
System.Func<System.Int32, BaseSubstitutionTilingGrid.InternalPrototile>

prototileBits

Declaration
protected int prototileBits
Field Value
Type Description
System.Int32

prototiles

Declaration
protected readonly BaseSubstitutionTilingGrid.InternalPrototile[] prototiles
Field Value
Type Description
BaseSubstitutionTilingGrid.InternalPrototile[]

tileBits

Declaration
protected int tileBits
Field Value
Type Description
System.Int32

Properties

CoordinateDimension

Declaration
public int CoordinateDimension { get; }
Property Value
Type Description
System.Int32

IndexCount

Declaration
public int IndexCount { get; }
Property Value
Type Description
System.Int32

Is2d

Declaration
public bool Is2d { get; }
Property Value
Type Description
System.Boolean

Is3d

Declaration
public bool Is3d { get; }
Property Value
Type Description
System.Boolean

IsFinite

Declaration
public bool IsFinite { get; }
Property Value
Type Description
System.Boolean

IsOrientable

Declaration
public bool IsOrientable { get; }
Property Value
Type Description
System.Boolean

IsPlanar

Declaration
public bool IsPlanar { get; }
Property Value
Type Description
System.Boolean

IsRepeating

Declaration
public bool IsRepeating { get; }
Property Value
Type Description
System.Boolean

IsSingleCellType

Declaration
public bool IsSingleCellType { get; }
Property Value
Type Description
System.Boolean

Unbounded

Declaration
public abstract IGrid Unbounded { get; }
Property Value
Type Description
IGrid

Unwrapped

Declaration
public IGrid Unwrapped { get; }
Property Value
Type Description
IGrid

Methods

BoundBy(IBound)

Declaration
public abstract IGrid BoundBy(IBound bound)
Parameters
Type Name Description
IBound bound
Returns
Type Description
IGrid

Down(Matrix4x4, BaseSubstitutionTilingGrid.InternalPrototile, Int32)

Declaration
protected (Matrix4x4, BaseSubstitutionTilingGrid.InternalPrototile) Down(Matrix4x4 transform, BaseSubstitutionTilingGrid.InternalPrototile prototile, int child)
Parameters
Type Name Description
Matrix4x4 transform
BaseSubstitutionTilingGrid.InternalPrototile prototile
System.Int32 child
Returns
Type Description
System.ValueTuple<Matrix4x4, BaseSubstitutionTilingGrid.InternalPrototile>

FindBasicPath(Cell, Cell)

Declaration
public IEnumerable<(Cell, CellDir)> FindBasicPath(Cell startCell, Cell destCell)
Parameters
Type Name Description
Cell startCell
Cell destCell
Returns
Type Description
System.Collections.Generic.IEnumerable<System.ValueTuple<Cell, CellDir>>

FindCell(Matrix4x4, out Cell, out CellRotation)

Declaration
public abstract bool FindCell(Matrix4x4 matrix, out Cell cell, out CellRotation rotation)
Parameters
Type Name Description
Matrix4x4 matrix
Cell cell
CellRotation rotation
Returns
Type Description
System.Boolean

FindCell(Vector3, out Cell)

Declaration
public abstract bool FindCell(Vector3 position, out Cell cell)
Parameters
Type Name Description
Vector3 position
Cell cell
Returns
Type Description
System.Boolean

FindGridSymmetry(ISet<Cell>, ISet<Cell>, Cell, CellRotation)

Declaration
public GridSymmetry FindGridSymmetry(ISet<Cell> src, ISet<Cell> dest, Cell srcCell, CellRotation cellRotation)
Parameters
Type Name Description
System.Collections.Generic.ISet<Cell> src
System.Collections.Generic.ISet<Cell> dest
Cell srcCell
CellRotation cellRotation
Returns
Type Description
GridSymmetry

GetBound()

Declaration
public IBound GetBound()
Returns
Type Description
IBound

GetBound(IEnumerable<Cell>)

Declaration
public IBound GetBound(IEnumerable<Cell> cells)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Cell> cells
Returns
Type Description
IBound

GetCellByIndex(Int32)

Declaration
public Cell GetCellByIndex(int index)
Parameters
Type Name Description
System.Int32 index
Returns
Type Description
Cell

GetCellCenter(Cell)

Declaration
public abstract Vector3 GetCellCenter(Cell cell)
Parameters
Type Name Description
Cell cell
Returns
Type Description
Vector3

GetCellCorner(Cell, CellCorner)

Declaration
public Vector3 GetCellCorner(Cell cell, CellCorner cellCorner)
Parameters
Type Name Description
Cell cell
CellCorner cellCorner
Returns
Type Description
Vector3

GetCellCorners(Cell)

Declaration
public IEnumerable<CellCorner> GetCellCorners(Cell cell)
Parameters
Type Name Description
Cell cell
Returns
Type Description
System.Collections.Generic.IEnumerable<CellCorner>

GetCellDirs(Cell)

Declaration
public IEnumerable<CellDir> GetCellDirs(Cell cell)
Parameters
Type Name Description
Cell cell
Returns
Type Description
System.Collections.Generic.IEnumerable<CellDir>

GetCells()

Declaration
public IEnumerable<Cell> GetCells()
Returns
Type Description
System.Collections.Generic.IEnumerable<Cell>

GetCellsInBounds(IBound)

Declaration
public IEnumerable<Cell> GetCellsInBounds(IBound bound)
Parameters
Type Name Description
IBound bound
Returns
Type Description
System.Collections.Generic.IEnumerable<Cell>

GetCellsIntersectsApprox(Vector3, Vector3)

Declaration
public abstract IEnumerable<Cell> GetCellsIntersectsApprox(Vector3 min, Vector3 max)
Parameters
Type Name Description
Vector3 min
Vector3 max
Returns
Type Description
System.Collections.Generic.IEnumerable<Cell>

GetCellType(Cell)

Declaration
public abstract ICellType GetCellType(Cell cell)
Parameters
Type Name Description
Cell cell
Returns
Type Description
ICellType

GetCellTypes()

Declaration
public IEnumerable<ICellType> GetCellTypes()
Returns
Type Description
System.Collections.Generic.IEnumerable<ICellType>

GetDeformation(Cell)

Declaration
public Deformation GetDeformation(Cell cell)
Parameters
Type Name Description
Cell cell
Returns
Type Description
Deformation

GetDual()

Declaration
public virtual IDualMapping GetDual()
Returns
Type Description
IDualMapping

GetIndex(Cell)

Declaration
public int GetIndex(Cell cell)
Parameters
Type Name Description
Cell cell
Returns
Type Description
System.Int32

GetMeshData(Cell, out MeshData, out Matrix4x4)

Declaration
public void GetMeshData(Cell cell, out MeshData meshData, out Matrix4x4 transform)
Parameters
Type Name Description
Cell cell
MeshData meshData
Matrix4x4 transform

GetPolygon(Cell, out Vector3[], out Matrix4x4)

Declaration
public abstract void GetPolygon(Cell cell, out Vector3[] vertices, out Matrix4x4 transform)
Parameters
Type Name Description
Cell cell
Vector3[] vertices
Matrix4x4 transform

GetPrototile(Cell, Int32)

Declaration
protected abstract BaseSubstitutionTilingGrid.InternalPrototile GetPrototile(Cell cell, int height)
Parameters
Type Name Description
Cell cell
System.Int32 height
Returns
Type Description
BaseSubstitutionTilingGrid.InternalPrototile

GetTriangleMesh(Cell)

Declaration
public IEnumerable<(Vector3, Vector3, Vector3, CellDir)> GetTriangleMesh(Cell cell)
Parameters
Type Name Description
Cell cell
Returns
Type Description
System.Collections.Generic.IEnumerable<System.ValueTuple<Vector3, Vector3, Vector3, CellDir>>

GetTRS(BaseSubstitutionTilingGrid.InternalPrototile, Matrix4x4, Int32)

Declaration
protected Matrix4x4 GetTRS(BaseSubstitutionTilingGrid.InternalPrototile prototile, Matrix4x4 transform, int childTile)
Parameters
Type Name Description
BaseSubstitutionTilingGrid.InternalPrototile prototile
Matrix4x4 transform
System.Int32 childTile
Returns
Type Description
Matrix4x4

GetTRS(Cell)

Declaration
public abstract TRS GetTRS(Cell cell)
Parameters
Type Name Description
Cell cell
Returns
Type Description
TRS

IntersectBounds(IBound, IBound)

Declaration
public IBound IntersectBounds(IBound bound, IBound other)
Parameters
Type Name Description
IBound bound
IBound other
Returns
Type Description
IBound

IsCellInBound(Cell, IBound)

Declaration
public bool IsCellInBound(Cell cell, IBound bound)
Parameters
Type Name Description
Cell cell
IBound bound
Returns
Type Description
System.Boolean

IsCellInGrid(Cell)

Declaration
public abstract bool IsCellInGrid(Cell cell)
Parameters
Type Name Description
Cell cell
Returns
Type Description
System.Boolean

ParallelTransport(IGrid, Cell, Cell, Cell, CellRotation, out Cell, out CellRotation)

Declaration
public bool ParallelTransport(IGrid aGrid, Cell aSrcCell, Cell aDestCell, Cell srcCell, CellRotation startRotation, out Cell destCell, out CellRotation destRotation)
Parameters
Type Name Description
IGrid aGrid
Cell aSrcCell
Cell aDestCell
Cell srcCell
CellRotation startRotation
Cell destCell
CellRotation destRotation
Returns
Type Description
System.Boolean

Raycast(Vector3, Vector3, Single)

Declaration
public abstract IEnumerable<RaycastInfo> Raycast(Vector3 origin, Vector3 direction, float maxDistance = InfinityF)
Parameters
Type Name Description
Vector3 origin
Vector3 direction
System.Single maxDistance
Returns
Type Description
System.Collections.Generic.IEnumerable<RaycastInfo>

TryApplySymmetry(GridSymmetry, Cell, out Cell, out CellRotation)

Declaration
public bool TryApplySymmetry(GridSymmetry s, Cell src, out Cell dest, out CellRotation r)
Parameters
Type Name Description
GridSymmetry s
Cell src
Cell dest
CellRotation r
Returns
Type Description
System.Boolean

TryApplySymmetry(GridSymmetry, IBound, out IBound)

Declaration
public bool TryApplySymmetry(GridSymmetry s, IBound srcBound, out IBound destBound)
Parameters
Type Name Description
GridSymmetry s
IBound srcBound
IBound destBound
Returns
Type Description
System.Boolean

TryMove(Cell, CellDir, out Cell, out CellDir, out Connection)

Declaration
public abstract bool TryMove(Cell cell, CellDir dir, out Cell dest, out CellDir inverseDir, out Connection connection)
Parameters
Type Name Description
Cell cell
CellDir dir
Cell dest
CellDir inverseDir
Connection connection
Returns
Type Description
System.Boolean

TryMoveByOffset(Cell, Vector3Int, Vector3Int, CellRotation, out Cell, out CellRotation)

Declaration
public bool TryMoveByOffset(Cell startCell, Vector3Int startOffset, Vector3Int destOffset, CellRotation startRotation, out Cell destCell, out CellRotation destRotation)
Parameters
Type Name Description
Cell startCell
Vector3Int startOffset
Vector3Int destOffset
CellRotation startRotation
Cell destCell
CellRotation destRotation
Returns
Type Description
System.Boolean

UnionBounds(IBound, IBound)

Declaration
public IBound UnionBounds(IBound bound, IBound other)
Parameters
Type Name Description
IBound bound
IBound other
Returns
Type Description
IBound

Up(Matrix4x4, BaseSubstitutionTilingGrid.InternalPrototile)

Declaration
protected Matrix4x4 Up(Matrix4x4 transform, BaseSubstitutionTilingGrid.InternalPrototile parent)
Parameters
Type Name Description
Matrix4x4 transform
BaseSubstitutionTilingGrid.InternalPrototile parent
Returns
Type Description
Matrix4x4

Implements

IGrid
In This Article
Back to top Generated by DocFX