Show / Hide Table of Contents

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

Inheritance
object
TileRotation
Namespace: DeBroglie.Rot
Assembly: DeBroglie.dll
Syntax
public class TileRotation

Constructors

| Edit this page View Source

TileRotation()

A TileRotation that permits no rotation at all.

Declaration
public TileRotation()
| 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
Type Description
RotationGroup

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
Type Description
Tile
| 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
Type Name Description
Tile tile
Rotation rotation
Tile result
Returns
Type Description
bool
| 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
Type Name Description
IEnumerable<Tile> tiles
Rotation rotation
Returns
Type Description
IEnumerable<Tile>
| Edit this page View Source

RotateAll(Tile)

Declaration
public IEnumerable<Tile> RotateAll(Tile tile)
Parameters
Type Name Description
Tile tile
Returns
Type Description
IEnumerable<Tile>
| Edit this page View Source

RotateAll(IEnumerable<Tile>)

Declaration
public IEnumerable<Tile> RotateAll(IEnumerable<Tile> tiles)
Parameters
Type Name Description
IEnumerable<Tile> tiles
Returns
Type Description
IEnumerable<Tile>
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX