Beispiel #1
0
 public static float GetDistance(Vector3f A, Vector3f B)
 {
     float xd = A.X - B.X;
     float yd = A.Y - B.Y;
     float zd = A.Z - B.Z;
     return (float)M.Sqrt(xd * xd + yd * yd + zd * zd);
 }
Beispiel #2
0
 public void SetVector(string name, Vector3f v)
 {
     handle.SetValue(name, new Vector3(v.X, v.Y, v.Z));
 }
Beispiel #3
0
 public static float GetSquaredDistance(Vector3f A, Vector3f B)
 {
     float xd = A.X - B.X;
     float yd = A.Y - B.Y;
     float zd = A.Z - B.Z;
     return xd * xd + yd * yd + zd * zd;
 }
Beispiel #4
0
 public Vector3f(Vector3f other)
 {
     X = other.X;
     Y = other.Y;
     Z = other.Z;
 }
Beispiel #5
0
 public Vector3f Set(Vector3f other)
 {
     X = other.X;
     Y = other.Y;
     Z = other.Z;
     return this;
 }
Beispiel #6
0
 public float GetSquaredDistance(Vector3f other)
 {
     return GetSquaredDistance(this, other);
 }
Beispiel #7
0
 public float Dot(Vector3f v)
 {
     return X * v.X + Y * v.Y + Z * v.Z;
 }
Beispiel #8
0
 public Vector3f Cross(Vector3f v)
 {
     return new Vector3f(Y * v.Z - Z * v.Y, Z * v.X - X * v.Z, X * v.Y - Y * v.X);
 }