diff --git a/include/osgParticle/Interpolator b/include/osgParticle/Interpolator index 5bed9ec7f..2a3860114 100644 --- a/include/osgParticle/Interpolator +++ b/include/osgParticle/Interpolator @@ -66,7 +66,7 @@ namespace osgParticle template T_ interpolate(float t, const range &r) const { - return interpolate(t, r.min, r.max); + return interpolate(t, r.minimum, r.maximum); } protected: diff --git a/include/osgParticle/RadialShooter b/include/osgParticle/RadialShooter index d851eabf2..ce02297fe 100644 --- a/include/osgParticle/RadialShooter +++ b/include/osgParticle/RadialShooter @@ -111,8 +111,8 @@ namespace osgParticle inline void RadialShooter::setThetaRange(float r1, float r2) { - theta_range_.min = r1; - theta_range_.max = r2; + theta_range_.minimum = r1; + theta_range_.maximum = r2; } inline void RadialShooter::setPhiRange(const rangef &r) @@ -122,8 +122,8 @@ namespace osgParticle inline void RadialShooter::setPhiRange(float r1, float r2) { - phi_range_.min = r1; - phi_range_.max = r2; + phi_range_.minimum = r1; + phi_range_.maximum = r2; } inline void RadialShooter::setInitialSpeedRange(const rangef &r) @@ -133,8 +133,8 @@ namespace osgParticle inline void RadialShooter::setInitialSpeedRange(float r1, float r2) { - speed_range_.min = r1; - speed_range_.max = r2; + speed_range_.minimum = r1; + speed_range_.maximum = r2; } inline void RadialShooter::shoot(Particle *P) const diff --git a/include/osgParticle/SectorPlacer b/include/osgParticle/SectorPlacer index 5f7e57383..896ea2187 100644 --- a/include/osgParticle/SectorPlacer +++ b/include/osgParticle/SectorPlacer @@ -90,8 +90,8 @@ namespace osgParticle inline void SectorPlacer::setRadiusRange(float r1, float r2) { - rad_range_.min = r1; - rad_range_.max = r2; + rad_range_.minimum = r1; + rad_range_.maximum = r2; } inline void SectorPlacer::setPhiRange(const rangef &r) @@ -101,8 +101,8 @@ namespace osgParticle inline void SectorPlacer::setPhiRange(float r1, float r2) { - phi_range_.min = r1; - phi_range_.max = r2; + phi_range_.minimum = r1; + phi_range_.maximum = r2; } inline void SectorPlacer::place(Particle *P) const diff --git a/include/osgParticle/range b/include/osgParticle/range index 53e803c45..e242eb229 100644 --- a/include/osgParticle/range +++ b/include/osgParticle/range @@ -35,24 +35,24 @@ namespace osgParticle template struct range { /// Lower bound. - T_ min; + T_ minimum; /// Higher bound. - T_ max; + T_ maximum; /// Construct the object by calling default constructors for min and max. - range() : min(T_()), max(T_()) {} + range() : minimum(T_()), maximum(T_()) {} /// Construct and initialize min and max directly. - range(const T_ &mn, const T_ &mx) : min(mn), max(mx) {} + range(const T_ &mn, const T_ &mx) : minimum(mn), maximum(mx) {} /// Set min and max. - void set(const T_ &mn, const T_ &mx) { min = mn; max = mx; } + void set(const T_ &mn, const T_ &mx) { minimum = mn; maximum = mx; } /// Get a random value between min and max. T_ get_random() const { - return min + (max - min) * rand() / RAND_MAX; + return minimum + (maximum - minimum) * rand() / RAND_MAX; } }; diff --git a/src/osgParticle/IO_Particle.cpp b/src/osgParticle/IO_Particle.cpp index 4dd5a241f..b5f800434 100644 --- a/src/osgParticle/IO_Particle.cpp +++ b/src/osgParticle/IO_Particle.cpp @@ -49,7 +49,7 @@ bool read_particle(osgDB::Input &fr, osgParticle::Particle &P) } if (fr[0].matchWord("sizeRange")) { osgParticle::rangef r; - if (fr[1].getFloat(r.min) && fr[2].getFloat(r.max)) { + if (fr[1].getFloat(r.minimum) && fr[2].getFloat(r.maximum)) { P.setSizeRange(r); fr += 3; itAdvanced = true; @@ -57,7 +57,7 @@ bool read_particle(osgDB::Input &fr, osgParticle::Particle &P) } if (fr[0].matchWord("alphaRange")) { osgParticle::rangef r; - if (fr[1].getFloat(r.min) && fr[2].getFloat(r.max)) { + if (fr[1].getFloat(r.minimum) && fr[2].getFloat(r.maximum)) { P.setAlphaRange(r); fr += 3; itAdvanced = true; @@ -65,8 +65,8 @@ bool read_particle(osgDB::Input &fr, osgParticle::Particle &P) } if (fr[0].matchWord("colorRange")) { osgParticle::rangev4 r; - if (fr[1].getFloat(r.min.x()) && fr[2].getFloat(r.min.y()) && fr[3].getFloat(r.min.z()) && fr[4].getFloat(r.min.w()) && - fr[5].getFloat(r.max.x()) && fr[6].getFloat(r.max.y()) && fr[7].getFloat(r.max.z()) && fr[8].getFloat(r.max.w())) { + if (fr[1].getFloat(r.minimum.x()) && fr[2].getFloat(r.minimum.y()) && fr[3].getFloat(r.minimum.z()) && fr[4].getFloat(r.minimum.w()) && + fr[5].getFloat(r.maximum.x()) && fr[6].getFloat(r.maximum.y()) && fr[7].getFloat(r.maximum.z()) && fr[8].getFloat(r.maximum.w())) { P.setColorRange(r); fr += 9; itAdvanced = true; @@ -159,15 +159,15 @@ void write_particle(const osgParticle::Particle &P, osgDB::Output &fw) fw.indent() << "lifeTime " << P.getLifeTime() << std::endl; osgParticle::rangef rf = P.getSizeRange(); - fw.indent() << "sizeRange " << rf.min << " " << rf.max << std::endl; + fw.indent() << "sizeRange " << rf.minimum << " " << rf.maximum << std::endl; rf = P.getAlphaRange(); - fw.indent() << "alphaRange " << rf.min << " " << rf.max << std::endl; + fw.indent() << "alphaRange " << rf.minimum << " " << rf.maximum << std::endl; osgParticle::rangev4 rv4 = P.getColorRange(); fw.indent() << "colorRange "; - fw << rv4.min.x() << " " << rv4.min.y() << " " << rv4.min.z() << " " << rv4.min.w() << " "; - fw << rv4.max.x() << " " << rv4.max.y() << " " << rv4.max.z() << " " << rv4.max.w() << std::endl; + fw << rv4.minimum.x() << " " << rv4.minimum.y() << " " << rv4.minimum.z() << " " << rv4.minimum.w() << " "; + fw << rv4.maximum.x() << " " << rv4.maximum.y() << " " << rv4.maximum.z() << " " << rv4.maximum.w() << std::endl; osg::Vec3 v = P.getPosition(); fw.indent() << "position "; diff --git a/src/osgParticle/IO_RadialShooter.cpp b/src/osgParticle/IO_RadialShooter.cpp index 48d35d268..9c48146ab 100644 --- a/src/osgParticle/IO_RadialShooter.cpp +++ b/src/osgParticle/IO_RadialShooter.cpp @@ -26,7 +26,7 @@ bool RadialShooter_readLocalData(osg::Object &obj, osgDB::Input &fr) osgParticle::rangef r; if (fr[0].matchWord("thetaRange")) { - if (fr[1].getFloat(r.min) && fr[2].getFloat(r.max)) { + if (fr[1].getFloat(r.minimum) && fr[2].getFloat(r.maximum)) { myobj.setThetaRange(r); fr += 3; itAdvanced = true; @@ -34,7 +34,7 @@ bool RadialShooter_readLocalData(osg::Object &obj, osgDB::Input &fr) } if (fr[0].matchWord("phiRange")) { - if (fr[1].getFloat(r.min) && fr[2].getFloat(r.max)) { + if (fr[1].getFloat(r.minimum) && fr[2].getFloat(r.maximum)) { myobj.setPhiRange(r); fr += 3; itAdvanced = true; @@ -42,7 +42,7 @@ bool RadialShooter_readLocalData(osg::Object &obj, osgDB::Input &fr) } if (fr[0].matchWord("initialSpeedRange")) { - if (fr[1].getFloat(r.min) && fr[2].getFloat(r.max)) { + if (fr[1].getFloat(r.minimum) && fr[2].getFloat(r.maximum)) { myobj.setInitialSpeedRange(r); fr += 3; itAdvanced = true; @@ -58,11 +58,11 @@ bool RadialShooter_writeLocalData(const osg::Object &obj, osgDB::Output &fw) osgParticle::rangef r; r = myobj.getThetaRange(); - fw.indent() << "thetaRange " << r.min << " " << r.max << std::endl; + fw.indent() << "thetaRange " << r.minimum << " " << r.maximum << std::endl; r = myobj.getPhiRange(); - fw.indent() << "phiRange " << r.min << " " << r.max << std::endl; + fw.indent() << "phiRange " << r.minimum << " " << r.maximum << std::endl; r = myobj.getInitialSpeedRange(); - fw.indent() << "initialSpeedRange " << r.min << " " << r.max << std::endl; + fw.indent() << "initialSpeedRange " << r.minimum << " " << r.maximum << std::endl; return true; } diff --git a/src/osgParticle/IO_SectorPlacer.cpp b/src/osgParticle/IO_SectorPlacer.cpp index 522229ffe..93693cab1 100644 --- a/src/osgParticle/IO_SectorPlacer.cpp +++ b/src/osgParticle/IO_SectorPlacer.cpp @@ -26,7 +26,7 @@ bool SectorPlacer_readLocalData(osg::Object &obj, osgDB::Input &fr) osgParticle::rangef r; if (fr[0].matchWord("radiusRange")) { - if (fr[1].getFloat(r.min) && fr[2].getFloat(r.max)) { + if (fr[1].getFloat(r.minimum) && fr[2].getFloat(r.maximum)) { myobj.setRadiusRange(r); fr += 3; itAdvanced = true; @@ -34,7 +34,7 @@ bool SectorPlacer_readLocalData(osg::Object &obj, osgDB::Input &fr) } if (fr[0].matchWord("phiRange")) { - if (fr[1].getFloat(r.min) && fr[2].getFloat(r.max)) { + if (fr[1].getFloat(r.minimum) && fr[2].getFloat(r.maximum)) { myobj.setPhiRange(r); fr += 3; itAdvanced = true; @@ -51,9 +51,9 @@ bool SectorPlacer_writeLocalData(const osg::Object &obj, osgDB::Output &fw) osgParticle::rangef r; r = myobj.getRadiusRange(); - fw.indent() << "radiusRange " << r.min << " " << r.max << std::endl; + fw.indent() << "radiusRange " << r.minimum << " " << r.maximum << std::endl; r = myobj.getPhiRange(); - fw.indent() << "phiRange " << r.min << " " << r.max << std::endl; + fw.indent() << "phiRange " << r.minimum << " " << r.maximum << std::endl; return true; } diff --git a/src/osgParticle/IO_VariableRateCounter.cpp b/src/osgParticle/IO_VariableRateCounter.cpp index eedeac02f..09e5ebfa0 100644 --- a/src/osgParticle/IO_VariableRateCounter.cpp +++ b/src/osgParticle/IO_VariableRateCounter.cpp @@ -26,7 +26,7 @@ bool VariableRateCounter_readLocalData(osg::Object &obj, osgDB::Input &fr) osgParticle::rangef r; if (fr[0].matchWord("rateRange")) { - if (fr[1].getFloat(r.min) && fr[2].getFloat(r.max)) { + if (fr[1].getFloat(r.minimum) && fr[2].getFloat(r.maximum)) { myobj.setRateRange(r); fr += 3; itAdvanced = true; @@ -41,7 +41,7 @@ bool VariableRateCounter_writeLocalData(const osg::Object &obj, osgDB::Output &f const osgParticle::VariableRateCounter &myobj = static_cast(obj); osgParticle::rangef r = myobj.getRateRange(); - fw.indent() << "rateRange " << r.min << " " << r.max << std::endl; + fw.indent() << "rateRange " << r.minimum << " " << r.maximum << std::endl; return true; }