Class XZModifier
Converts a IGrid based in the XY plane to one
in the XZ plane. It does this by rotating Y+ to Z- (and Z+ to Y+).
This is different from a transform in that it doesn't rotate the cells, it applies XZCellModifier to them.
Assembly: Sylves.dll
Syntax
public class XZModifier : TransformModifier, IGrid
Constructors
XZModifier(IGrid)
Declaration
public XZModifier(IGrid underlying)
Parameters
| Type |
Name |
Description |
| IGrid |
underlying |
|
Methods
FindCell(Matrix4x4, out Cell, out CellRotation)
Returns the cell and rotation corresponding to a given transform matrix.
Declaration
public override bool FindCell(Matrix4x4 matrix, out Cell cell, out CellRotation rotation)
Parameters
Returns
Overrides
GetCellType(Cell)
Returns the cell type associated with a given cell
Declaration
public override ICellType GetCellType(Cell cell)
Parameters
| Type |
Name |
Description |
| Cell |
cell |
|
Returns
Overrides
GetCellTypes()
Declaration
public override IEnumerable<ICellType> GetCellTypes()
Returns
Overrides
GetTRS(Cell)
Returns the appropriate transform for the cell.
The translation will always be to GetCellCenter,
rotation reflects the particular orientation of this cell
and the scale will reflect cell sizing.
GetTRS is often "best effort", there might not be an obvious
linear transformation from the canonical cell to the grid cell.
Declaration
public override TRS GetTRS(Cell cell)
Parameters
| Type |
Name |
Description |
| Cell |
cell |
|
Returns
Overrides
ParallelTransport(IGrid, Cell, Cell, Cell, CellRotation, out Cell, out CellRotation)
Given a path in aGrid from aSrcCell to aDestCell
follows the same path in the current grid, starting at srcCell, and with the whole path rotated by startRotation.
Reports the final spot that the path ends at, and it's rotation.
Returns false if this cannot be done (typically because an equivalent pathc annot be found in the grid).
This method is useful for translating co-ordinates between different grids that are similarish, at least having the same celltypes.
For example, suppose
aGrid = new SquareGrid(1);
aSrcCell = new Cell(0, 0)
aDestCell = new Cell(5, 0)
srcCell = new Cell(100, 100)
startRotation = identity
Then the path in aGrid is a straight line moving 5 units to the right,
and this method would attempt to move 5 units in the straight line that leads right out of (100, 100).
Declaration
public override bool ParallelTransport(IGrid aGrid, Cell aSrcCell, Cell aDestCell, Cell srcCell, CellRotation startRotation, out Cell destCell, out CellRotation destRotation)
Parameters
Returns
Overrides
Rebind(IGrid)
Creates a new grid applying the current wrapper to a new underlying.
Declaration
protected override IGrid Rebind(IGrid underlying)
Parameters
| Type |
Name |
Description |
| IGrid |
underlying |
|
Returns
Overrides
Implements
Extension Methods