Jump to content
  • Advertisement
Sign in to follow this  
jimgeagea

Box-Triangle

This topic is 4574 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, i am looking for algorithms that finds the intersection points between a filled box and filled triangle. the box is not axis alligned. i would appreciate if u can post here all what you can find. Regards

Share this post


Link to post
Share on other sites
Advertisement
You could do this with a triangle/triangle intersection method. Represent the box as 6 rectangular sides. Represent each rectangle by 2 triangles. That gives 12 triangles for the box. Can be anywhere in space and doesn't have to be axis-aligned. Then, compute the intersection between the one separate triangle and each of the 12 box triangles. The problem of triangle/triangle intersection is well documented, for example here:

A Fast Triangle-Triangle Intersection Test - by Tomas Moller

Alternatively, David Eberly may have some useful, more specialized (box specific) test here:

Geometric Tools' Intersection Test Code and Docs

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!