Show / Hide Table of Contents

Class WrapModifier

Turns any bounded grid into a grid which connects back on itself when you leave the grounds. This is done via a canonicalize method that is responsible for replacing cells that are outside of the bounds.

Inheritance
System.Object
BaseModifier
WrapModifier
WrappingSquareGrid
Implements
IGrid
Inherited Members
BaseModifier.GetCellTypes()
BaseModifier.GetDual()
BaseModifier.GetCells()
BaseModifier.GetCellType(Cell)
BaseModifier.IsCellInGrid(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.GetCellsInBounds(IBound)
BaseModifier.IsCellInBound(Cell, 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.FindCell(Vector3, Cell)
BaseModifier.FindCell(Matrix4x4, Cell, CellRotation)
BaseModifier.GetCellsIntersectsApprox(Vector3, Vector3)
BaseModifier.TryApplySymmetry(GridSymmetry, IBound, IBound)
BaseModifier.Is2d
BaseModifier.Is3d
BaseModifier.IsPlanar
BaseModifier.IsRepeating
BaseModifier.IsOrientable
BaseModifier.IsFinite
BaseModifier.IsSingleCellType
BaseModifier.CoordinateDimension
BaseModifier.Unwrapped
BaseModifier.Underlying
BaseModifier.IndexCount
Namespace: Sylves
Assembly: Sylves.dll
Syntax
public class WrapModifier : BaseModifier, IGrid

Constructors

WrapModifier(IGrid, Func<Cell, Nullable<Cell>>)

Declaration
public WrapModifier(IGrid underlying, Func<Cell, Nullable<Cell>> canonicalize)
Parameters
Type Name Description
IGrid underlying
System.Func<Cell, System.Nullable<Cell>> canonicalize

Properties

Unbounded

Declaration
public override IGrid Unbounded { get; }
Property Value
Type Description
IGrid
Overrides
BaseModifier.Unbounded

Methods

Canonicalize(Cell)

Declaration
public Nullable<Cell> Canonicalize(Cell cell)
Parameters
Type Name Description
Cell cell
Returns
Type Description
System.Nullable<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)

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