• Advertisement

Archived

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

D3DXMeshIntersect() Direction

This topic is 5507 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, The Line that D3DXMeshIntersect() tests is finite or infinite ? I mean:
D3DXVECTOR3   Pos = D3DXVECTOR3( 0.0f, 0.0f, 0.0f );
D3DXVECTOR3   Dir = D3DXVECTOR3( 0.0f, 1.0f, 0.0f );
D3DXMeshIntersect(...);
 
Is the same as:
D3DXVECTOR3   Pos = D3DXVECTOR3( 0.0f, 0.0f, 0.0f );
D3DXVECTOR3   Dir = D3DXVECTOR3( 0.0f, 2.0f, 0.0f );
D3DXMeshIntersect(...);
 
??? thanx in advance
KaMiKaZe

Share this post


Link to post
Share on other sites
Advertisement
I don''t really understand the question, it looks exactly the same except for the 2.0 in place of the 1.0???


pan narrans | My Website | Study + Hard Work + Loud Profanity = Good Code

Share this post


Link to post
Share on other sites
Yes, that''s exacly my question, will the 1st example give exacly the same
results as the 2nd one ?


KaMiKaZe

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The two have the same effect. Since its a "ray", it doesn''t really have an end, just a position and direction. The function however returns the distance to the hit, so I believe if you use that you could effectively check for a line intersection, if that''s what you want.

My question is this: I am also getting an intersection on a triangle, but I need to calculate the texture coordinate for the hit on it. I can figure out where it lies on the plane, but how do I interpolate the three texture coordinates for the hit coordinate?

Thanks.

Share this post


Link to post
Share on other sites

  • Advertisement