DirectX Picking

Started by
1 comment, last by Calin 18 years, 9 months ago
I have a question: Does DirectX have any similar function to OpenGL Picking (GL_SELECT)?

My project`s facebook page is “DreamLand Page”

Advertisement
I do not believe so, but it is not hard to implement.

Create a ray from a pixel, transform it by the inverse of (world*view) matrix, and then cast the ray, the first intersected objected is the one you want.

Sounds easy, but it requires:

- Having a linear algebra library
- Having some kind of graphics engine with matrices stored
- Having ray/object intersection implemented
Thanks!

My project`s facebook page is “DreamLand Page”

This topic is closed to new replies.

Advertisement