------------------------------
| 1498 | |
| 1499 | //------------------------------ |
| 1500 | void AnimationImporter::connectTransforms ( |
| 1501 | const COLLADAFW::UniqueId& animationListId, |
| 1502 | const COLLADAFW::AnimationList::AnimationBindings& animationBindings ) |
| 1503 | { |
| 1504 | // Get the node, which use this animation list. |
| 1505 | VisualSceneImporter* visualSceneImporter = getDocumentImporter ()->getVisualSceneImporter (); |
| 1506 | const TransformAnimation* transformAnimation = visualSceneImporter->findTransformAnimation ( animationListId ); |
| 1507 | if ( !transformAnimation ) return; |
| 1508 | |
| 1509 | // Get the maya node object for the id. |
| 1510 | const COLLADAFW::UniqueId& transformNodeId = transformAnimation->getAnimationSourceId (); |
| 1511 | const MayaDM::Transform* transform = visualSceneImporter->findMayaDMTransform ( transformNodeId ); |
| 1512 | const MayaTransform::TransformPhase& transformPhase = transformAnimation->getTransformPhase (); |
| 1513 | const bool isJointTransform = transformAnimation->getIsJointTransform (); |
| 1514 | |
| 1515 | const COLLADAFW::Transformation* transformation = transformAnimation->getTransformation (); |
| 1516 | COLLADAFW::Transformation::TransformationType transformType = transformation->getTransformationType (); |
| 1517 | |
| 1518 | // Set the transformation information in depend of the transform type. |
| 1519 | switch ( transformType ) |
| 1520 | { |
| 1521 | case COLLADAFW::Transformation::ROTATE: |
| 1522 | writeRotateConnections ( transformation, transformPhase, isJointTransform, animationBindings, transform ); |
| 1523 | break; |
| 1524 | case COLLADAFW::Transformation::SCALE: |
| 1525 | writeScaleConnections ( transformation, animationBindings, transform ); |
| 1526 | break; |
| 1527 | case COLLADAFW::Transformation::SKEW: |
| 1528 | std::cerr << "Import of animated skew not implemented!" << std::endl; |
| 1529 | // writeSkewConnections ( transformation, animationList, transform ); |
| 1530 | break; |
| 1531 | case COLLADAFW::Transformation::TRANSLATE: |
| 1532 | writeTranslateConnections ( transformation, animationBindings, transform ); |
| 1533 | break; |
| 1534 | default: |
| 1535 | std::cerr << "Animation on transformation not supported!" << std::endl; |
| 1536 | break; |
| 1537 | } |
| 1538 | } |
| 1539 | |
| 1540 | //------------------------------ |
| 1541 | void AnimationImporter::writeRotateConnections ( |
nothing calls this directly
no test coverage detected