DirectX Picking
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement