コード例 #1
0
        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;
        }
コード例 #2
0
ファイル: PathNode.cs プロジェクト: gronank/MeshPathfinding
 public PathNode(TriangleNet.Geometry.Point p)
     : this(p.getPoint())
 {
 }
コード例 #3
0
 public Point(TriangleNet.Geometry.Point point, int xOffset, int yOffset)
 {
     this.X = (int)point.X - xOffset;
     this.Y = (int)point.Y - yOffset;
 }
コード例 #4
0
 public Point(TriangleNet.Geometry.Point point)
 {
     this.X = (int)point.X;
     this.Y = (int)point.Y;
 }
コード例 #5
0
 public static Vector2 VectorFromPoint(TriangleNet.Geometry.Point point)
 {
     return(new Vector2((float)point.X, (float)point.Y));
 }