(point: THREE.Vector3)
| 41 | * Compute translation transform to move a point to the world origin. |
| 42 | */ |
| 43 | export function computeOriginTranslation(point: THREE.Vector3): Sim3d { |
| 44 | return { |
| 45 | scale: 1, |
| 46 | rotation: new THREE.Quaternion(), |
| 47 | translation: new THREE.Vector3(-point.x, -point.y, -point.z), |
| 48 | }; |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * Compute rotation transform to align a plane's normal with the target up axis. |
no outgoing calls
no test coverage detected