Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Solomon

Detect in T-Strip

This topic is 5760 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, sorry I´m a newbie in DX, but I need help with a detecting triangle in T-Strip. All examples I´ve found, working with a Mesh. If I try to use D3DXIntersectTri(), then the values returned does not coresponding with e cursor position on the screen. If somebody knows how to detect triangle(with its vertices position coords) created with DrawPrimitive(), plz help. Thx

Share this post


Link to post
Share on other sites
Advertisement
Hey-

If you look at the pick sample that comes with the DirectX sdk, there is a function called "IntersectTriangle."

If you give this function your orig and direction vectors and the three vertices of your triangle, then it will tell you if there is an intersection.

Hope this helps-

Share this post


Link to post
Share on other sites
bmoberly has got it right...

Furthermore, I''d say than when you''ve managed to use the pick code to detect a simple triangle with an identity world transform, you''ll want to move it around... And then the pick code might give you some troubles. There''s a bit of fancy matrix footwork to manage.

You might want to have a look at http://www.mvps.org/directx/indexes/direct3d_articles.htm His technical articles involve one improving on the ''pick'' program. I haven''t read it but it''s likely you''ll learn something.

=^.^= Leaders and teachers should remember: It is best to offer others what they Need not what they Want.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!