diff --git a/src/osgPlugins/Inventor/ConvertFromInventor.cpp b/src/osgPlugins/Inventor/ConvertFromInventor.cpp index 547801694..444ce24a7 100644 --- a/src/osgPlugins/Inventor/ConvertFromInventor.cpp +++ b/src/osgPlugins/Inventor/ConvertFromInventor.cpp @@ -402,7 +402,7 @@ ConvertFromInventor::preLight(void* data, SoCallbackAction* action, SoSpotLight* spotLight = (SoSpotLight *) node; osgLight->setSpotExponent(spotLight->dropOffRate.getValue() * 128.0); - osgLight->setSpotCutoff(spotLight->cutOffAngle.getValue()*180.0/M_PI); + osgLight->setSpotCutoff(spotLight->cutOffAngle.getValue()*180.0/osg::PI); osg::Vec3 transVec; thisPtr->transformLight(action, spotLight->location.getValue(), transVec); @@ -764,7 +764,7 @@ ConvertFromInventor::preRotor(void* data, SoCallbackAction *, osg::Vec3 axis(ivAxis[0], ivAxis[1], ivAxis[2]); osgUtil::TransformCallback* rotorCallback = new osgUtil::TransformCallback(pivot, axis, - 2 * M_PI * ivRotor->speed.getValue()); + 2 * osg::PI * ivRotor->speed.getValue()); // Set the app callback rotorTransform->setUpdateCallback(rotorCallback); diff --git a/src/osgPlugins/Inventor/PendulumCallback.cpp b/src/osgPlugins/Inventor/PendulumCallback.cpp index c637ce6f9..0b3e6d493 100644 --- a/src/osgPlugins/Inventor/PendulumCallback.cpp +++ b/src/osgPlugins/Inventor/PendulumCallback.cpp @@ -35,10 +35,10 @@ void PendulumCallback::operator() (osg::Node* node, osg::NodeVisitor* nv) if (nv->getTraversalNumber()!=_previousTraversalNumber) { double currentTime = fs->getReferenceTime(); - _angle += (currentTime - _previousTime) * 2 * M_PI * _frequency; + _angle += (currentTime - _previousTime) * 2 * osg::PI * _frequency; double frac = 0.5 + 0.5 * sin(_angle); - double rotAngle = _endAngle - _startAngle - M_PI + double rotAngle = _endAngle - _startAngle - osg::PI + (1.0 - frac) * _startAngle + frac * _endAngle; // update the specified transform diff --git a/src/osgPlugins/Inventor/ShuttleCallback.cpp b/src/osgPlugins/Inventor/ShuttleCallback.cpp index 0dc4a4eb1..3e8564841 100644 --- a/src/osgPlugins/Inventor/ShuttleCallback.cpp +++ b/src/osgPlugins/Inventor/ShuttleCallback.cpp @@ -34,7 +34,7 @@ void ShuttleCallback::operator() (osg::Node* node, osg::NodeVisitor* nv) if (nv->getTraversalNumber()!=_previousTraversalNumber) { double currentTime = fs->getReferenceTime(); - _angle += (currentTime - _previousTime) * 2 * M_PI * _frequency; + _angle += (currentTime - _previousTime) * 2 * osg::PI * _frequency; double frac = 0.5 + 0.5 * sin(_angle);