跳到主要内容

KQuaternion.setFromUnitVectors() method

从一个向量到另外一个向量的旋转变化形式,转化成四元数表示形式,并设置到自己的数据成员。

Sets this quaternion to the rotation required to rotate direction vector vFrom to direction vector vTo.

Signature:

setFromUnitVectors(vFrom: KVector3d, vTo: KVector3d): void;

Links: setFromUnitVectors(vFrom: KVector3d, vTo: KVector3d): void;

Parameters

Parameter

Type

Description

vFrom

KVector3d

输入被旋转的向量。

The input vector to be rotated.

vTo

KVector3d

输入旋转后的向量。

The input vector after rotation.

Returns:

void