RegionShape
public readonly struct RegionShape
One placed shape of a region's geometry.
Read with Region.GetShapes; a RegionPrimitive.Polygon's vertices come from Region.ReadShapePoints(…).
RegionShape: properties
public Vector2 Centre { get; init; }
Where it sits, in region coordinates.
public bool HasShear { get; init; }
Whether the shape's transform carries a shear, which RegionShape.Centre, RegionShape.Size and RegionShape.Rotation cannot represent. They are then best-effort rather than exact. False for every region built by the factory methods.
public uint PointCount { get; init; }
For a RegionPrimitive.Polygon, how many vertices it has; for a RegionPrimitive.Spline, how many control points, including the last one repeating the first on a closed curve. Either way it is what Region.ReadShapePoints(…) returns, and for a spline it is not the number of points to draw; that is Region.ReadShapeCurve(…). Zero for every other primitive.
public RegionPrimitive Primitive { get; init; }
Which canonical shape.
public float Rotation { get; init; }
Its rotation about RegionShape.Centre, anticlockwise, in radians.
public Vector2 Size { get; init; }
Its full width and height -- not half-extents.