Hello!

I’m trying to figure out how to calculate the distance from a given point `p`

to a plane defined as a `ofPlanePrimitive`

.

There’s the geometric solution, by which I need to find the normal of the plane N=(A,B,C), and our target point p = (x_1, y_1, z_1).

From the normal, the plane can be defined as

equation for the plane as `Ax+By+Cz+D=0`

, where `D = -Ax_0 - By_0 - Cz_0`

(in my case, D is zero).

The distance formula is then the length of the projection of P onto the plane N:

`d = |p · N|`

So far so good.

But how do I get the normal from the plane? It seems like there should be an easy way to do this in OF, but I’m not seeing it in the docs.