示例#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));
 }
示例#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));
 }
示例#3
0
 public static float Dot(Vec3f a, Vec3f b)
 {
     return(a.x * b.x + a.y * b.y + a.z * b.z);
 }
示例#4
0
 public Vec3f Cross(Vec3f other)
 {
     return(Cross(this, other));
 }
示例#5
0
 public float Dot(Vec3f other)
 {
     return(Dot(this, other));
 }