Crate plane_split
source ·Expand description
Plane splitting.
Uses euclid for the math basis. Introduces new geometrical primitives and associated logic.
Automatically splits a given set of 4-point polygons into sub-polygons that don’t intersect each other. This is useful for WebRender, to sort the resulting sub-polygons by depth and avoid transparency blending issues.
Structs
Binary Space Partitioning splitter, uses a BSP tree.
A helper object to clip polygons by a number of planes.
A generic line.
The projection of a
Polygon
on a line.An error returned when everything would end up projected
to the negative hemisphere (W <= 0.0);
An infinite plane in 3D space, defined by equation:
dot(v, normal) + offset = 0
When used for plane splitting, it’s defining a hemisphere
with equation “dot(v, normal) + offset > 0”.
A convex polygon with 4 points lying on a plane.
Enums
Polygon intersection results.
The result of a polygon being cut by a plane.
The “cut” here is an attempt to classify a plane as being
in front or in the back of another one.