RegionShape
pub struct RegionShape
One placed shape of a region's geometry.
The ABI had getters for centre, size and rotation only, all describing the first leaf, so a polygon and an ellipse of the same bounding box were indistinguishable and a polygon's vertices were unreachable.
RegionShape — fields
primitive: RegionPrimitive
Which canonical shape.
centre: Vec2
Where it sits, in region coordinates.
size: Vec2
Its full width and height, not half-extents.
rotation_rad: f32
Its rotation about centre, anticlockwise, in radians.
point_count: u32
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.
Zero for every other primitive.
has_shear: bool
The transform carries a shear the three fields above cannot represent, so they are best-effort rather than exact. False for every region the constructors build.