Exemple #1
0
 public Vec3f Apply(Vec3f v)
 {
     return(new Vec3f(matrix[0, 0] * v.x + matrix[0, 1] * v.y + matrix[0, 2] * v.z, matrix[1, 0] * v.x + matrix[1, 1] * v.y + matrix[1, 2] * v.z, matrix[2, 0] * v.x + matrix[2, 1] * v.y + matrix[2, 2] * v.z));
 }
Exemple #2
0
 public static Vec3f Cross(Vec3f a, Vec3f b)
 {
     return(new Vec3f(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x));
 }
Exemple #3
0
 public static float Dot(Vec3f a, Vec3f b)
 {
     return(a.x * b.x + a.y * b.y + a.z * b.z);
 }
Exemple #4
0
 public Vec3f Cross(Vec3f other)
 {
     return(Cross(this, other));
 }
Exemple #5
0
 public float Dot(Vec3f other)
 {
     return(Dot(this, other));
 }