Пример #1
0
        public Vec3 TransformInversed(RigidTransform3 transform)
        {
            transform.rotation = transform.rotation.Conjugate();
            Vec3 result = this.Transform(transform.rotation);

            return(result);
        }
        public RigidTransform3 Invert(ref RigidTransform3 transform)
        {
            RigidTransform3 result;

            result.rotation = transform.rotation.Conjugate();
            result.position = transform.position.Transform(result.rotation);
            return(result);
        }
        public RigidTransform3 Transform(RigidTransform3 transform1, RigidTransform3 transform2)
        {
            RigidTransform3 result;

            result.position  = transform1.position.Transform(transform2.rotation);
            result.position += transform2.position;
            result.rotation  = transform1.rotation.Concatenate(transform2.rotation);
            return(result);
        }
Пример #4
0
 public Vec3 Transform(RigidTransform3 transform)
 {
     return(this.Transform(transform.rotation) + transform.position);
 }
Пример #5
0
 public static Mat4 FromRigidTransform(RigidTransform3 transform)
 {
     return(Mat4.FromAffineTransform(Mat3.FromQuaternion(transform.rotation), transform.position));
 }