Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

How to calculate direction for D3DXIntersectTri function to find intersected point? And after getting the result in Distance how to get that coordinate(XYZ)?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

All of this is in the documentation for your function.

share|improve this answer
    
Pls, Provide some simple example for it. I've googled by not found simple example. –  Gani Apr 8 '13 at 6:50
    
There will not be an example for every use case that you need. What part of the documentation is unclear? –  Mokosha Apr 8 '13 at 14:37
    
HOW TO CALCULATE DIRECTION? AND HOW TO GET NEW INTERSECTED POINT FROM DISTANCE RETURN BY THIS FUNCTION? –  Gani Apr 9 '13 at 5:32
    
If you pass vectors p and d as ray position and direction, the returned value in pDist will tell you how far along the ray the point of intersection is. You can retrieve it by computing p + pDist * d assuming d is normalized. Also, it would be good to refrain from using all caps in your posts. –  Mokosha Apr 9 '13 at 20:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.