Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit ca4a27dc authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

further optimization in triangle::isinside

parent 5b9ef948
No related branches found
No related tags found
No related merge requests found
......@@ -230,14 +230,14 @@ namespace TUGraz.VectoCore.Utils
//Contract.Requires(P3 != null);
//Barycentric Technique: http://www.blackpawn.com/texts/pointinpoly/default.html
var p = new Point(x, y, 0);
//var p = new Point(x, y, 0);
var v0X = P3.X - P1.X;
var v0Y = P3.Y - P1.Y;
var v1X = P2.X - P1.X;
var v1Y = P2.Y - P1.Y;
var v2X = p.X - P1.X;
var v2Y = p.Y - P1.Y;
var v2X = x - P1.X;
var v2Y = y - P1.Y;
var dot00 = v0X * v0X + v0Y * v0Y;
var dot01 = v0X * v1X + v0Y * v1Y;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment