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