MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / computeOriginTranslation

Function computeOriginTranslation

src/utils/sim3dAlignment.ts:43–49  ·  view source on GitHub ↗
(point: THREE.Vector3)

Source from the content-addressed store, hash-verified

41 * Compute translation transform to move a point to the world origin.
42 */
43export 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.

Callers 3

align_save.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected