Tinman.Transform

Description

Name

enum Tinman.Transform

Used by

Heightmap.Import.transform

Enumeration of simple 2D affine transformations.

Each possible combination of the transforms in this enum will result in a transform that is also defined in this enumeration:

Combine(a,b) := a           * b
-----------------------------------------
Rotate       := RotateInv   * Center
Rotate       := Center      * RotateInv
Rotate       := Vertical    * Diagonal
Rotate       := Horizontal  * DiagonalInv
Rotate       := Diagonal    * Horizontal
Rotate       := DiagonalInv * Vertical
-----------------------------------------
RotateInv    := Rotate      * Center
RotateInv    := Center      * Rotate
RotateInv    := Vertical    * DiagonalInv
RotateInv    := Horizontal  * Diagonal
RotateInv    := Diagonal    * Vertical
RotateInv    := DiagonalInv * Horizontal
-----------------------------------------
Center       := Rotate      * Rotate
Center       := RotateInv   * RotateInv
Center       := Vertical    * Horizontal
Center       := Horizontal  * Vertical
Center       := Diagonal    * DiagonalInv
Center       := DiagonalInv * Diagonal
-----------------------------------------
Vertical     := Rotate      * Diagonal
Vertical     := RotateInv   * DiagonalInv
Vertical     := Center      * Horizontal
Vertical     := Horizontal  * Center
Vertical     := Diagonal    * RotateInv
Vertical     := DiagonalInv * Rotate
-----------------------------------------
Horizontal   := Rotate      * DiagonalInv
Horizontal   := RotateInv   * Diagonal
Horizontal   := Center      * Vertical
Horizontal   := Vertical    * Center
Horizontal   := Diagonal    * Rotate
Horizontal   := DiagonalInv * RotateInv
-----------------------------------------
Diagonal     := Rotate      * Horizontal
Diagonal     := RotateInv   * Vertical
Diagonal     := Center      * DiagonalInv
Diagonal     := Vertical    * Rotate
Diagonal     := Horizontal  * RotateInv
Diagonal     := DiagonalInv * Center
-----------------------------------------
DiagonalInv  := Rotate      * Vertical
DiagonalInv  := RotateInv   * Horizontal
DiagonalInv  := Center      * Diagonal
DiagonalInv  := Vertical    * RotateInv
DiagonalInv  := Horizontal  * Rotate
DiagonalInv  := Diagonal    * Center

Items

# Name Tag

0

None

-

No transformation.

+---+---+      +---+---+
| A | B |      | A | B |
+---o---+  =>  +---o---+    o := (0, 0)
| C | D |      | C | D |
+---+---+      +---+---+

This transform does not depend on the direction of the Y-axis.

1

Center

-

Flip at center (resp. rotation of 180°).

x' := -x
y' := -y

+---+---+      +---+---+
| A | B |      | D | C |
+---o---+  =>  +---o---+    o := (0, 0)
| C | D |      | B | A |
+---+---+      +---+---+

This transform does not depend on the direction of the Y-axis.

2

Vertical

-

Flip at X-axis.

x' := -y
y' := x

+---+---+      +---+---+
| A | B |      | C | D |
+---o---+  =>  +---o---+    o := (0, 0)
| C | D |      | A | B |
+---+---+      +---+---+

This transform does not depend on the direction of the Y-axis.

3

Horizontal

-

Flip at Y-axis.

x' := -x
y' := y

+---+---+      +---+---+
| A | B |      | B | A |
+---o---+  =>  +---o---+    o := (0, 0)
| C | D |      | D | C |
+---+---+      +---+---+

This transform does not depend on the direction of the Y-axis.

4

Rotate

-

Rotation of 90°

x' := -y
y' := x

+---+---+      +---+---+       ^ Y+
| A | B |      | B | D |       |
+---o---+  =>  +---o---+    ---+---> X+
| C | D |      | A | C |       |
+---+---+      +---+---+       |

+---+---+      +---+---+       |
| A | B |      | C | A |       |
+---o---+  =>  +---o---+    ---+---> X+
| C | D |      | D | B |       |
+---+---+      +---+---+       V Y+

5

RotateInv

-

Inverse rotation of 90°.

x' := y
y' := -x

+---+---+      +---+---+       ^ Y+
| A | B |      | C | A |       |
+---o---+  =>  +---o---+    ---+---> X+    o := (0, 0)
| C | D |      | D | B |       |
+---+---+      +---+---+       |

+---+---+      +---+---+       |
| A | B |      | B | D |       |
+---o---+  =>  +---o---+    ---+---> X+    o := (0, 0)
| C | D |      | A | C |       |
+---+---+      +---+---+       V Y+

6

Diagonal

-

Flip at Y = X.

x' := y
y' := x

+---+---+      +---+---+       ^ Y+
| A | B |      | D | B |       |
+---o---+  =>  +---o---+    ---+---> X+    o := (0, 0)
| C | D |      | C | A |       |
+---+---+      +---+---+       |

+---+---+      +---+---+       |
| A | B |      | A | C |       |
+---o---+  =>  +---o---+    ---+---> X+    o := (0, 0)
| C | D |      | B | D |       |
+---+---+      +---+---+       V Y+

7

DiagonalInv

-

Flip at Y = -X.

x' := -y
y' := -x

+---+---+      +---+---+       ^ Y+
| A | B |      | A | C |       |
+---o---+  =>  +---o---+    ---o---> X+    o := (0, 0)
| C | D |      | B | D |       |
+---+---+      +---+---+       |

+---+---+      +---+---+       |
| A | B |      | D | B |       |
+---o---+  =>  +---o---+    ---o---> X+    o := (0, 0)
| C | D |      | C | A |       |
+---+---+      +---+---+       V Y+