Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You say you've got the camera position and orientation, and the table is defined as a plane passing through (0,0,0)

You create the pointsTransformed3D just like you do, then also multiply it by the inverse rotation matrix of the camera, just like HERE. Then it's origin is the location of the camera (see the camera_translation variable in that function).

Finding the intersection is easy: https://en.wikipedia.org/wiki/Line–plane_intersection