|
ClassicCityBuilderKit 1.9.4
|
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)
Public Member Functions | |
| BuildingRotationHexagon (int state) | |
| BuildingRotationHexagon (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) |
Public Member Functions inherited from CityBuilderCore.BuildingRotation | |
| 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) |
Additional Inherited Members | |
Static Public Member Functions inherited from CityBuilderCore.BuildingRotation | |
| static BuildingRotation | Create () |
| static BuildingRotation | Create (int state) |
| static BuildingRotation | Create (Quaternion rotation) |
| static BuildingRotation | Create (int state, bool isHex) |
Properties inherited from CityBuilderCore.BuildingRotation | |
| int | State [get, protected set] |
| override Quaternion CityBuilderCore.BuildingRotationHexagon.GetRotation | ( | ) |
returns the world rotation for the building visual
| override Vector2Int CityBuilderCore.BuildingRotationHexagon.RotateBuildingPoint | ( | Vector2Int | origin, |
| Vector2Int | point, | ||
| Vector2Int | size ) |
rotates a point relative to the building(access points for example)
| origin | |
| point | |
| size |
| override Vector2Int CityBuilderCore.BuildingRotationHexagon.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
| origin | origin point |
| size | building size |
| override Vector2Int CityBuilderCore.BuildingRotationHexagon.RotateSize | ( | Vector2Int | size | ) |
calculates the rotated size on the grid starting from the origin
| size |
| override Vector2Int CityBuilderCore.BuildingRotationHexagon.UnrotateOrigin | ( | Vector2Int | point, |
| Vector2Int | size ) |
inverse of RotateOrigin(Vector2Int, Vector2Int) calculates the bottom left origin from the transform corner
| point | |
| size |