signed distance between plane and point

后端 未结 2 2008
[愿得一人]
[愿得一人] 2020-12-31 18:44

I cannot find a consistent method for finding the signed distance between a point and a plane. How can I calculate this given a plane defined as a point and a normal?

<
2条回答
  •  猫巷女王i
    2020-12-31 19:27

    You're making things much too complicated. If your normal is normalized, you can just do this:

    float dist = dotProduct(p.normal, (vectorSubtract(point, p.point)));
    

提交回复
热议问题