Example #1
0
 public static XVector3 Cross(XVector3 v1, XVector3 v2)
 {
     return(new XVector3(
                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 #2
0
 public static XVector3 Cross(XVector3 v1, XVector3 v2)
 {
     return new XVector3(
         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 #3
0
 public static XVector3 Transform(ref XVector3 pos, ref XMatrix t)
 {
     return(new XVector3(
                pos.X * t.M11 + pos.Y * t.M21 + pos.Z * t.M31 + t.M41,
                pos.X * t.M12 + pos.Y * t.M22 + pos.Z * t.M32 + t.M42,
                pos.X * t.M13 + pos.Y * t.M23 + pos.Z * t.M33 + t.M43
                ));
 }
Example #4
0
 public static XVector3 TransformNormal(ref XVector3 pos, ref XMatrix t)
 {
     return(new XVector3(
                pos.X * t.M11 + pos.Y * t.M21 + pos.Z * t.M31,
                pos.X * t.M12 + pos.Y * t.M22 + pos.Z * t.M32,
                pos.X * t.M13 + pos.Y * t.M23 + pos.Z * t.M33
                ));
 }
Example #5
0
 public static XReal Dot(XVector3 v1, XVector3 v2)
 {
     return v1.X * v2.X + v1.Y * v2.Y + v1.Z * v2.Z;
 }
Example #6
0
 public static XReal DistanceSquared(XVector3 v1, XVector3 v2)
 {
     return (v1 - v2).LengthSquared;
 }
Example #7
0
 public static XReal Distance(XVector3 v1, XVector3 v2)
 {
     return (v1 - v2).Length;
 }
Example #8
0
 public static XVector3 TransformNormal(ref XVector3 pos, ref XMatrix t)
 {
     return new XVector3(
         pos.X * t.M11 + pos.Y * t.M21 + pos.Z * t.M31,
         pos.X * t.M12 + pos.Y * t.M22 + pos.Z * t.M32,
         pos.X * t.M13 + pos.Y * t.M23 + pos.Z * t.M33
     );
 }
Example #9
0
 public static XVector3 TransformNormal(XVector3 pos, XMatrix t)
 {
     return TransformNormal(ref pos, ref t);
 }
Example #10
0
 public static XVector3 Transform(ref XVector3 pos, ref XMatrix t)
 {
     return new XVector3(
         pos.X * t.M11 + pos.Y * t.M21 + pos.Z * t.M31 + t.M41,
         pos.X * t.M12 + pos.Y * t.M22 + pos.Z * t.M32 + t.M42,
         pos.X * t.M13 + pos.Y * t.M23 + pos.Z * t.M33 + t.M43
     );
 }
Example #11
0
 public static XVector3 Transform(XVector3 pos, XMatrix t)
 {
     return(Transform(ref pos, ref t));
 }
Example #12
0
 public static XReal Distance(XVector3 v1, XVector3 v2)
 {
     return((v1 - v2).Length);
 }
Example #13
0
 public static XReal DistanceSquared(XVector3 v1, XVector3 v2)
 {
     return((v1 - v2).LengthSquared);
 }
Example #14
0
 public static XReal Dot(XVector3 v1, XVector3 v2)
 {
     return(v1.X * v2.X + v1.Y * v2.Y + v1.Z * v2.Z);
 }