Class MaskModifier
Filters the cells in the the grid to a customizable subset.
Filtered cells will not be returned by GetCells, TryMove, etc. Passing them as inputs
is undefined.
Inheritance
System.Object
MaskModifier
Assembly: Sylves.dll
Syntax
public class MaskModifier : BaseModifier, IGrid
Constructors
MaskModifier(IGrid, ISet<Cell>)
Declaration
public MaskModifier(IGrid underlying, ISet<Cell> allCells)
Parameters
| Type |
Name |
Description |
| IGrid |
underlying |
|
| System.Collections.Generic.ISet<Cell> |
allCells |
|
MaskModifier(IGrid, Func<Cell, Boolean>, IEnumerable<Cell>)
Declaration
public MaskModifier(IGrid underlying, Func<Cell, bool> containsFunc, IEnumerable<Cell> allCells = null)
Parameters
| Type |
Name |
Description |
| IGrid |
underlying |
|
| System.Func<Cell, System.Boolean> |
containsFunc |
|
| System.Collections.Generic.IEnumerable<Cell> |
allCells |
|
Properties
IsFinite
Declaration
public override bool IsFinite { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Overrides
Methods
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
GetCells()
Declaration
public override IEnumerable<Cell> GetCells()
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerable<Cell> |
|
Overrides
GetCellsInBounds(IBound)
Declaration
public override IEnumerable<Cell> GetCellsInBounds(IBound bound)
Parameters
| Type |
Name |
Description |
| IBound |
bound |
|
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
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
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