Skip to content

格式

typescript
Quaternion.ToAxis(ref_xaxis, ref_yaxis, ref_zaxis)

所属类: Quaternion

描述

通过参数返回四元数转换的三个轴向量。

三个参数返回值依次为:x轴向量,y轴向量,z轴向量。

参数

参数名类型描述
ref_xaxisVector3x轴向量
ref_yaxisVector3y轴向量
ref_zaxisVector3z轴向量

返回值

类型描述
void

代码示例

typescript
function QuaternionTest (){
    let value = new Quaternion(1, 2, 3, 4).normalized;
    let x_axis: Vector3 = new Vector3();
    let y_axis: Vector3 = new Vector3();
    let z_axis: Vector3 = new Vector3();
    value.ToAxis(x_axis, y_axis, z_axis);
}