Esempio n. 1
0
 public AffineTransform3(Vec3 translation)
 {
     Transform   = Mat3.identity;
     Translation = translation;
 }
Esempio n. 2
0
 public AffineTransform3(Quat orientation, Vec3 scale, Vec3 translation)
 {
     Transform   = Mat3.FromQuaternion(orientation) * scale;
     Translation = translation;
 }
Esempio n. 3
0
 public Vec3 Transform(Mat3 matrix)
 {
     return((matrix.x * x) + (matrix.y * y) + (matrix.z * z));
 }
Esempio n. 4
0
 public AffineTransform3(Mat3 transform, Vec3 translation)
 {
     Transform   = transform;
     Translation = translation;
 }
Esempio n. 5
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);
 }
Esempio n. 6
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);
 }
Esempio n. 7
0
        public static Quat FromCrossPreNormalized(Vec3 forward, Vec3 up)
        {
            Mat3 mat = Mat3.FromCrossPreNormalized(forward, up);

            return(FromMatrix3(mat));
        }
Esempio n. 8
0
 public Line3 Transform(Mat3 matrix)
 {
     return(new Line3(point1.Transform(matrix), point2.Transform(matrix)));
 }
Esempio n. 9
0
 public static Mat4 FromRigidTransform(RigidTransform3 transform)
 {
     return(Mat4.FromAffineTransform(Mat3.FromQuaternion(transform.rotation), transform.position));
 }