public MesherTriangle(TriangleNet.Topology.Triangle triangle) { P0 = triangle.GetVertex(0); P1 = triangle.GetVertex(1); P2 = triangle.GetVertex(2); Area = ((P0.X * (P1.Y - P2.Y)) + (P1.X * (P2.Y - P0.Y)) + (P2.X * (P0.Y - P1.Y))) / 2; Xc = (P0.X + P1.X + P2.X) / 3; Yc = (P0.Y + P1.Y + P2.Y) / 3; }
public PathNode(TriangleNet.Geometry.Point p) : this(p.getPoint()) { }
public Point(TriangleNet.Geometry.Point point, int xOffset, int yOffset) { this.X = (int)point.X - xOffset; this.Y = (int)point.Y - yOffset; }
public Point(TriangleNet.Geometry.Point point) { this.X = (int)point.X; this.Y = (int)point.Y; }
public static Vector2 VectorFromPoint(TriangleNet.Geometry.Point point) { return(new Vector2((float)point.X, (float)point.Y)); }