Class BijectModifier
Remaps the cells of the grid by changing their co-ordinates,
without touching the position, shape or topology.
Inheritance
System.Object
BijectModifier
Assembly: Sylves.dll
Syntax
public class BijectModifier : BaseModifier, IGrid
Constructors
BijectModifier(IGrid, Func<Cell, Cell>, Func<Cell, Cell>, Int32)
Declaration
public BijectModifier(IGrid underlying, Func<Cell, Cell> toUnderlying, Func<Cell, Cell> fromUnderlying, int coordinateDimension = 3)
Parameters
Type |
Name |
Description |
IGrid |
underlying |
|
System.Func<Cell, Cell> |
toUnderlying |
|
System.Func<Cell, Cell> |
fromUnderlying |
|
System.Int32 |
coordinateDimension |
|
Properties
CoordinateDimension
Declaration
public override int CoordinateDimension { get; }
Property Value
Type |
Description |
System.Int32 |
|
Overrides
Methods
FindBasicPath(Cell, Cell)
Declaration
public override 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>> |
|
Overrides
FindCell(Matrix4x4, out Cell, out CellRotation)
Declaration
public override bool FindCell(Matrix4x4 matrix, out Cell cell, out CellRotation rotation)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
FindCell(Vector3, out Cell)
Declaration
public override bool FindCell(Vector3 position, out Cell cell)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
FindGridSymmetry(ISet<Cell>, ISet<Cell>, Cell, CellRotation)
Declaration
public override 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
Overrides
GetBound(IEnumerable<Cell>)
Declaration
public override IBound GetBound(IEnumerable<Cell> cells)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<Cell> |
cells |
|
Returns
Overrides
GetCellByIndex(Int32)
Declaration
public override Cell GetCellByIndex(int index)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Returns
Overrides
GetCellCenter(Cell)
Declaration
public override Vector3 GetCellCenter(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
Overrides
GetCellCorner(Cell, CellCorner)
Declaration
public override Vector3 GetCellCorner(Cell cell, CellCorner corner)
Parameters
Returns
Overrides
GetCellDirs(Cell)
Declaration
public override IEnumerable<CellDir> GetCellDirs(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<CellDir> |
|
Overrides
GetCells()
Declaration
public override IEnumerable<Cell> GetCells()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Cell> |
|
Overrides
GetCellsIntersectsApprox(Vector3, Vector3)
Declaration
public override IEnumerable<Cell> GetCellsIntersectsApprox(Vector3 min, Vector3 max)
Parameters
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Cell> |
|
Overrides
GetCellType(Cell)
Declaration
public override ICellType GetCellType(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
Overrides
Declaration
public override Deformation GetDeformation(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
Overrides
GetDual()
Declaration
public override IDualMapping GetDual()
Returns
Overrides
GetIndex(Cell)
Declaration
public override int GetIndex(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
Type |
Description |
System.Int32 |
|
Overrides
GetMeshData(Cell, out MeshData, out Matrix4x4)
Declaration
public override void GetMeshData(Cell cell, out MeshData meshData, out Matrix4x4 transform)
Parameters
Overrides
GetPolygon(Cell, out Vector3[], out Matrix4x4)
Declaration
public override void GetPolygon(Cell cell, out Vector3[] vertices, out Matrix4x4 transform)
Parameters
Overrides
GetTriangleMesh(Cell)
Declaration
public override IEnumerable<(Vector3, Vector3, Vector3, CellDir)> GetTriangleMesh(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
Overrides
GetTRS(Cell)
Declaration
public override TRS GetTRS(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
Overrides
IsCellInBound(Cell, IBound)
Declaration
public override bool IsCellInBound(Cell cell, IBound bound)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
IsCellInGrid(Cell)
Declaration
public override bool IsCellInGrid(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
ParallelTransport(IGrid, Cell, Cell, Cell, CellRotation, out Cell, out CellRotation)
Declaration
public override bool ParallelTransport(IGrid aGrid, Cell aSrcCell, Cell aDestCell, Cell srcCell, CellRotation startRotation, out Cell destCell, out CellRotation destRotation)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
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
Rebind(IGrid)
Declaration
protected override IGrid Rebind(IGrid underlying)
Parameters
Type |
Name |
Description |
IGrid |
underlying |
|
Returns
Overrides
TryApplySymmetry(GridSymmetry, Cell, out Cell, out CellRotation)
Declaration
public override bool TryApplySymmetry(GridSymmetry s, Cell src, out Cell dest, out CellRotation r)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
TryApplySymmetry(GridSymmetry, IBound, out IBound)
Declaration
public override bool TryApplySymmetry(GridSymmetry s, IBound srcBound, out IBound destBound)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
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
Returns
Type |
Description |
System.Boolean |
|
Overrides
TryMoveByOffset(Cell, Vector3Int, Vector3Int, CellRotation, out Cell, out CellRotation)
Declaration
public override bool TryMoveByOffset(Cell startCell, Vector3Int startOffset, Vector3Int destOffset, CellRotation startRotation, out Cell destCell, out CellRotation destRotation)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
Implements