예제 #1
0
 public static void FromScale(Vec3 scale, out Mat3 result)
 {
     result.x = new Vec3(scale.x, 0, 0);
     result.y = new Vec3(0, scale.y, 0);
     result.z = new Vec3(0, 0, scale.z);
 }
예제 #2
0
 public Vec3 Transform(Mat3 matrix)
 {
     return((matrix.x * x) + (matrix.y * y) + (matrix.z * z));
 }
예제 #3
0
 public static void FromScale(float scale, out Mat3 result)
 {
     result.x = new Vec3(scale, 0, 0);
     result.y = new Vec3(0, scale, 0);
     result.z = new Vec3(0, 0, scale);
 }
예제 #4
0
 public static Mat4 FromRigidTransform(RigidTransform3 transform)
 {
     return(Mat4.FromAffineTransform(Mat3.FromQuaternion(transform.rotation), transform.position));
 }