vault backup: 2023-11-08 20:52:37
This commit is contained in:
parent
df1082fbf3
commit
a6868a3294
@ -60,6 +60,23 @@ $$p \rightarrow q\cdot p \cdot q^-1$$
|
||||
|
||||
## 四元数规范化
|
||||
$$x^2 + y^2 + z^2 =1$$
|
||||
|
||||
## 四元数求反
|
||||
```c++
|
||||
inline QQuaternion QQuaternion::inverted() const
|
||||
{
|
||||
// Need some extra precision if the length is very small.
|
||||
double len = double(wp) * double(wp) +
|
||||
double(xp) * double(xp) +
|
||||
double(yp) * double(yp) +
|
||||
double(zp) * double(zp);
|
||||
if (!qFuzzyIsNull(len))
|
||||
return QQuaternion(float(double(wp) / len), float(double(-xp) / len),
|
||||
float(double(-yp) / len), float(double(-zp) / len));
|
||||
return QQuaternion(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
```
|
||||
|
||||
# FBX
|
||||
四元数旋转顺序 xyz
|
||||
可以使用
|
||||
|
Loading…
x
Reference in New Issue
Block a user