PrecipitationEffect
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 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
* (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
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGPARTICLE_PRECIPITATIONEFFECT
#define OSGPARTICLE_PRECIPITATIONEFFECT
#include <osg/Group>
#include <osg/BoundingBox>
#include <osg/Fog>
#include <osg/Geometry>
#include <osgUtil/CullVisitor>
#include <osgParticle/Export>
namespace osgParticle
{
class OSGPARTICLE_EXPORT PrecipitationEffect : public osg::Node
{
public:
PrecipitationEffect();
PrecipitationEffect(const PrecipitationEffect& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
virtual const char* libraryName() const { return "osgParticle"; }
virtual const char* className() const { return "PrecipitationEffect"; }
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const PrecipitationEffect*>(obj) != 0; }
virtual void accept(osg::NodeVisitor& nv) { if (nv.validNodeMask(*this)) { nv.pushOntoNodePath(this); nv.apply(*this); nv.popFromNodePath(); } }
virtual void resizeGLObjectBuffers(unsigned int maxSize);
virtual void releaseGLObjects(osg::State* state = 0) const;
virtual void traverse(osg::NodeVisitor& nv);
void rain(float intensity);
void snow(float intensity);
void setMaximumParticleDensity(float density) { if (_maximumParticleDensity==density) return; _maximumParticleDensity = density; _dirty = true;}
float getMaximumParticleDensity() const { return _maximumParticleDensity; }
void setWind(const osg::Vec3& wind) { _wind = wind; }
const osg::Vec3& getWind() const { return _wind; }
void setPosition(const osg::Vec3& position) { _origin = position; }
const osg::Vec3& getPosition() const { return _origin; }
void setCellSize(const osg::Vec3& cellSize) { if (_cellSize==cellSize) return; _cellSize = cellSize; _dirty = true; }
const osg::Vec3& getCellSize() const { return _cellSize; }
void setParticleSpeed(float particleSpeed) { if (_particleSpeed==particleSpeed) return; _particleSpeed = particleSpeed; _dirty = true; }
float getParticleSpeed() const { return _particleSpeed; }
void setParticleSize(float particleSize) { if (_particleSize==particleSize) return; _particleSize = particleSize; _dirty = true;}
float getParticleSize() const { return _particleSize; }
void setParticleColor(const osg::Vec4& color) { if (_particleColor==color) return; _particleColor = color; _dirty = true;}
const osg::Vec4& getParticleColor() const { return _particleColor; }
void setNearTransition(float nearTransition) { _nearTransition = nearTransition; }
float getNearTransition() const { return _nearTransition; }
void setFarTransition(float farTransition) { _farTransition = farTransition; }
float getFarTransition() const { return _farTransition; }
void setUseFarLineSegments(bool useFarLineSegments) { _useFarLineSegments = useFarLineSegments; }
bool getUseFarLineSegments() const { return _useFarLineSegments; }
void setFog(osg::Fog* fog) { _fog = fog; }
osg::Fog* getFog() { return _fog.get(); }
const osg::Fog* getFog() const { return _fog.get(); }
osg::Geometry* getQuadGeometry() { return _quadGeometry.get(); }
osg::StateSet* getQuadStateSet() { return _quadStateSet.get(); }
osg::Geometry* getLineGeometry() { return _lineGeometry.get(); }
osg::StateSet* getLineStateSet() { return _lineStateSet.get(); }
osg::Geometry* getPointGeometry() { return _pointGeometry.get(); }
osg::StateSet* getPointStateSet() { return _pointStateSet.get(); }
class OSGPARTICLE_EXPORT PrecipitationDrawable : public osg::Drawable
{
public:
PrecipitationDrawable();
PrecipitationDrawable(const PrecipitationDrawable& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
META_Object(osgParticle, PrecipitationDrawable);
virtual bool supports(const osg::PrimitiveFunctor&) const { return false; }
virtual void accept(osg::PrimitiveFunctor&) const {}
virtual bool supports(const osg::PrimitiveIndexFunctor&) const { return false; }
virtual void accept(osg::PrimitiveIndexFunctor&) const {}
void setRequiresPreviousMatrix(bool flag) { _requiresPreviousMatrix = flag; }
bool getRequiresPreviousMatrix() const { return _requiresPreviousMatrix; }
void setGeometry(osg::Geometry* geom) { _geometry = geom; }
osg::Geometry* getGeometry() { return _geometry.get(); }
const osg::Geometry* getGeometry() const { return _geometry.get(); }
void setDrawType(GLenum type) { _drawType = type; }
GLenum getDrawType() const { return _drawType; }
void setNumberOfVertices(unsigned int numVertices) { _numberOfVertices = numVertices; }
unsigned int getNumberOfVertices() const { return _numberOfVertices; }
virtual void resizeGLObjectBuffers(unsigned int maxSize);
virtual void releaseGLObjects(osg::State* state) const;
virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
struct Cell
{
Cell(int in_i, int in_j, int in_k):
i(in_i), j(in_j), k(in_k) {}
inline bool operator < (const Cell& rhs) const
{
if (i<rhs.i) return true;
if (i>rhs.i) return false;
if (j<rhs.j) return true;
if (j>rhs.j) return false;
if (k<rhs.k) return true;
if (k>rhs.k) return false;
return false;
}
int i;
int j;
int k;
};
struct DepthMatrixStartTime
{
inline bool operator < (const DepthMatrixStartTime& rhs) const
{
return depth < rhs.depth;
}
float depth;
float startTime;
osg::Matrix modelview;
};
typedef std::map< Cell, DepthMatrixStartTime > CellMatrixMap;
struct LessFunctor
{
inline bool operator () (const CellMatrixMap::value_type* lhs,const CellMatrixMap::value_type* rhs) const
{
return (*lhs).second<(*rhs).second;
}
};
CellMatrixMap& getCurrentCellMatrixMap() { return _currentCellMatrixMap; }
CellMatrixMap& getPreviousCellMatrixMap() { return _previousCellMatrixMap; }
inline void newFrame()
{
_previousCellMatrixMap.swap(_currentCellMatrixMap);
_currentCellMatrixMap.clear();
}
protected:
virtual ~PrecipitationDrawable();
bool _requiresPreviousMatrix;
osg::ref_ptr<osg::Geometry> _geometry;
mutable CellMatrixMap _currentCellMatrixMap;
mutable CellMatrixMap _previousCellMatrixMap;
GLenum _drawType;
unsigned int _numberOfVertices;
};
protected:
virtual ~PrecipitationEffect() {}
void compileGLObjects(osg::RenderInfo& renderInfo) const;
void update();
void createGeometry(unsigned int numParticles,
osg::Geometry* quad_geometry,
osg::Geometry* line_geometry,
osg::Geometry* point_geometry);
void setUpGeometries(unsigned int numParticles);
struct PrecipitationDrawableSet
{
osg::ref_ptr<PrecipitationDrawable> _quadPrecipitationDrawable;
osg::ref_ptr<PrecipitationDrawable> _linePrecipitationDrawable;
osg::ref_ptr<PrecipitationDrawable> _pointPrecipitationDrawable;
};
void cull(PrecipitationDrawableSet& pds, osgUtil::CullVisitor* cv) const;
bool build(const osg::Vec3 eyeLocal, int i, int j, int k, float startTime, PrecipitationDrawableSet& pds, osg::Polytope& frustum, osgUtil::CullVisitor* cv) const;
// parameters
bool _dirty;
osg::Vec3 _wind;
float _particleSpeed;
float _particleSize;
osg::Vec4 _particleColor;
float _maximumParticleDensity;
osg::Vec3 _cellSize;
float _nearTransition;
float _farTransition;
bool _useFarLineSegments;
osg::ref_ptr<osg::Fog> _fog;
osg::ref_ptr<osg::Uniform> _inversePeriodUniform;
osg::ref_ptr<osg::Uniform> _particleSizeUniform;
osg::ref_ptr<osg::Uniform> _particleColorUniform;
typedef std::pair< osg::NodeVisitor*, osg::NodePath > ViewIdentifier;
typedef std::map< ViewIdentifier, PrecipitationDrawableSet > ViewDrawableMap;
OpenThreads::Mutex _mutex;
ViewDrawableMap _viewDrawableMap;
osg::ref_ptr<osg::Geometry> _quadGeometry;
osg::ref_ptr<osg::StateSet> _quadStateSet;
osg::ref_ptr<osg::Geometry> _lineGeometry;
osg::ref_ptr<osg::StateSet> _lineStateSet;
osg::ref_ptr<osg::Geometry> _pointGeometry;
osg::ref_ptr<osg::StateSet> _pointStateSet;
// cache variables.
float _period;
osg::Vec3 _origin;
osg::Vec3 _du;
osg::Vec3 _dv;
osg::Vec3 _dw;
osg::Vec3 _inverse_du;
osg::Vec3 _inverse_dv;
osg::Vec3 _inverse_dw;
double _previousFrameTime;
};
}
#endif
BoundingBox
CullVisitor
Fog
Geometry
Group
OpenThreads::Mutex
This class provides an object-oriented thread mutex interface.
Definition Mutex:31
osgParticle::PrecipitationEffect::PrecipitationDrawable::supports
virtual bool supports(const osg::PrimitiveIndexFunctor &) const
Definition PrecipitationEffect:106
osgParticle::PrecipitationEffect::PrecipitationDrawable::_currentCellMatrixMap
CellMatrixMap _currentCellMatrixMap
Definition PrecipitationEffect:188
osgParticle::PrecipitationEffect::PrecipitationDrawable::_numberOfVertices
unsigned int _numberOfVertices
Definition PrecipitationEffect:192
osgParticle::PrecipitationEffect::PrecipitationDrawable::getRequiresPreviousMatrix
bool getRequiresPreviousMatrix() const
Definition PrecipitationEffect:110
osgParticle::PrecipitationEffect::PrecipitationDrawable::_drawType
GLenum _drawType
Definition PrecipitationEffect:191
osgParticle::PrecipitationEffect::PrecipitationDrawable::PrecipitationDrawable
PrecipitationDrawable(const PrecipitationDrawable &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
osgParticle::PrecipitationEffect::PrecipitationDrawable::_previousCellMatrixMap
CellMatrixMap _previousCellMatrixMap
Definition PrecipitationEffect:189
osgParticle::PrecipitationEffect::PrecipitationDrawable::CellMatrixMap
std::map< Cell, DepthMatrixStartTime > CellMatrixMap
Definition PrecipitationEffect:160
osgParticle::PrecipitationEffect::PrecipitationDrawable::getPreviousCellMatrixMap
CellMatrixMap & getPreviousCellMatrixMap()
Definition PrecipitationEffect:172
osgParticle::PrecipitationEffect::PrecipitationDrawable::setNumberOfVertices
void setNumberOfVertices(unsigned int numVertices)
Definition PrecipitationEffect:119
osgParticle::PrecipitationEffect::PrecipitationDrawable::getNumberOfVertices
unsigned int getNumberOfVertices() const
Definition PrecipitationEffect:120
osgParticle::PrecipitationEffect::PrecipitationDrawable::getGeometry
osg::Geometry * getGeometry()
Definition PrecipitationEffect:113
osgParticle::PrecipitationEffect::PrecipitationDrawable::resizeGLObjectBuffers
virtual void resizeGLObjectBuffers(unsigned int maxSize)
osgParticle::PrecipitationEffect::PrecipitationDrawable::supports
virtual bool supports(const osg::PrimitiveFunctor &) const
Definition PrecipitationEffect:104
osgParticle::PrecipitationEffect::PrecipitationDrawable::newFrame
void newFrame()
Definition PrecipitationEffect:174
osgParticle::PrecipitationEffect::PrecipitationDrawable::getGeometry
const osg::Geometry * getGeometry() const
Definition PrecipitationEffect:114
osgParticle::PrecipitationEffect::PrecipitationDrawable::~PrecipitationDrawable
virtual ~PrecipitationDrawable()
osgParticle::PrecipitationEffect::PrecipitationDrawable::META_Object
META_Object(osgParticle, PrecipitationDrawable)
osgParticle::PrecipitationEffect::PrecipitationDrawable::getDrawType
GLenum getDrawType() const
Definition PrecipitationEffect:117
osgParticle::PrecipitationEffect::PrecipitationDrawable::setGeometry
void setGeometry(osg::Geometry *geom)
Definition PrecipitationEffect:112
osgParticle::PrecipitationEffect::PrecipitationDrawable::setDrawType
void setDrawType(GLenum type)
Definition PrecipitationEffect:116
osgParticle::PrecipitationEffect::PrecipitationDrawable::accept
virtual void accept(osg::PrimitiveIndexFunctor &) const
Definition PrecipitationEffect:107
osgParticle::PrecipitationEffect::PrecipitationDrawable::drawImplementation
virtual void drawImplementation(osg::RenderInfo &renderInfo) const
osgParticle::PrecipitationEffect::PrecipitationDrawable::_requiresPreviousMatrix
bool _requiresPreviousMatrix
Definition PrecipitationEffect:184
osgParticle::PrecipitationEffect::PrecipitationDrawable::_geometry
osg::ref_ptr< osg::Geometry > _geometry
Definition PrecipitationEffect:186
osgParticle::PrecipitationEffect::PrecipitationDrawable::accept
virtual void accept(osg::PrimitiveFunctor &) const
Definition PrecipitationEffect:105
osgParticle::PrecipitationEffect::PrecipitationDrawable::releaseGLObjects
virtual void releaseGLObjects(osg::State *state) const
osgParticle::PrecipitationEffect::PrecipitationDrawable::PrecipitationDrawable
PrecipitationDrawable()
osgParticle::PrecipitationEffect::PrecipitationDrawable::getCurrentCellMatrixMap
CellMatrixMap & getCurrentCellMatrixMap()
Definition PrecipitationEffect:171
osgParticle::PrecipitationEffect::PrecipitationDrawable::setRequiresPreviousMatrix
void setRequiresPreviousMatrix(bool flag)
Definition PrecipitationEffect:109
osgParticle::PrecipitationEffect::compileGLObjects
void compileGLObjects(osg::RenderInfo &renderInfo) const
osgParticle::PrecipitationEffect::releaseGLObjects
virtual void releaseGLObjects(osg::State *state=0) const
osgParticle::PrecipitationEffect::getParticleColor
const osg::Vec4 & getParticleColor() const
Definition PrecipitationEffect:70
osgParticle::PrecipitationEffect::_particleColorUniform
osg::ref_ptr< osg::Uniform > _particleColorUniform
Definition PrecipitationEffect:237
osgParticle::PrecipitationEffect::setMaximumParticleDensity
void setMaximumParticleDensity(float density)
Definition PrecipitationEffect:51
osgParticle::PrecipitationEffect::_pointGeometry
osg::ref_ptr< osg::Geometry > _pointGeometry
Definition PrecipitationEffect:251
osgParticle::PrecipitationEffect::~PrecipitationEffect
virtual ~PrecipitationEffect()
Definition PrecipitationEffect:198
osgParticle::PrecipitationEffect::_inverse_dw
osg::Vec3 _inverse_dw
Definition PrecipitationEffect:262
osgParticle::PrecipitationEffect::className
virtual const char * className() const
Definition PrecipitationEffect:36
osgParticle::PrecipitationEffect::_period
float _period
Definition PrecipitationEffect:255
osgParticle::PrecipitationEffect::_lineGeometry
osg::ref_ptr< osg::Geometry > _lineGeometry
Definition PrecipitationEffect:248
osgParticle::PrecipitationEffect::getParticleSpeed
float getParticleSpeed() const
Definition PrecipitationEffect:64
osgParticle::PrecipitationEffect::setFarTransition
void setFarTransition(float farTransition)
Definition PrecipitationEffect:75
osgParticle::PrecipitationEffect::libraryName
virtual const char * libraryName() const
Definition PrecipitationEffect:35
osgParticle::PrecipitationEffect::_inversePeriodUniform
osg::ref_ptr< osg::Uniform > _inversePeriodUniform
Definition PrecipitationEffect:235
osgParticle::PrecipitationEffect::_useFarLineSegments
bool _useFarLineSegments
Definition PrecipitationEffect:232
osgParticle::PrecipitationEffect::_wind
osg::Vec3 _wind
Definition PrecipitationEffect:224
osgParticle::PrecipitationEffect::_farTransition
float _farTransition
Definition PrecipitationEffect:231
osgParticle::PrecipitationEffect::_particleSizeUniform
osg::ref_ptr< osg::Uniform > _particleSizeUniform
Definition PrecipitationEffect:236
osgParticle::PrecipitationEffect::_dv
osg::Vec3 _dv
Definition PrecipitationEffect:258
osgParticle::PrecipitationEffect::update
void update()
osgParticle::PrecipitationEffect::setParticleSpeed
void setParticleSpeed(float particleSpeed)
Definition PrecipitationEffect:63
osgParticle::PrecipitationEffect::setUseFarLineSegments
void setUseFarLineSegments(bool useFarLineSegments)
Definition PrecipitationEffect:78
osgParticle::PrecipitationEffect::isSameKindAs
virtual bool isSameKindAs(const osg::Object *obj) const
Definition PrecipitationEffect:37
osgParticle::PrecipitationEffect::getMaximumParticleDensity
float getMaximumParticleDensity() const
Definition PrecipitationEffect:52
osgParticle::PrecipitationEffect::_inverse_du
osg::Vec3 _inverse_du
Definition PrecipitationEffect:260
osgParticle::PrecipitationEffect::_fog
osg::ref_ptr< osg::Fog > _fog
Definition PrecipitationEffect:233
osgParticle::PrecipitationEffect::getPointStateSet
osg::StateSet * getPointStateSet()
Definition PrecipitationEffect:92
osgParticle::PrecipitationEffect::_particleColor
osg::Vec4 _particleColor
Definition PrecipitationEffect:227
osgParticle::PrecipitationEffect::setParticleSize
void setParticleSize(float particleSize)
Definition PrecipitationEffect:66
osgParticle::PrecipitationEffect::_pointStateSet
osg::ref_ptr< osg::StateSet > _pointStateSet
Definition PrecipitationEffect:252
osgParticle::PrecipitationEffect::_particleSize
float _particleSize
Definition PrecipitationEffect:226
osgParticle::PrecipitationEffect::setWind
void setWind(const osg::Vec3 &wind)
Definition PrecipitationEffect:54
osgParticle::PrecipitationEffect::getLineGeometry
osg::Geometry * getLineGeometry()
Definition PrecipitationEffect:88
osgParticle::PrecipitationEffect::getParticleSize
float getParticleSize() const
Definition PrecipitationEffect:67
osgParticle::PrecipitationEffect::_particleSpeed
float _particleSpeed
Definition PrecipitationEffect:225
osgParticle::PrecipitationEffect::_origin
osg::Vec3 _origin
Definition PrecipitationEffect:256
osgParticle::PrecipitationEffect::rain
void rain(float intensity)
osgParticle::PrecipitationEffect::setNearTransition
void setNearTransition(float nearTransition)
Definition PrecipitationEffect:72
osgParticle::PrecipitationEffect::_previousFrameTime
double _previousFrameTime
Definition PrecipitationEffect:264
osgParticle::PrecipitationEffect::resizeGLObjectBuffers
virtual void resizeGLObjectBuffers(unsigned int maxSize)
osgParticle::PrecipitationEffect::setCellSize
void setCellSize(const osg::Vec3 &cellSize)
Definition PrecipitationEffect:60
osgParticle::PrecipitationEffect::_quadStateSet
osg::ref_ptr< osg::StateSet > _quadStateSet
Definition PrecipitationEffect:246
osgParticle::PrecipitationEffect::_nearTransition
float _nearTransition
Definition PrecipitationEffect:230
osgParticle::PrecipitationEffect::_viewDrawableMap
ViewDrawableMap _viewDrawableMap
Definition PrecipitationEffect:243
osgParticle::PrecipitationEffect::_cellSize
osg::Vec3 _cellSize
Definition PrecipitationEffect:229
osgParticle::PrecipitationEffect::_lineStateSet
osg::ref_ptr< osg::StateSet > _lineStateSet
Definition PrecipitationEffect:249
osgParticle::PrecipitationEffect::PrecipitationEffect
PrecipitationEffect()
osgParticle::PrecipitationEffect::accept
virtual void accept(osg::NodeVisitor &nv)
Definition PrecipitationEffect:38
osgParticle::PrecipitationEffect::_mutex
OpenThreads::Mutex _mutex
Definition PrecipitationEffect:242
osgParticle::PrecipitationEffect::setPosition
void setPosition(const osg::Vec3 &position)
Definition PrecipitationEffect:57
osgParticle::PrecipitationEffect::getFarTransition
float getFarTransition() const
Definition PrecipitationEffect:76
osgParticle::PrecipitationEffect::getLineStateSet
osg::StateSet * getLineStateSet()
Definition PrecipitationEffect:89
osgParticle::PrecipitationEffect::getFog
osg::Fog * getFog()
Definition PrecipitationEffect:82
osgParticle::PrecipitationEffect::getQuadGeometry
osg::Geometry * getQuadGeometry()
Definition PrecipitationEffect:85
osgParticle::PrecipitationEffect::getFog
const osg::Fog * getFog() const
Definition PrecipitationEffect:83
osgParticle::PrecipitationEffect::_dw
osg::Vec3 _dw
Definition PrecipitationEffect:259
osgParticle::PrecipitationEffect::traverse
virtual void traverse(osg::NodeVisitor &nv)
osgParticle::PrecipitationEffect::ViewIdentifier
std::pair< osg::NodeVisitor *, osg::NodePath > ViewIdentifier
Definition PrecipitationEffect:239
osgParticle::PrecipitationEffect::getPointGeometry
osg::Geometry * getPointGeometry()
Definition PrecipitationEffect:91
osgParticle::PrecipitationEffect::build
bool build(const osg::Vec3 eyeLocal, int i, int j, int k, float startTime, PrecipitationDrawableSet &pds, osg::Polytope &frustum, osgUtil::CullVisitor *cv) const
osgParticle::PrecipitationEffect::_inverse_dv
osg::Vec3 _inverse_dv
Definition PrecipitationEffect:261
osgParticle::PrecipitationEffect::_du
osg::Vec3 _du
Definition PrecipitationEffect:257
osgParticle::PrecipitationEffect::setFog
void setFog(osg::Fog *fog)
Definition PrecipitationEffect:81
osgParticle::PrecipitationEffect::getWind
const osg::Vec3 & getWind() const
Definition PrecipitationEffect:55
osgParticle::PrecipitationEffect::PrecipitationEffect
PrecipitationEffect(const PrecipitationEffect &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
osgParticle::PrecipitationEffect::getQuadStateSet
osg::StateSet * getQuadStateSet()
Definition PrecipitationEffect:86
osgParticle::PrecipitationEffect::getCellSize
const osg::Vec3 & getCellSize() const
Definition PrecipitationEffect:61
osgParticle::PrecipitationEffect::_maximumParticleDensity
float _maximumParticleDensity
Definition PrecipitationEffect:228
osgParticle::PrecipitationEffect::ViewDrawableMap
std::map< ViewIdentifier, PrecipitationDrawableSet > ViewDrawableMap
Definition PrecipitationEffect:240
osgParticle::PrecipitationEffect::getPosition
const osg::Vec3 & getPosition() const
Definition PrecipitationEffect:58
osgParticle::PrecipitationEffect::getNearTransition
float getNearTransition() const
Definition PrecipitationEffect:73
osgParticle::PrecipitationEffect::setUpGeometries
void setUpGeometries(unsigned int numParticles)
osgParticle::PrecipitationEffect::setParticleColor
void setParticleColor(const osg::Vec4 &color)
Definition PrecipitationEffect:69
osgParticle::PrecipitationEffect::_dirty
bool _dirty
Definition PrecipitationEffect:223
osgParticle::PrecipitationEffect::snow
void snow(float intensity)
osgParticle::PrecipitationEffect::_quadGeometry
osg::ref_ptr< osg::Geometry > _quadGeometry
Definition PrecipitationEffect:245
osgParticle::PrecipitationEffect::getUseFarLineSegments
bool getUseFarLineSegments() const
Definition PrecipitationEffect:79
osgParticle::PrecipitationEffect::cull
void cull(PrecipitationDrawableSet &pds, osgUtil::CullVisitor *cv) const
osgParticle::PrecipitationEffect::createGeometry
void createGeometry(unsigned int numParticles, osg::Geometry *quad_geometry, osg::Geometry *line_geometry, osg::Geometry *point_geometry)
osgUtil::CullVisitor
Definition CullVisitor:49
osg::CopyOp
Definition CopyOp:41
osg::CopyOp::SHALLOW_COPY
@ SHALLOW_COPY
Definition CopyOp:47
osg::Drawable
Definition Drawable:89
osg::Fog
Definition Fog:53
osg::Geometry
Definition Geometry:31
osg::NodeVisitor
Definition NodeVisitor:82
osg::NodeVisitor::apply
virtual void apply(Drawable &drawable)
osg::NodeVisitor::pushOntoNodePath
void pushOntoNodePath(Node *node)
Definition NodeVisitor:287
osg::NodeVisitor::validNodeMask
bool validNodeMask(const osg::Node &node) const
Definition NodeVisitor:221
osg::NodeVisitor::popFromNodePath
void popFromNodePath()
Definition NodeVisitor:293
osg::Node
Definition Node:72
osg::Object
Definition Object:61
osg::Polytope
Definition Polytope:26
osg::PrimitiveFunctor
Definition PrimitiveSet:54
osg::PrimitiveIndexFunctor
Definition PrimitiveSet:103
osg::RenderInfo
Definition RenderInfo:28
osg::StateSet
Definition StateSet:46
osg::State
Definition State:80
osg::ref_ptr
Definition ref_ptr:32
osgParticle
Definition AccelOperator:27
osg::Vec3
Vec3f Vec3
Definition Vec3:21
osg::Matrix
Matrixd Matrix
Definition Matrix:27
osg::Vec4
Vec4f Vec4
Definition Vec4:21
Export
OSGPARTICLE_EXPORT
#define OSGPARTICLE_EXPORT
Definition osgParticle/Export:40
osgParticle::PrecipitationEffect::PrecipitationDrawableSet
Definition PrecipitationEffect:213
osgParticle::PrecipitationEffect::PrecipitationDrawableSet::_linePrecipitationDrawable
osg::ref_ptr< PrecipitationDrawable > _linePrecipitationDrawable
Definition PrecipitationEffect:215
osgParticle::PrecipitationEffect::PrecipitationDrawableSet::_pointPrecipitationDrawable
osg::ref_ptr< PrecipitationDrawable > _pointPrecipitationDrawable
Definition PrecipitationEffect:216
osgParticle::PrecipitationEffect::PrecipitationDrawableSet::_quadPrecipitationDrawable
osg::ref_ptr< PrecipitationDrawable > _quadPrecipitationDrawable
Definition PrecipitationEffect:214
osgParticle::PrecipitationEffect::PrecipitationDrawable::Cell::j
int j
Definition PrecipitationEffect:144
osgParticle::PrecipitationEffect::PrecipitationDrawable::Cell::i
int i
Definition PrecipitationEffect:143
osgParticle::PrecipitationEffect::PrecipitationDrawable::Cell::Cell
Cell(int in_i, int in_j, int in_k)
Definition PrecipitationEffect:129
osgParticle::PrecipitationEffect::PrecipitationDrawable::Cell::k
int k
Definition PrecipitationEffect:145
osgParticle::PrecipitationEffect::PrecipitationDrawable::DepthMatrixStartTime
Definition PrecipitationEffect:149
osgParticle::PrecipitationEffect::PrecipitationDrawable::DepthMatrixStartTime::startTime
float startTime
Definition PrecipitationEffect:156
osgParticle::PrecipitationEffect::PrecipitationDrawable::DepthMatrixStartTime::modelview
osg::Matrix modelview
Definition PrecipitationEffect:157
osgParticle::PrecipitationEffect::PrecipitationDrawable::DepthMatrixStartTime::depth
float depth
Definition PrecipitationEffect:155
osgParticle::PrecipitationEffect::PrecipitationDrawable::LessFunctor
Definition PrecipitationEffect:163