How to test if inside a triangle

Blitz3D Forums/Blitz3D Beginners Area/How to test if inside a triangle

JBR(Posted 2005) [#1]
Hello, not strictly 3d but using B3D

I have a rotating triangle and want to test if a point is inside it. triangle has 3 x,y coordinates and the point has 1 x,y.

Is there an easy way to do it; maybe with normal vectors?

Marg


Ross C(Posted 2005) [#2]
There's something like this in the code archives. I can't recall whereabouts, but it definetly is in there somewhere...


Ross C(Posted 2005) [#3]
Found this:

http://www.blitzbasic.com/codearcs/codearcs.php?code=45

and this

http://www.blitzbasic.com/codearcs/codearcs.php?code=483

Hope that helps some :o)


JBR(Posted 2005) [#4]
Thanks Ross
Marg