Jump to content

  • Log In with Google      Sign In   
  • Create Account


Help with mouse picking in D3DIM


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Paranoid69   Members   -  Reputation: 122

Like
Likes
Like

Posted 14 February 2000 - 11:52 AM

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.

Sponsor:

#2 Goodlife   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 February 2000 - 03:10 AM

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.

#3 BigCarlito   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 February 2000 - 09:28 AM

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.

#4 Paranoid69   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 February 2000 - 10:38 AM

Thanks a ton, I''ll try the VertexBuffer process out.

As for the Pick function, that got removed with DX7.

Thanks again.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS