本文整理汇总了TypeScript中THREE.Vector4类的典型用法代码示例。如果您正苦于以下问题:TypeScript Vector4类的具体用法?TypeScript Vector4怎么用?TypeScript Vector4使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Vector4类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: unprojectSfM
public unprojectSfM(pixel: number[], distance: number): number[] {
let bearing: number[] = this._pixelToBearing(pixel);
let v: THREE.Vector4 = new THREE.Vector4(
distance * bearing[0],
distance * bearing[1],
distance * bearing[2],
1);
v.applyMatrix4(new THREE.Matrix4().getInverse(this._rt));
return [v.x / v.w, v.y / v.w, v.z / v.w];
}
示例2: pixelToVertex
public pixelToVertex(x: number, y: number, depth: number): THREE.Vector3 {
let v: THREE.Vector4 = new THREE.Vector4(
x / this._focal * depth,
y / this._focal * depth,
depth,
1);
v.applyMatrix4(new THREE.Matrix4().getInverse(this._rt));
return new THREE.Vector3(v.x / v.w, v.y / v.w, v.z / v.w);
}
示例3: projectSfM
public projectSfM(point: number[]): number[] {
let v: THREE.Vector4 = new THREE.Vector4(point[0], point[1], point[2], 1);
v.applyMatrix4(this._rt);
return this._bearingToPixel([v.x, v.y, v.z]);
}