From Panagiotis Koutsourakis, "We are using Open Scene Graph for an application and we need COLLADA
support. While testing the pluggin we found a small bug and we are submitting a patch. The first attachment is a small program that creates a scene with two pyramids, transformed by two instances of osg::PositionAttitudeTransform. One of them is rotated 90 degrees in the X axis, and the scene is exported both in the native OSG (.osg) and COLLADA (.dae) formats. In the first case the rotated pyramid is displayed correctly whereas in the second the pyramid seems not to be rotated. In the COLLADA 1.4.1 specification (found at http://www.khronos.org/collada/) it is specified that "The <rotate> element contains a list of four floating-point values [...] followed by an angle in degrees" but the plugin seems to write the value in radians. The problem seems to be in the method daeWriter::apply() that seems to be writing the angle value in radians to the COLLADA file. The patch can be found in the second attachment and is simply a call to RadiansToDegrees wrapped around the angle. "
This commit is contained in:
parent
fd5f9741d3
commit
f4f6aa288d
@ -105,7 +105,7 @@ void daeWriter::apply( osg::PositionAttitudeTransform &node )
|
||||
rot->getValue().append( axis.x() );
|
||||
rot->getValue().append( axis.y() );
|
||||
rot->getValue().append( axis.z() );
|
||||
rot->getValue().append( angle );
|
||||
rot->getValue().append( osg::RadiansToDegrees(angle) );
|
||||
}
|
||||
|
||||
if ( pos.x() != 0 || pos.y() != 0 || pos.z() != 0 )
|
||||
|
Loading…
Reference in New Issue
Block a user