Jump to content

View more

Image of the Day

WIP title screen for #DeathOfAPartisan #screenshotsaturday #gamedev https://t.co/qJNhfZCvd4
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Picking 3D Models thats drawn with DrawIndexPrimitive

4: Adsense

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   

588
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?


:)

#2 Tom KQT   Members   

1704
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.