Class TriangularPolarPointyBrickMap
public class TriangularPolarPointyBrickMap : AbstractMap<PointyHexPoint>, IPolarMap<PointyHexPoint>, IMap<PointyHexPoint>, IGridToWorldMap<PointyHexPoint>
- Inheritance
-
TriangularPolarPointyBrickMap
- Implements
- Inherited Members
- Extension Methods
Constructors
TriangularPolarPointyBrickMap(Vector2, float, float, int, int)
public TriangularPolarPointyBrickMap(Vector2 center, float innerRadius, float outerRadius, int sectorsInFirstRow, int bandsCount)
Parameters
Properties
BandsCount
public int BandsCount { get; }
Property Value
Center
public Vector2 Center { get; }
Property Value
Infinity
public PointyHexPoint Infinity { get; }
Property Value
InnerRadius
public float InnerRadius { get; }
Property Value
OuterRadius
public float OuterRadius { get; }
Property Value
SectorAngle
public float[] SectorAngle { get; }
Property Value
- float[]
SectorsInFirstRow
public int SectorsInFirstRow { get; }
Property Value
Methods
CalcBottomLeft(IGridSpace<PointyHexPoint>)
public override Vector2 CalcBottomLeft(IGridSpace<PointyHexPoint> grid)
Parameters
grid
IGridSpace<PointyHexPoint>
Returns
CalcBottomLeft_(IGridSpace<PointyHexPoint>)
public Vector2 CalcBottomLeft_(IGridSpace<PointyHexPoint> grid)
Parameters
grid
IGridSpace<PointyHexPoint>
Returns
CalcGridDimensions(IGridSpace<PointyHexPoint>)
public override Vector2 CalcGridDimensions(IGridSpace<PointyHexPoint> grid)
Parameters
grid
IGridSpace<PointyHexPoint>
Returns
CalcGridDimensions_(IGridSpace<PointyHexPoint>)
public Vector2 CalcGridDimensions_(IGridSpace<PointyHexPoint> grid)
Parameters
grid
IGridSpace<PointyHexPoint>
Returns
GetEndAngleZ(PointyHexPoint)
Returns the Z angle in degrees of the given grid point at the end of the sector.
This is useful for making a mesh for the sector band, for instance.
public float GetEndAngleZ(PointyHexPoint gridPoint)
Parameters
gridPoint
PointyHexPoint
Returns
GetInnerRadius(PointyHexPoint)
Gets the inside radius of the band ath the given grid point.
public float GetInnerRadius(PointyHexPoint gridPoint)
Parameters
gridPoint
PointyHexPoint
Returns
GetOuterRadius(PointyHexPoint)
Gets the outside radius of the band ath the given grid point.
public float GetOuterRadius(PointyHexPoint gridPoint)
Parameters
gridPoint
PointyHexPoint
Returns
GetStartAngleZ(PointyHexPoint)
public float GetStartAngleZ(PointyHexPoint gridPoint)
Parameters
gridPoint
PointyHexPoint
Returns
GridToWorld(PointyHexPoint)
This method maps a grid point to a world point.
public override Vector2 GridToWorld(PointyHexPoint gridPoint)
Parameters
gridPoint
PointyHexPoint
Returns
InverseTransform(Vector2, float)
public static Vector2 InverseTransform(Vector2 v, float radius)
Parameters
Returns
RawWorldToGrid(Vector2)
This method maps a world point to a grid point, assuming that the anchor point is centered in the cell.This will allow the index accessors[] to give correct results for any anchoring.
public override PointyHexPoint RawWorldToGrid(Vector2 worldPoint)
Parameters
worldPoint
Vector2
Returns
Transform(Vector2, float)
public static Vector2 Transform(Vector2 v, float radius)