[][src]Enum rlifesrc_lib::Transform

pub enum Transform {
    Id,
    Rotate90,
    Rotate180,
    Rotate270,
    FlipRow,
    FlipCol,
    FlipDiag,
    FlipAntidiag,
}

Transformations (rotations and reflections) after the last generation.

After the last generation, the pattern will return to the first generation, applying this transformation first, and then the translation defined by dx and dy.

8 different values corresponds to 8 elements of the dihedral group D8.

Id is the identity transformation.

R means rotations around the center of the world. The number after it is the counterclockwise rotation angle in degrees.

F means reflections (flips). The symbol after it is the axis of reflection.

Some of the transformations are only valid when the world is square.

Variants

Id

Id.

Identity transformation.

Rotate90

R90.

90° rotation counterclockwise.

Rotate180

R180.

180° rotation counterclockwise.

Rotate270

R270.

270° rotation counterclockwise.

FlipRow

F-.

Reflection across the middle row.

FlipCol

F|.

Reflection across the middle column.

FlipDiag

F\.

Reflection across the diagonal.

FlipAntidiag

F/.

Reflection across the antidiagonal.

Methods

impl Transform[src]

pub fn square_world(self) -> bool[src]

Whether the transformation requires the world to be square.

Returns true for R90, R270, F\ and F/.

Trait Implementations

impl Clone for Transform[src]

impl Copy for Transform[src]

impl Default for Transform[src]

The default transformation is the Id.

impl PartialEq<Transform> for Transform[src]

impl Debug for Transform[src]

impl FromStr for Transform[src]

type Err = String

The associated error which can be returned from parsing.

impl StructuralPartialEq for Transform[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,