mirror of
https://github.com/mapillary/mapillary-js.git
synced 2026-01-18 13:56:53 +00:00
14 lines
413 B
TypeScript
14 lines
413 B
TypeScript
import * as THREE from "three";
|
|
import { Spatial } from "../../src/geo/Spatial";
|
|
|
|
export class GeoHelper {
|
|
private spatial: Spatial = new Spatial();
|
|
|
|
public getTranslation(r: number[], C: number[]): number[] {
|
|
let R: THREE.Matrix4 = this.spatial.rotationMatrix(r);
|
|
let t: number[] = new THREE.Vector3().fromArray(C).applyMatrix4(R).multiplyScalar(-1).toArray();
|
|
|
|
return t;
|
|
}
|
|
}
|