I need to calculate the distance from a point [x y z] to the surface of an object (at this stage a simple rectoid, but later an arbitrary shape) along [0 0 1].
I could do this defining the surfaces as planes using unit vectors and then doing a linear algebra calculation to find the distance to all the planes along [0 0 1] but as someone fairly new to coding and Java, I wanted to see if there was a library or a more efficient way of doing this as in the long term I may have complex convex objects, so need to be careful to use standard practices (so I can use something else to generate the planes!)
Thanks,