(image: Image)
| 39 | * More efficient when you need both values. |
| 40 | */ |
| 41 | export function getImageWorldPose(image: Image): { position: THREE.Vector3; quaternion: THREE.Quaternion } { |
| 42 | const quaternion = getImageWorldQuaternion(image); |
| 43 | const t = new THREE.Vector3(image.tvec[0], image.tvec[1], image.tvec[2]); |
| 44 | const position = t.negate().applyQuaternion(quaternion); |
| 45 | return { position, quaternion }; |
| 46 | } |