#include <osgDB/Input>
#include <osgDB/Output>
+#include <simgear/scene/util/OsgMath.hxx>
+
#include "SGRotateTransform.hxx"
-static void
-set_rotation (osg::Matrix &matrix, double position_rad,
- const SGVec3d ¢er, const SGVec3d &axis)
+void SGRotateTransform::set_rotation (osg::Matrix &matrix, double position_rad,
+ const SGVec3d ¢er,
+ const SGVec3d &axis)
{
double temp_angle = -position_rad;
SGRotateTransform::computeBound() const
{
osg::BoundingSphere bs = osg::Group::computeBound();
- osg::BoundingSphere centerbs(_center.osg(), bs.radius());
+ osg::BoundingSphere centerbs(toOsg(_center), bs.radius());
centerbs.expandBy(bs);
return centerbs;
}
fr += 3;
else
return false;
- rot.setCenter(SGVec3d(center));
+ rot.setCenter(toSG(center));
}
if (fr[0].matchWord("axis")) {
++fr;
fr += 3;
else
return false;
- rot.setCenter(SGVec3d(axis));
+ rot.setCenter(toSG(axis));
}
if (fr[0].matchWord("angle")) {
++fr;