格式
typescript
Quaternion.ToAxis(ref_xaxis, ref_yaxis, ref_zaxis)所属类: Quaternion
描述
通过参数返回四元数转换的三个轴向量。
三个参数返回值依次为:x轴向量,y轴向量,z轴向量。
参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| ref_xaxis | Vector3 | x轴向量 |
| ref_yaxis | Vector3 | y轴向量 |
| ref_zaxis | Vector3 | z轴向量 |
返回值
| 类型 | 描述 |
|---|---|
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);
}