Jump to content

  • Log In with Google      Sign In   
  • Create Account


Picking 3D Models thats drawn with DrawIndexPrimitive


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
1 reply to this topic

#1 Anddos   Members   -  Reputation: 485

Like
0Likes
Like

Posted 27 April 2014 - 10:01 PM

I know how todo picking with LPD3DMESH objects but i am not sure how todo if for models directly drawn with DrawIndexPrimitve,how would you do it if D3DXIntersect takes a mesh object only?


:)

Sponsor:

#2 Tom KQT   Members   -  Reputation: 1562

Like
2Likes
Like

Posted 28 April 2014 - 12:32 AM

Multiple choices, some may be not suitable for you depending on what you are really doing:

a) Make a D3DX mesh from the vertex/index data. You can create an empty mesh with D3DXCreateMesh() and then lock and fill its vertex and index buffer.

b) Use D3DXIntersectTri() to do intersection tests on individual triangles rather than the whole mesh/subset.

c) Use some other intersection method :) Physics engines will probably have functions for this (Havok certainly does, I'm not sure about the others.)






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