Show / Hide Table of Contents

Class SubstitutionTilingGrid

Creates a tiling of the 2d plane from a set of substitution rules. It is quite flexible:

  • imperfect substitution rules where the replacement outline doesn't follow the original outline
  • tiles can freely transformed
  • tile equivalence under translation, euclidian motion, isometry, similarity all supported
  • "statistically round" substitutions like the pinwheel substitution supported
Inheritance
System.Object
BaseSubstitutionTilingGrid
SubstitutionTilingGrid
ChairGrid
DominoGrid
PenroseRhombGrid
Implements
IGrid
Inherited Members
BaseSubstitutionTilingGrid.DeadZone
BaseSubstitutionTilingGrid.prototiles
BaseSubstitutionTilingGrid.tileBits
BaseSubstitutionTilingGrid.prototileBits
BaseSubstitutionTilingGrid.cellTypes
BaseSubstitutionTilingGrid.hierarchy
BaseSubstitutionTilingGrid.bound
BaseSubstitutionTilingGrid.baseTransform
BaseSubstitutionTilingGrid.Up(Matrix4x4, BaseSubstitutionTilingGrid.InternalPrototile)
BaseSubstitutionTilingGrid.Down(Matrix4x4, BaseSubstitutionTilingGrid.InternalPrototile, Int32)
BaseSubstitutionTilingGrid.GetCellTypes()
BaseSubstitutionTilingGrid.GetDual()
BaseSubstitutionTilingGrid.GetCells()
BaseSubstitutionTilingGrid.TryMoveByOffset(Cell, Vector3Int, Vector3Int, CellRotation, Cell, CellRotation)
BaseSubstitutionTilingGrid.ParallelTransport(IGrid, Cell, Cell, Cell, CellRotation, Cell, CellRotation)
BaseSubstitutionTilingGrid.GetCellDirs(Cell)
BaseSubstitutionTilingGrid.GetCellCorners(Cell)
BaseSubstitutionTilingGrid.FindBasicPath(Cell, Cell)
BaseSubstitutionTilingGrid.GetIndex(Cell)
BaseSubstitutionTilingGrid.GetCellByIndex(Int32)
BaseSubstitutionTilingGrid.GetBound()
BaseSubstitutionTilingGrid.GetBound(IEnumerable<Cell>)
BaseSubstitutionTilingGrid.IntersectBounds(IBound, IBound)
BaseSubstitutionTilingGrid.UnionBounds(IBound, IBound)
BaseSubstitutionTilingGrid.GetCellsInBounds(IBound)
BaseSubstitutionTilingGrid.IsCellInBound(Cell, IBound)
BaseSubstitutionTilingGrid.GetCellCorner(Cell, CellCorner)
BaseSubstitutionTilingGrid.GetTRS(BaseSubstitutionTilingGrid.InternalPrototile, Matrix4x4, Int32)
BaseSubstitutionTilingGrid.GetDeformation(Cell)
BaseSubstitutionTilingGrid.GetTriangleMesh(Cell)
BaseSubstitutionTilingGrid.GetMeshData(Cell, MeshData, Matrix4x4)
BaseSubstitutionTilingGrid.FindGridSymmetry(ISet<Cell>, ISet<Cell>, Cell, CellRotation)
BaseSubstitutionTilingGrid.TryApplySymmetry(GridSymmetry, IBound, IBound)
BaseSubstitutionTilingGrid.TryApplySymmetry(GridSymmetry, Cell, Cell, CellRotation)
BaseSubstitutionTilingGrid.Is2d
BaseSubstitutionTilingGrid.Is3d
BaseSubstitutionTilingGrid.IsPlanar
BaseSubstitutionTilingGrid.IsRepeating
BaseSubstitutionTilingGrid.IsOrientable
BaseSubstitutionTilingGrid.IsFinite
BaseSubstitutionTilingGrid.IsSingleCellType
BaseSubstitutionTilingGrid.CoordinateDimension
BaseSubstitutionTilingGrid.Unwrapped
BaseSubstitutionTilingGrid.IndexCount
Namespace: Sylves
Assembly: Sylves.dll
Syntax
public class SubstitutionTilingGrid : BaseSubstitutionTilingGrid, IGrid

Constructors

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

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

SubstitutionTilingGrid(Prototile[], String[], SubstitutionTilingBound, ICachePolicy)

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

Properties

Raw

Declaration
public RawSubstitutionTilingGrid Raw { get; }
Property Value
Type Description
RawSubstitutionTilingGrid

Unbounded

Declaration
public override IGrid Unbounded { get; }
Property Value
Type Description
IGrid
Overrides
BaseSubstitutionTilingGrid.Unbounded

Methods

BoundBy(IBound)

Declaration
public override IGrid BoundBy(IBound bound)
Parameters
Type Name Description
IBound bound
Returns
Type Description
IGrid
Overrides
BaseSubstitutionTilingGrid.BoundBy(IBound)

CellToParentGrid(Cell, Int32)

Declaration
public Cell CellToParentGrid(Cell cell, int n = 1)
Parameters
Type Name Description
Cell cell
System.Int32 n
Returns
Type Description
Cell

FindCell(Matrix4x4, out Cell, out CellRotation)

Declaration
public override 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
Overrides
BaseSubstitutionTilingGrid.FindCell(Matrix4x4, out Cell, out CellRotation)

FindCell(Vector3, out Cell)

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

GetCellCenter(Cell)

Declaration
public override Vector3 GetCellCenter(Cell cell)
Parameters
Type Name Description
Cell cell
Returns
Type Description
Vector3
Overrides
BaseSubstitutionTilingGrid.GetCellCenter(Cell)

GetCellsIntersectsApprox(Vector3, Vector3)

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

GetCellType(Cell)

Declaration
public override ICellType GetCellType(Cell cell)
Parameters
Type Name Description
Cell cell
Returns
Type Description
ICellType
Overrides
BaseSubstitutionTilingGrid.GetCellType(Cell)

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

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

GetPrototile(Cell, Int32)

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

GetTRS(Cell)

Declaration
public override TRS GetTRS(Cell cell)
Parameters
Type Name Description
Cell cell
Returns
Type Description
TRS
Overrides
BaseSubstitutionTilingGrid.GetTRS(Cell)

IsCellInGrid(Cell)

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

ParentGrid(Int32)

Declaration
public SubstitutionTilingGrid ParentGrid(int n = 1)
Parameters
Type Name Description
System.Int32 n
Returns
Type Description
SubstitutionTilingGrid

Raycast(Vector3, Vector3, Single)

Declaration
public override 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>
Overrides
BaseSubstitutionTilingGrid.Raycast(Vector3, Vector3, Single)

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

Declaration
public override 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
Overrides
BaseSubstitutionTilingGrid.TryMove(Cell, CellDir, out Cell, out CellDir, out Connection)

Implements

IGrid
In This Article
Back to top Generated by DocFX