I’m writing a program where there exists points in space and each point is at the exact center of a cube. For each point, I have two angles (vertical and horizontal rotation, or pitch and yaw) as well as the shortest distance from the point to any face on its respective cube.
Vertical rotation is between -90 and 90 degrees, horizontal rotation is between -180 and 180 degrees.
Would anyone happen to know the formula by which I could determine the distance between a point and a remote coordinate within a face (plane) of its cube using those three elements?