Show
Ignore:
Timestamp:
01/09/09 13:21:36 (20 months ago)
Author:
robert
Message:

From Roland Smeenk, "Attached is a fix for the Collada plugin. A PositionAttitudeTransform? wrote its place elements in the wrong order."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/dae/daeWTransforms.cpp

    r9228 r9476  
    9191    const osg::Vec3 &s = node.getScale(); 
    9292 
    93     if ( s.x() != 1 || s.y() != 1 || s.z() != 1 ) 
    94     { 
    95         //make a scale 
    96         domScale *scale = daeSafeCast< domScale >( currentNode->add( COLLADA_ELEMENT_SCALE ) ); 
    97         scale->getValue().append( s.x() ); 
    98         scale->getValue().append( s.y() ); 
    99         scale->getValue().append( s.z() ); 
     93    if ( pos.x() != 0 || pos.y() != 0 || pos.z() != 0 ) 
     94    { 
     95        //make a translate 
     96        domTranslate *trans = daeSafeCast< domTranslate >( currentNode->add( COLLADA_ELEMENT_TRANSLATE ) ); 
     97        trans->getValue().append( pos.x() ); 
     98        trans->getValue().append( pos.y() ); 
     99        trans->getValue().append( pos.z() ); 
    100100    } 
    101101 
     
    113113    } 
    114114 
    115     if ( pos.x() != 0 || pos.y() != 0 || pos.z() != 0 ) 
    116     { 
    117         //make a translate 
    118         domTranslate *trans = daeSafeCast< domTranslate >( currentNode->add( COLLADA_ELEMENT_TRANSLATE ) ); 
    119         trans->getValue().append( pos.x() ); 
    120         trans->getValue().append( pos.y() ); 
    121         trans->getValue().append( pos.z() ); 
     115    if ( s.x() != 1 || s.y() != 1 || s.z() != 1 ) 
     116    { 
     117        //make a scale 
     118        domScale *scale = daeSafeCast< domScale >( currentNode->add( COLLADA_ELEMENT_SCALE ) ); 
     119        scale->getValue().append( s.x() ); 
     120        scale->getValue().append( s.y() ); 
     121        scale->getValue().append( s.z() ); 
    122122    } 
    123123