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

            return(PathTo(v));
        }
Example #2
0
 public FVec3(FVec3 v)
 {
     this.x = v.x;
     this.y = v.y;
     this.z = v.z;
 }
Example #3
0
 public static bool IsNan(FVec3 value)
 {
     return(float.IsNaN(value.x) || float.IsNaN(value.y) || float.IsNaN(value.z));
 }
Example #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));
 }
Example #5
0
 public static float Distance(FVec3 A, FVec3 B)
 {
     return(A.GetDistanceTo(B));
 }
Example #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));
 }
Example #7
0
 public void Assign(FVec3 vect3)
 {
     this.x = vect3.x;
     this.y = vect3.y;
     this.z = vect3.z;
 }
Example #8
0
 public static float DotProduct(FVec3 v1, FVec3 v2)
 {
     return(v1.x * v2.x + v1.y * v2.y + v1.z * v2.z);
 }
Example #9
0
 public float DotProduct(FVec3 v2)
 {
     return(x * v2.x + y * v2.y + z * v2.z);
 }
Example #10
0
 public void Minus(FVec3 v1)
 {
     this.x -= v1.x;
     this.y -= v1.y;
     this.z -= v1.z;
 }
Example #11
0
 public void Plus(FVec3 v1)
 {
     this.x += v1.x;
     this.y += v1.y;
     this.z += v1.z;
 }
Example #12
0
 public bool Contains(FVec3 pt)
 {
     return(Contains(pt.x, pt.z));
 }