(image: Image)
| 29 | * Converts from world-to-camera (qvec, tvec) to camera position in world space. |
| 30 | */ |
| 31 | export function getImageWorldPosition(image: Image): THREE.Vector3 { |
| 32 | const quat = getImageWorldQuaternion(image); |
| 33 | const t = new THREE.Vector3(image.tvec[0], image.tvec[1], image.tvec[2]); |
| 34 | return t.negate().applyQuaternion(quat); |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * Get both world position and quaternion for an image. |
no test coverage detected