From dc007113377c8012cf83274cf70ad5fd54a09d54 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 5 Jun 2002 14:14:32 +0000 Subject: [PATCH] Fixed compile problems under VisualStudio6.0 --- include/osgParticle/range | 7 ++++++- src/osgParticle/ParticleProcessor.cpp | 5 ++++- src/osgParticle/ParticleSystemUpdater.cpp | 4 +++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/include/osgParticle/range b/include/osgParticle/range index d3bc93a4c..fdff4f27a 100644 --- a/include/osgParticle/range +++ b/include/osgParticle/range @@ -6,12 +6,17 @@ #ifndef OSGPARTICLE_RANGE_ #define OSGPARTICLE_RANGE_ 1 +// include Export simply to disable Visual Studio silly warnings. +#include + #include #include #include #include +//using std::rand; + namespace osgParticle { @@ -43,7 +48,7 @@ namespace osgParticle /// Get a random value between min and max. T_ get_random() const { - return min + (max - min) * std::rand() / RAND_MAX; + return min + (max - min) * rand() / RAND_MAX; } }; diff --git a/src/osgParticle/ParticleProcessor.cpp b/src/osgParticle/ParticleProcessor.cpp index bed8184d5..f8e24817f 100644 --- a/src/osgParticle/ParticleProcessor.cpp +++ b/src/osgParticle/ParticleProcessor.cpp @@ -8,6 +8,9 @@ #include + +using namespace osg; + osgParticle::ParticleProcessor::ParticleProcessor() : osg::Node(), rf_(RELATIVE_TO_PARENTS), @@ -71,5 +74,5 @@ void osgParticle::ParticleProcessor::traverse(osg::NodeVisitor &nv) } // call the inherited method - osg::Node::traverse(nv); + Node::traverse(nv); } diff --git a/src/osgParticle/ParticleSystemUpdater.cpp b/src/osgParticle/ParticleSystemUpdater.cpp index 85cb96bff..96bd8a875 100644 --- a/src/osgParticle/ParticleSystemUpdater.cpp +++ b/src/osgParticle/ParticleSystemUpdater.cpp @@ -3,6 +3,8 @@ #include #include +using namespace osg; + osgParticle::ParticleSystemUpdater::ParticleSystemUpdater() : osg::Node(), t0_(-1) { @@ -33,5 +35,5 @@ void osgParticle::ParticleSystemUpdater::traverse(osg::NodeVisitor &nv) } t0_ = t; } - osg::Node::traverse(nv); + Node::traverse(nv); }