Hi @Pete_S, I think it is important to keep in mind the distinction between a Plane and a plane-shaped Entity.
A plane-shaped Entity is easy to visualize: it’s a flat surface at a given position and orientation. But the Plane is a mathematical object in Hessian Normal form. I find it pretty awkward to think about where a given Plane is located—the distance needs to be relative to the origin of your current working coordinate system. In the case of your set of points, that would be the center of the Earth. Changing the normal would then rotate the plane around the center of the Earth.
To slice your points based on a plane-shaped Entity, I can think of two options:
- Construct a mathematical
Planethat lines up with your planarEntity, and re-construct it every time theEntitymoves. This could be awkward to reason about, as mentioned. - Inverse transform the points from the coordinates of the
Entityback to the coordinates of the raw mathematicalPlanefrom which theEntitywas constructed. This is easier, since you can derive a current version of the required transform viaEntity.computeModelMatrix.
I tried the second option in this Sandcastle example. You can try modifying the value of redPlaneEntityHeading to see how the slicing of the points changes as the planar Entity rotates.