Show / Hide Table of Contents

Class BijectModifier

Remaps the cells of the grid by changing their co-ordinates, without touching the position, shape or topology.

Inheritance
System.Object
BaseModifier
BijectModifier
RavelModifier
Implements
IGrid
Inherited Members
BaseModifier.GetCellTypes()
BaseModifier.GetCellCorners(Cell)
BaseModifier.GetBound()
BaseModifier.BoundBy(IBound)
BaseModifier.IntersectBounds(IBound, IBound)
BaseModifier.UnionBounds(IBound, IBound)
BaseModifier.GetCellsInBounds(IBound)
BaseModifier.Is2d
BaseModifier.Is3d
BaseModifier.IsPlanar
BaseModifier.IsRepeating
BaseModifier.IsOrientable
BaseModifier.IsFinite
BaseModifier.IsSingleCellType
BaseModifier.Unbounded
BaseModifier.Unwrapped
BaseModifier.Underlying
BaseModifier.IndexCount
Namespace: Sylves
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
BaseModifier.CoordinateDimension

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
BaseModifier.FindBasicPath(Cell, 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
BaseModifier.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
BaseModifier.FindCell(Vector3, out Cell)

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
Type Description
GridSymmetry
Overrides
BaseModifier.FindGridSymmetry(ISet<Cell>, ISet<Cell>, Cell, CellRotation)

GetBound(IEnumerable<Cell>)

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

GetCellByIndex(Int32)

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

GetCellCenter(Cell)

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

GetCellCorner(Cell, CellCorner)

Declaration
public override Vector3 GetCellCorner(Cell cell, CellCorner corner)
Parameters
Type Name Description
Cell cell
CellCorner corner
Returns
Type Description
Vector3
Overrides
BaseModifier.GetCellCorner(Cell, CellCorner)

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
BaseModifier.GetCellDirs(Cell)

GetCells()

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

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
BaseModifier.GetCellsIntersectsApprox(Vector3, Vector3)

GetCellType(Cell)

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

GetDeformation(Cell)

Declaration
public override Deformation GetDeformation(Cell cell)
Parameters
Type Name Description
Cell cell
Returns
Type Description
Deformation
Overrides
BaseModifier.GetDeformation(Cell)

GetDual()

Declaration
public override IDualMapping GetDual()
Returns
Type Description
IDualMapping
Overrides
BaseModifier.GetDual()

GetIndex(Cell)

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

GetMeshData(Cell, out MeshData, out Matrix4x4)

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

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
BaseModifier.GetPolygon(Cell, out Vector3[], out Matrix4x4)

GetTriangleMesh(Cell)

Declaration
public override 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>>
Overrides
BaseModifier.GetTriangleMesh(Cell)

GetTRS(Cell)

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

IsCellInBound(Cell, IBound)

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

IsCellInGrid(Cell)

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

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
Type Name Description
IGrid aGrid
Cell aSrcCell
Cell aDestCell
Cell srcCell
CellRotation startRotation
Cell destCell
CellRotation destRotation
Returns
Type Description
System.Boolean
Overrides
BaseModifier.ParallelTransport(IGrid, Cell, Cell, Cell, CellRotation, out Cell, out CellRotation)

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
BaseModifier.Raycast(Vector3, Vector3, Single)

Rebind(IGrid)

Declaration
protected override IGrid Rebind(IGrid underlying)
Parameters
Type Name Description
IGrid underlying
Returns
Type Description
IGrid
Overrides
BaseModifier.Rebind(IGrid)

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

Declaration
public override 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
Overrides
BaseModifier.TryApplySymmetry(GridSymmetry, Cell, out Cell, out CellRotation)

TryApplySymmetry(GridSymmetry, IBound, out IBound)

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

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
BaseModifier.TryMove(Cell, CellDir, out Cell, out CellDir, out Connection)

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
Type Name Description
Cell startCell
Vector3Int startOffset
Vector3Int destOffset
CellRotation startRotation
Cell destCell
CellRotation destRotation
Returns
Type Description
System.Boolean
Overrides
BaseModifier.TryMoveByOffset(Cell, Vector3Int, Vector3Int, CellRotation, out Cell, out CellRotation)

Implements

IGrid
In This Article
Back to top Generated by DocFX