| 157 | void setEulerXYZ(const TVec3f &rSrc); |
| 158 | |
| 159 | void setEulerXYZ(f32 x, f32 y, f32 z) { // fabricated? might actually exist |
| 160 | f32 cr = std::cosf(x); // f26 |
| 161 | f32 cp = std::cosf(y); // f31 |
| 162 | f32 cy = std::cosf(z); // f30 |
| 163 | f32 sr = std::sinf(x); // f29 |
| 164 | f32 sp = std::sinf(y); // f28 |
| 165 | f32 sy = std::sinf(z); // f7 |
| 166 | |
| 167 | // ??? |
| 168 | f32 tmp = sy * sp; |
| 169 | f32 cpy = (cy * cp); |
| 170 | f32 spy = sp * sy; |
| 171 | |
| 172 | this->ref(0, 0) = ((tmp) * sr + (cp * cr)); |
| 173 | this->ref(1, 0) = (sr * cy); |
| 174 | this->ref(2, 0) = -(sp * cr) + (sy * cp * sr); |
| 175 | |
| 176 | this->ref(0, 1) = ((-sr * cp) + (spy) * cr); |
| 177 | this->ref(1, 1) = (cy * cr); |
| 178 | this->ref(2, 1) = (sp * sr + sy * (cp * cr)); |
| 179 | |
| 180 | this->ref(0, 2) = (cy * sp); |
| 181 | this->ref(1, 2) = (-sy); |
| 182 | this->ref(2, 2) = (cpy); |
| 183 | } |
| 184 | |
| 185 | void getQuat(TQuat4f &rDest) const { // Non matching |
| 186 | f32 z,y,x; |