Exemplo n.º 1
0
 public static Vertex3 Normalize(Vertex3 a)
 {
     return((1.0f / MathF.Sqrt(Dot(a, a))) * a);
 }
Exemplo n.º 2
0
 public static Vertex3 Cross(Vertex3 a, Vertex3 b)
 {
     return(new Vertex3(a.Y * b.Z - a.Z * b.Y,
                        a.Z * b.X - a.X * b.Z,
                        a.X * b.Y - a.Y * b.X));
 }
Exemplo n.º 3
0
 public static float Dot(Vertex3 a, Vertex3 b)
 {
     return(a.X * b.X + a.Y * b.Y + a.Z * b.Z);
 }