示例#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);
 }
示例#2
0
 public void SetVector(string name, Vector3f v)
 {
     handle.SetValue(name, new Vector3(v.X, v.Y, v.Z));
 }
示例#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;
 }
示例#4
0
 public Vector3f(Vector3f other)
 {
     X = other.X;
     Y = other.Y;
     Z = other.Z;
 }
示例#5
0
 public Vector3f Set(Vector3f other)
 {
     X = other.X;
     Y = other.Y;
     Z = other.Z;
     return this;
 }
示例#6
0
 public float GetSquaredDistance(Vector3f other)
 {
     return GetSquaredDistance(this, other);
 }
示例#7
0
 public float Dot(Vector3f v)
 {
     return X * v.X + Y * v.Y + Z * v.Z;
 }
示例#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);
 }