facade for an integer from 0 to 3 describing the 4 possible directions for a building
used for transforming points in and out of building rotation(keeps building origin the same while rotating size and visuals)
|
| BuildingRotationRectangle (int state) |
|
| BuildingRotationRectangle (Quaternion rotation) |
|
override void | TurnClockwise () |
|
override void | TurnCounterClockwise () |
|
override Vector2Int | RotateOrigin (Vector2Int origin, Vector2Int size) |
| calculates the rotated corner of a building from the placement origin
so bottom left with rotation 2 returns top right corner
can be used to get get the transform position from the origin
|
|
override Vector2Int | UnrotateOrigin (Vector2Int point, Vector2Int size) |
| inverse of RotateOrigin(Vector2Int, Vector2Int) calculates the bottom left origin from the transform corner
|
|
override Vector2Int | RotateBuildingPoint (Vector2Int origin, Vector2Int point, Vector2Int size) |
| rotates a point relative to the building(access points for example)
|
|
override Vector2Int | RotateSize (Vector2Int size) |
| calculates the rotated size on the grid starting from the origin
|
|
override Quaternion | GetRotation () |
| returns the world rotation for the building visual
|
|
override Quaternion | GetRotation (bool isXY) |
|
void | TurnClockwise () |
|
void | TurnCounterClockwise () |
|
Vector2Int | RotateOrigin (Vector2Int origin, Vector2Int size) |
| calculates the rotated corner of a building from the placement origin
so bottom left with rotation 2 returns top right corner
can be used to get get the transform position from the origin
|
|
Vector2Int | UnrotateOrigin (Vector2Int point, Vector2Int size) |
| inverse of RotateOrigin(Vector2Int, Vector2Int) calculates the bottom left origin from the transform corner
|
|
Vector2Int | RotateBuildingPoint (Vector2Int origin, Vector2Int point, Vector2Int size) |
| rotates a point relative to the building(access points for example)
used to transform points in the building(0|1, 1|1) into world points
|
|
Vector2Int | RotateSize (Vector2Int size) |
| calculates the rotated size on the grid starting from the origin
|
|
Quaternion | GetRotation () |
| returns the world rotation for the building visual
|
|
Quaternion | GetRotation (bool isXY) |
|