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