Help with mouse picking in D3DIM
Does anyone have an example of or know how to do mesh/vertex picking in D3DIM. I know it''s easy in RM, but I can''t find and samples of it in IM.
Thanks.
Are you trying to point at the screen with the mouse, and see what triangle you''re pointing at?
There''s a D3DIM function called PICK that''s supposed to do it. I''ve never used it, because it clashes with my method
of drawing.
You might check if out.
There''s a D3DIM function called PICK that''s supposed to do it. I''ve never used it, because it clashes with my method
of drawing.
You might check if out.
-- Goodlife-----------------------------Those whom the gods would destroy, they first drive mad.--DirectX design team official motto
The method I use is to have the object in a Vertex Buffer. Then ProcessVertices into another Vertex Buffer. The second vertex buffer now contains the screen coordinates of each vertex, then I can compare the screen position of the click to the screen position of the vertices to find out which one was clicked. It sounds slow, but it''s really not bad. You do, however, have to make sure when creating your vertex buffers that they are in system memory, not video because reading the transformed vertices from video mem is SLLLLOOOOOOWWWWWW!
Good Luck.
Good Luck.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement