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

Function triangleNormal

src/utils/sim3dAlignment.test.ts:19–28  ·  view source on GitHub ↗
(
  p1: THREE.Vector3,
  p2: THREE.Vector3,
  p3: THREE.Vector3
)

Source from the content-addressed store, hash-verified

17}
18
19function triangleNormal(
20 p1: THREE.Vector3,
21 p2: THREE.Vector3,
22 p3: THREE.Vector3
23): THREE.Vector3 {
24 return new THREE.Vector3()
25 .subVectors(p2, p1)
26 .cross(new THREE.Vector3().subVectors(p3, p1))
27 .normalize();
28}
29
30function expectIdentity(sim3d: Sim3d): void {
31 expect(sim3d.scale).toBe(1);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected