SimpleFlips class

Tiled represents all flips and rotation using three possible flips: horizontal, vertical and diagonal. This class converts that representation to a simpler one, that uses one angle (with pi/2 steps) and one flip (horizontal). All vertical flips are represented as horizontal flips + 180º. Further reference: https://doc.mapeditor.org/en/stable/reference/tmx-map-format/#tile-flipping.

cos and sin are the cosine and sine of the rotation respectively, and and are provided for simple calculation with RSTransform. Further reference: https://api.flutter.dev/flutter/dart-ui/RSTransform/RSTransform.html

Constructors

SimpleFlips(int angle, int cos, int sin, {required bool flip})
Tiled represents all flips and rotation using three possible flips: horizontal, vertical and diagonal. This class converts that representation to a simpler one, that uses one angle (with pi/2 steps) and one flip (horizontal). All vertical flips are represented as horizontal flips + 180º. Further reference: https://doc.mapeditor.org/en/stable/reference/tmx-map-format/#tile-flipping.
SimpleFlips.fromFlips(Flips flips)
This is the conversion from the truth table that I drew.
factory

Properties

angle int
The angle (in steps of pi/2 rads), clockwise, around the center of the tile.
final
cos int
The cosine of the rotation.
final
flip bool
Whether to flip (across a central vertical axis).
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sin int
The sine of the rotation.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited