Class BaseModifier
Abstract class for creating wrapper grids.
Wrappers defer most methods to an underlying grid.
Inheritance
System.Object
BaseModifier
Assembly: Sylves.dll
Syntax
public abstract class BaseModifier : Object, IGrid
Constructors
BaseModifier(IGrid)
Declaration
public BaseModifier(IGrid underlying)
Parameters
Type |
Name |
Description |
IGrid |
underlying |
|
Properties
CoordinateDimension
Declaration
public virtual int CoordinateDimension { get; }
Property Value
Type |
Description |
System.Int32 |
|
IndexCount
Declaration
public virtual int IndexCount { get; }
Property Value
Type |
Description |
System.Int32 |
|
Is2d
Declaration
public virtual bool Is2d { get; }
Property Value
Type |
Description |
System.Boolean |
|
Is3d
Declaration
public virtual bool Is3d { get; }
Property Value
Type |
Description |
System.Boolean |
|
IsFinite
Declaration
public virtual bool IsFinite { get; }
Property Value
Type |
Description |
System.Boolean |
|
IsOrientable
Declaration
public virtual bool IsOrientable { get; }
Property Value
Type |
Description |
System.Boolean |
|
IsPlanar
Declaration
public virtual bool IsPlanar { get; }
Property Value
Type |
Description |
System.Boolean |
|
IsRepeating
Declaration
public virtual bool IsRepeating { get; }
Property Value
Type |
Description |
System.Boolean |
|
IsSingleCellType
Declaration
public virtual bool IsSingleCellType { get; }
Property Value
Type |
Description |
System.Boolean |
|
Unbounded
Declaration
public virtual IGrid Unbounded { get; }
Property Value
Underlying
Declaration
public virtual IGrid Underlying { get; }
Property Value
Unwrapped
Declaration
public virtual IGrid Unwrapped { get; }
Property Value
Methods
BoundBy(IBound)
Declaration
public virtual IGrid BoundBy(IBound bound)
Parameters
Type |
Name |
Description |
IBound |
bound |
|
Returns
FindBasicPath(Cell, Cell)
Declaration
public virtual 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 virtual bool FindCell(Matrix4x4 matrix, out Cell cell, out CellRotation rotation)
Parameters
Returns
Type |
Description |
System.Boolean |
|
FindCell(Vector3, out Cell)
Declaration
public virtual bool FindCell(Vector3 position, out Cell cell)
Parameters
Returns
Type |
Description |
System.Boolean |
|
FindGridSymmetry(ISet<Cell>, ISet<Cell>, Cell, CellRotation)
Declaration
public virtual 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
GetBound()
Declaration
public virtual IBound GetBound()
Returns
GetBound(IEnumerable<Cell>)
Declaration
public virtual IBound GetBound(IEnumerable<Cell> cells)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<Cell> |
cells |
|
Returns
GetCellByIndex(Int32)
Declaration
public virtual Cell GetCellByIndex(int index)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Returns
GetCellCenter(Cell)
Declaration
public virtual Vector3 GetCellCenter(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
GetCellCorner(Cell, CellCorner)
Declaration
public virtual Vector3 GetCellCorner(Cell cell, CellCorner corner)
Parameters
Returns
GetCellCorners(Cell)
Declaration
public virtual IEnumerable<CellCorner> GetCellCorners(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<CellCorner> |
|
GetCellDirs(Cell)
Declaration
public virtual IEnumerable<CellDir> GetCellDirs(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<CellDir> |
|
GetCells()
Declaration
public virtual IEnumerable<Cell> GetCells()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Cell> |
|
GetCellsInBounds(IBound)
Declaration
public virtual IEnumerable<Cell> GetCellsInBounds(IBound bound)
Parameters
Type |
Name |
Description |
IBound |
bound |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Cell> |
|
GetCellsIntersectsApprox(Vector3, Vector3)
Declaration
public virtual IEnumerable<Cell> GetCellsIntersectsApprox(Vector3 min, Vector3 max)
Parameters
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Cell> |
|
GetCellType(Cell)
Declaration
public virtual ICellType GetCellType(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
GetCellTypes()
Declaration
public virtual IEnumerable<ICellType> GetCellTypes()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<ICellType> |
|
Declaration
public virtual Deformation GetDeformation(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
GetDual()
Declaration
public virtual IDualMapping GetDual()
Returns
GetIndex(Cell)
Declaration
public virtual int GetIndex(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
Type |
Description |
System.Int32 |
|
GetMeshData(Cell, out MeshData, out Matrix4x4)
Declaration
public virtual void GetMeshData(Cell cell, out MeshData meshData, out Matrix4x4 transform)
Parameters
GetPolygon(Cell, out Vector3[], out Matrix4x4)
Declaration
public virtual void GetPolygon(Cell cell, out Vector3[] vertices, out Matrix4x4 transform)
Parameters
GetTriangleMesh(Cell)
Declaration
public virtual IEnumerable<(Vector3, Vector3, Vector3, CellDir)> GetTriangleMesh(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
GetTRS(Cell)
Declaration
public virtual TRS GetTRS(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
IntersectBounds(IBound, IBound)
Declaration
public virtual IBound IntersectBounds(IBound bound, IBound other)
Parameters
Returns
IsCellInBound(Cell, IBound)
Declaration
public virtual bool IsCellInBound(Cell cell, IBound bound)
Parameters
Returns
Type |
Description |
System.Boolean |
|
IsCellInGrid(Cell)
Declaration
public virtual 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 virtual bool ParallelTransport(IGrid aGrid, Cell aSrcCell, Cell aDestCell, Cell srcCell, CellRotation startRotation, out Cell destCell, out CellRotation destRotation)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Raycast(Vector3, Vector3, Single)
Declaration
public virtual 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> |
|
Rebind(IGrid)
Creates a new grid applying the current wrapper to a new underlying.
Declaration
protected abstract IGrid Rebind(IGrid underlying)
Parameters
Type |
Name |
Description |
IGrid |
underlying |
|
Returns
TryApplySymmetry(GridSymmetry, Cell, out Cell, out CellRotation)
Declaration
public virtual bool TryApplySymmetry(GridSymmetry s, Cell src, out Cell dest, out CellRotation r)
Parameters
Returns
Type |
Description |
System.Boolean |
|
TryApplySymmetry(GridSymmetry, IBound, out IBound)
Declaration
public virtual bool TryApplySymmetry(GridSymmetry s, IBound srcBound, out IBound destBound)
Parameters
Returns
Type |
Description |
System.Boolean |
|
TryMove(Cell, CellDir, out Cell, out CellDir, out Connection)
Declaration
public virtual bool TryMove(Cell cell, CellDir dir, out Cell dest, out CellDir inverseDir, out Connection connection)
Parameters
Returns
Type |
Description |
System.Boolean |
|
TryMoveByOffset(Cell, Vector3Int, Vector3Int, CellRotation, out Cell, out CellRotation)
Declaration
public virtual bool TryMoveByOffset(Cell startCell, Vector3Int startOffset, Vector3Int destOffset, CellRotation startRotation, out Cell destCell, out CellRotation destRotation)
Parameters
Returns
Type |
Description |
System.Boolean |
|
UnionBounds(IBound, IBound)
Declaration
public virtual IBound UnionBounds(IBound bound, IBound other)
Parameters
Returns
Implements