Show / Hide Table of Contents

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
BaseModifier
MaskModifier
Implements
IGrid
Inherited Members
BaseModifier.GetCellTypes()
BaseModifier.GetDual()
BaseModifier.GetCellType(Cell)
BaseModifier.GetCellDirs(Cell)
BaseModifier.GetCellCorners(Cell)
BaseModifier.FindBasicPath(Cell, Cell)
BaseModifier.GetIndex(Cell)
BaseModifier.GetCellByIndex(Int32)
BaseModifier.GetBound()
BaseModifier.GetBound(IEnumerable<Cell>)
BaseModifier.BoundBy(IBound)
BaseModifier.IntersectBounds(IBound, IBound)
BaseModifier.UnionBounds(IBound, IBound)
BaseModifier.GetCellCenter(Cell)
BaseModifier.GetCellCorner(Cell, CellCorner)
BaseModifier.GetTRS(Cell)
BaseModifier.GetDeformation(Cell)
BaseModifier.GetPolygon(Cell, Vector3[], Matrix4x4)
BaseModifier.GetTriangleMesh(Cell)
BaseModifier.GetMeshData(Cell, MeshData, Matrix4x4)
BaseModifier.FindGridSymmetry(ISet<Cell>, ISet<Cell>, Cell, CellRotation)
BaseModifier.TryApplySymmetry(GridSymmetry, IBound, IBound)
BaseModifier.Is2d
BaseModifier.Is3d
BaseModifier.IsPlanar
BaseModifier.IsRepeating
BaseModifier.IsOrientable
BaseModifier.IsSingleCellType
BaseModifier.CoordinateDimension
BaseModifier.Unbounded
BaseModifier.Unwrapped
BaseModifier.Underlying
BaseModifier.IndexCount
Namespace: Sylves
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
BaseModifier.IsFinite

Methods

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)

GetCells()

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

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
BaseModifier.GetCellsInBounds(IBound)

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)

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)

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