示例#1
0
        public IEnumerable <DirectedWeightedEdge> PathTo(FVec3 position)
        {
            int v = world.GetVertex(position.ToFVec2());

            return(PathTo(v));
        }
示例#2
0
 public FVec3(FVec3 v)
 {
     this.x = v.x;
     this.y = v.y;
     this.z = v.z;
 }
示例#3
0
 public static bool IsNan(FVec3 value)
 {
     return(float.IsNaN(value.x) || float.IsNaN(value.y) || float.IsNaN(value.z));
 }
示例#4
0
 public static float MahattanDist(FVec3 A, FVec3 B)
 {
     return(Math.Abs(A.x - B.x) + Math.Abs(A.y - B.y) + Math.Abs(A.z - B.z));
 }
示例#5
0
 public static float Distance(FVec3 A, FVec3 B)
 {
     return(A.GetDistanceTo(B));
 }
示例#6
0
 public static FVec3 CrossProduct(FVec3 v1, FVec3 v2)
 {
     return(new FVec3(v1.y * v2.z - v1.z * v2.y,
                      v1.z * v2.x - v1.x * v2.z,
                      v1.x * v2.y - v1.y * v2.x));
 }
示例#7
0
 public void Assign(FVec3 vect3)
 {
     this.x = vect3.x;
     this.y = vect3.y;
     this.z = vect3.z;
 }
示例#8
0
 public static float DotProduct(FVec3 v1, FVec3 v2)
 {
     return(v1.x * v2.x + v1.y * v2.y + v1.z * v2.z);
 }
示例#9
0
 public float DotProduct(FVec3 v2)
 {
     return(x * v2.x + y * v2.y + z * v2.z);
 }
示例#10
0
 public void Minus(FVec3 v1)
 {
     this.x -= v1.x;
     this.y -= v1.y;
     this.z -= v1.z;
 }
示例#11
0
 public void Plus(FVec3 v1)
 {
     this.x += v1.x;
     this.y += v1.y;
     this.z += v1.z;
 }
示例#12
0
 public bool Contains(FVec3 pt)
 {
     return(Contains(pt.x, pt.z));
 }