DirectX 8 Forum

This is a community forum and not official technical support. — If you need official support: Contact Us

The following comments are owned by whoever posted them. We are not responsible for them in any way.

Back to Threads Reply to Thread

Directx projection matrix

I am trying to find if the point clicked on the screen using the mouse, fall on the mesh body rendered using directx8(and vb). The points of the mesh nodes are in 3d which i have rendered using directx's draw primitives. The picked point is the 2d mouse point. I will have to convert the 3d(node's coordinates) points into the screen coordinates and check if the picked point falls on the mesh. My understanding is that i will have to get the projection matrix and multiply it with the 3d point i am interested to get its corresponding 2d screen coordinate. Is this correct? How to get the projection matrix and multiply(projection matrix is 4X4 and 3dpoint is 3X1)Can somebody suggest how to do this?

CrossOver Forums: the place to discuss running Windows applications on Mac and Linux

CodeWeavers or its third-party tools process personal data (e.g. browsing data or IP addresses) and use cookies or other identifiers, which are necessary for its functioning and required to achieve the purposes illustrated in our Privacy Policy. You accept the use of cookies or other identifiers by clicking the Acknowledge button.
Please Wait...
eyJjb3VudHJ5IjoiVVMiLCJsYW5nIjoiZW4iLCJjYXJ0IjowLCJ0enMiOi02LCJjZG4iOiJodHRwczpcL1wvbWVkaWEuY29kZXdlYXZlcnMuY29tXC9wdWJcL2Nyb3Nzb3Zlclwvd2Vic2l0ZSIsImNkbnRzIjoxNzM2MzczNjgxLCJjc3JmX3Rva2VuIjoiWEZRTHV0OHRrWE5SVlNaZiIsImdkcHIiOjB9