Moved osgParticle across to standard OSG coding style.

This commit is contained in:
Robert Osfield
2005-04-29 09:47:57 +00:00
parent 6211eb7b48
commit 6b5238c294
44 changed files with 1035 additions and 1027 deletions

View File

@@ -12,8 +12,8 @@
*/
//osgParticle - Copyright (C) 2002 Marco Jez
#ifndef OSGPARTICLE_VARIABLERATECOUNTER_
#define OSGPARTICLE_VARIABLERATECOUNTER_ 1
#ifndef OSGPARTICLE_VARIABLERATE_COUNTER
#define OSGPARTICLE_VARIABLERATE_COUNTER 1
#include <osgParticle/Counter>
#include <osgParticle/range>
@@ -27,48 +27,48 @@ namespace osgParticle
class VariableRateCounter: public Counter {
public:
inline VariableRateCounter();
inline VariableRateCounter(const VariableRateCounter &copy, const osg::CopyOp &copyop = osg::CopyOp::SHALLOW_COPY);
inline VariableRateCounter(const VariableRateCounter& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
virtual const char *libraryName() const { return "osgParticle"; }
virtual const char *className() const { return "VariableRateCounter"; }
virtual bool isSameKindAs(const osg::Object *obj) const { return dynamic_cast<const VariableRateCounter *>(obj) != 0; }
virtual const char* libraryName() const { return "osgParticle"; }
virtual const char* className() const { return "VariableRateCounter"; }
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const VariableRateCounter *>(obj) != 0; }
inline const rangef &getRateRange() const;
inline void setRateRange(const rangef &r);
inline const rangef& getRateRange() const;
inline void setRateRange(const rangef& r);
inline void setRateRange(float minrange, float maxrange);
protected:
virtual ~VariableRateCounter() {}
private:
rangef rate_range_;
rangef _rate_range;
};
// INLINE FUNCTIONS
inline VariableRateCounter::VariableRateCounter()
: Counter(), rate_range_(1, 1)
: Counter(), _rate_range(1, 1)
{
}
inline VariableRateCounter::VariableRateCounter(const VariableRateCounter &copy, const osg::CopyOp &copyop)
: Counter(copy, copyop), rate_range_(copy.rate_range_)
inline VariableRateCounter::VariableRateCounter(const VariableRateCounter& copy, const osg::CopyOp& copyop)
: Counter(copy, copyop), _rate_range(copy._rate_range)
{
}
inline const rangef &VariableRateCounter::getRateRange() const
{
return rate_range_;
return _rate_range;
}
inline void VariableRateCounter::setRateRange(const rangef &r)
inline void VariableRateCounter::setRateRange(const rangef& r)
{
rate_range_ = r;
_rate_range = r;
}
inline void VariableRateCounter::setRateRange(float minrange, float maxrange)
{
rate_range_.set(minrange, maxrange);
_rate_range.set(minrange, maxrange);
}
}