“LlAxes2Rot”的版本间的差异
(创建页面,内容为“{{LSL Header|ml=*}}{{LSLC|Keywords}}{{LSLC|Flow Control}}{{LSLC|}} {{函数详情 |函数名=Function: rotation llAxes2Rot( vector fwd, vector left, vector up );…”) |
(没有差异)
|
2020年5月18日 (一) 10:12的版本
首页 | 函数 | 事件 | 类型 | 操作符 | 常数 | Flow Control | Script Library | Categorized Library | Tutorials |
函数名 |
---|
Function: rotation llAxes2Rot( vector fwd, vector left, vector up ); |
返回由3个坐标轴定义的旋转 |
•矢量fwd
•矢量左 •矢量向上 这三个向量必须是相互正交的单位向量。 |
注意事项 |
---|
Search JIRA for related Bugs |
示例 |
---|
default { state_entry() { vector i = < 1.0, 0.0, 0.0>; vector j = < 0.0, 1.0, 0.0>; vector k = < 0.0, 0.0, 1.0>; rotation rot = llAxes2Rot( j, -i, k ); llSay(0, (string) (llRot2Euler(rot) * RAD_TO_DEG) ); } } This script displays: Object: <-0.00000, 0.00000, 90.00000> which shows that (j, -i, k) is obtained by rotating (i, j, k) 90 degrees around z direction. |
相关函数 |
---|
无 |
相关事件 |
---|
Notes
Technically, only the first two vectors are needed to define this rotation, which can be done by calling any of these: llAxes2Rot(fwd, left, fwd % left); llAxes2Rot(left % up, left, up); llAxes2Rot(fwd, up % fwd, up); |