本文整理汇总了TypeScript中THREE.Vector4.applyMatrix4方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Vector4.applyMatrix4方法的具体用法?TypeScript Vector4.applyMatrix4怎么用?TypeScript Vector4.applyMatrix4使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类THREE.Vector4
的用法示例。
在下文中一共展示了Vector4.applyMatrix4方法的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]);
}