| 285 | } |
| 286 | |
| 287 | void AssimpAppNode::convertMat(MatrixF& outMat) |
| 288 | { |
| 289 | MatrixF rot(true); |
| 290 | |
| 291 | switch (ColladaUtils::getOptions().upAxis) |
| 292 | { |
| 293 | case UPAXISTYPE_X_UP: |
| 294 | // rotate 90 around Y-axis, then 90 around Z-axis |
| 295 | rot(0, 0) = 0.0f; rot(1, 0) = 1.0f; |
| 296 | rot(1, 1) = 0.0f; rot(2, 1) = 1.0f; |
| 297 | rot(0, 2) = 1.0f; rot(2, 2) = 0.0f; |
| 298 | |
| 299 | // pre-multiply the transform by the rotation matrix |
| 300 | outMat.mulL(rot); |
| 301 | break; |
| 302 | |
| 303 | case UPAXISTYPE_Y_UP: |
| 304 | // rotate 180 around Y-axis, then 90 around X-axis |
| 305 | rot(0, 0) = -1.0f; |
| 306 | rot(1, 1) = 0.0f; rot(2, 1) = 1.0f; |
| 307 | rot(1, 2) = 1.0f; rot(2, 2) = 0.0f; |
| 308 | |
| 309 | // pre-multiply the transform by the rotation matrix |
| 310 | outMat.mulL(rot); |
| 311 | break; |
| 312 | |
| 313 | case UPAXISTYPE_Z_UP: |
| 314 | default: |
| 315 | // nothing to do |
| 316 | break; |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | aiNode* AssimpAppNode::findChildNodeByName(const char* nodeName, aiNode* rootNode) |
| 321 | { |