所以我定义了这个 Box,它的大小为 (1, 2, 3),我沿所有三个轴旋转 45°:
Transform {
rotation 1 1 1 0.7854
children [
Shape {
appearance Appearance { material Material {} }
geometry Box { size 1 2 3 }
}
]
}
但是当我分别沿每个轴应用相同的旋转时,我得到另一个结果:
Transform {
rotation 0 0 1 0.7854
children [
Transform {
rotation 0 1 0 0.7854
children [
Transform {
rotation 1 0 0 0.7854
children [
Shape {
appearance Appearance { material Material {} }
geometry Box { size 1 2 3 }
}
]
}
]
}
]
}
维基百科告诉我,我可以像这样将所有旋转矩阵相乘:R = R(x)R(y)R(z)?
这是上面代码的结果: