Class TileRotation
Describes which rotations and reflections are allowed, and
and stores how to process each tile during a rotation.
These are constructed with a TileRotationBuilder
Assembly: DeBroglie.dll
Syntax
public class TileRotation
Constructors
|
Edit this page
View Source
TileRotation()
A TileRotation that permits no rotation at all.
Declaration
|
Edit this page
View Source
TileRotation(int, bool)
Constructs a TileRotation that allows rotations and reflections as passed in,
but leaves all tiles unchanged when rotating.
rotationalSymmetry
Declaration
public TileRotation(int rotationalSymmetry, bool reflectionalSymmetry)
Parameters
Type |
Name |
Description |
int |
rotationalSymmetry |
Permits rotations of 360 / rotationalSymmetry
|
bool |
reflectionalSymmetry |
If true, reflections in the x-axis are permited
|
Properties
|
Edit this page
View Source
RotationGroup
Declaration
public RotationGroup RotationGroup { get; }
Property Value
Methods
|
Edit this page
View Source
Canonicalize(Tile)
For a rotated tile, finds the canonical representation.
Leaves all other tiles unchanged.
Declaration
public Tile Canonicalize(Tile t)
Parameters
Type |
Name |
Description |
Tile |
t |
|
Returns
|
Edit this page
View Source
Rotate(Tile, Rotation, out Tile)
Attempts to reflect, then rotate clockwise, a given Tile.
If there is a corresponding tile (possibly the same one), then it is set to result.
Otherwise, false is returned.
Declaration
public bool Rotate(Tile tile, Rotation rotation, out Tile result)
Parameters
Returns
|
Edit this page
View Source
Rotate(IEnumerable<Tile>, Rotation)
Convenience method for calling Rotate on each tile in a list, skipping any that cannot be rotated.
Declaration
public IEnumerable<Tile> Rotate(IEnumerable<Tile> tiles, Rotation rotation)
Parameters
Returns
|
Edit this page
View Source
RotateAll(Tile)
Declaration
public IEnumerable<Tile> RotateAll(Tile tile)
Parameters
Type |
Name |
Description |
Tile |
tile |
|
Returns
|
Edit this page
View Source
RotateAll(IEnumerable<Tile>)
Declaration
public IEnumerable<Tile> RotateAll(IEnumerable<Tile> tiles)
Parameters
Returns