MCPcopy Index your code
hub / github.com/ColmapView/Colmapview.github.io / createSim3dFromEuler

Function createSim3dFromEuler

src/utils/sim3dTransforms.ts:45–55  ·  view source on GitHub ↗
(euler: Sim3dEuler)

Source from the content-addressed store, hash-verified

43 * Euler angles are applied in XYZ order.
44 */
45export function createSim3dFromEuler(euler: Sim3dEuler): Sim3d {
46 const rotation = new THREE.Quaternion();
47 const eulerObj = new THREE.Euler(euler.rotationX, euler.rotationY, euler.rotationZ, 'XYZ');
48 rotation.setFromEuler(eulerObj);
49
50 return {
51 scale: euler.scale,
52 rotation,
53 translation: new THREE.Vector3(euler.translationX, euler.translationY, euler.translationZ),
54 };
55}
56
57/**
58 * Convert Sim3d to Euler angle representation.

Callers 15

applyEulerTransformFunction · 0.90
getSplatModelTransformFunction · 0.90
Scene3DE2EProbeFunction · 0.90
SceneContentFunction · 0.90
getImageFlyToPoseFunction · 0.90
ExportPanel.tsxFile · 0.90

Calls

no outgoing calls

Tested by 1

applyEulerTransformFunction · 0.72