Ran script to remove trailing spaces and tabs
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
// Written by Wang Rui, (C) 2010
|
||||
@@ -30,44 +30,44 @@ class DampingOperator : public Operator
|
||||
public:
|
||||
DampingOperator() : Operator(), _cutoffLow(0.0f), _cutoffHigh(FLT_MAX)
|
||||
{ _damping.set(1.0f, 1.0f, 1.0f); }
|
||||
|
||||
|
||||
DampingOperator( const DampingOperator& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY )
|
||||
: Operator(copy, copyop), _damping(copy._damping),
|
||||
_cutoffLow(copy._cutoffLow), _cutoffHigh(copy._cutoffHigh)
|
||||
{}
|
||||
|
||||
|
||||
META_Object( osgParticle, DampingOperator );
|
||||
|
||||
|
||||
/// Set the damping factors
|
||||
void setDamping( float x, float y, float z ) { _damping.set(x, y, z); }
|
||||
void setDamping( const osg::Vec3& damping ) { _damping = damping; }
|
||||
|
||||
|
||||
/// Set the damping factors to one value
|
||||
void setDamping( float x ) { _damping.set(x, x, x); }
|
||||
|
||||
|
||||
/// Get the damping factors
|
||||
void getDamping( float& x, float& y, float& z ) const
|
||||
{ x = _damping.x(); y = _damping.y(); z = _damping.z(); }
|
||||
|
||||
|
||||
const osg::Vec3& getDamping() const { return _damping; }
|
||||
|
||||
|
||||
/// Set the velocity cutoff factors
|
||||
void setCutoff( float low, float high ) { _cutoffLow = low; _cutoffHigh = high; }
|
||||
void setCutoffLow( float low ) { _cutoffLow = low; }
|
||||
void setCutoffHigh( float low ) { _cutoffHigh = low; }
|
||||
|
||||
|
||||
/// Get the velocity cutoff factors
|
||||
void getCutoff( float& low, float& high ) const { low = _cutoffLow; high = _cutoffHigh; }
|
||||
float getCutoffLow() const { return _cutoffLow; }
|
||||
float getCutoffHigh() const { return _cutoffHigh; }
|
||||
|
||||
|
||||
/// Apply the acceleration to a particle. Do not call this method manually.
|
||||
inline void operate( Particle* P, double dt );
|
||||
|
||||
|
||||
protected:
|
||||
virtual ~DampingOperator() {}
|
||||
DampingOperator& operator=( const DampingOperator& ) { return *this; }
|
||||
|
||||
|
||||
osg::Vec3 _damping;
|
||||
float _cutoffLow;
|
||||
float _cutoffHigh;
|
||||
|
||||
Reference in New Issue
Block a user