SFML community forums

Help => General => Topic started by: Cyraxx on May 17, 2014, 02:20:59 pm

Title: Right angle triangle
Post by: Cyraxx on May 17, 2014, 02:20:59 pm
Hello!

I was wondering if there is a way to check intersection between a right angle triangle and a point or an other shape.
(or even a rectangle with 45° rotation)
Title: Re: Right angle triangle
Post by: Nexus on May 17, 2014, 03:32:54 pm
Yes -- it strongly depends on the shape.

I suggest having a look at the Boost.Geometry library, it has this kind of functionality already implemented.
Title: Re: Right angle triangle
Post by: Jesper Juhl on May 17, 2014, 03:34:43 pm
You should read up om basic trigonometry to help you answer those question.

Also take a look at this:
http://www.blackpawn.com/texts/pointinpoly/default.html