diff --git a/VisualStudio/osgWrappers/osgParticle/wrapper_osgParticle.dsp b/VisualStudio/osgWrappers/osgParticle/wrapper_osgParticle.dsp index 99f9644bb..50695d601 100644 --- a/VisualStudio/osgWrappers/osgParticle/wrapper_osgParticle.dsp +++ b/VisualStudio/osgWrappers/osgParticle/wrapper_osgParticle.dsp @@ -203,6 +203,10 @@ SOURCE=..\..\..\src\osgWrappers\osgParticle\Placer.cpp SOURCE=..\..\..\src\osgWrappers\osgParticle\PointPlacer.cpp # End Source File +# Begin Source File +SOURCE=..\..\..\src\osgWrappers\osgParticle\PrecipitationEffect.cpp +# End Source File + # Begin Source File SOURCE=..\..\..\src\osgWrappers\osgParticle\Program.cpp # End Source File diff --git a/include/osgParticle/PrecipitationEffect b/include/osgParticle/PrecipitationEffect index 53606d8cc..ca9707d13 100644 --- a/include/osgParticle/PrecipitationEffect +++ b/include/osgParticle/PrecipitationEffect @@ -89,22 +89,7 @@ namespace osgParticle osg::Geometry* getPointGeometry() { return _pointGeometry.get(); } osg::StateSet* getPointStateSet() { return _pointStateSet.get(); } - - protected: - - virtual ~PrecipitationEffect() {} - - void compileGLObjects(osg::State& state) 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); - + /** Internal drawable used to render batches of cells.*/ class OSGPARTICLE_EXPORT PrecipitationDrawable : public osg::Drawable { public: @@ -203,6 +188,22 @@ namespace osgParticle }; + protected: + + virtual ~PrecipitationEffect() {} + + void compileGLObjects(osg::State& state) 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 _quadPrecipitationDrawable; diff --git a/src/osgWrappers/osgParticle/GNUmakefile b/src/osgWrappers/osgParticle/GNUmakefile index a21d4da05..bd2288171 100644 --- a/src/osgWrappers/osgParticle/GNUmakefile +++ b/src/osgWrappers/osgParticle/GNUmakefile @@ -29,6 +29,7 @@ CXXFILES =\ ParticleSystemUpdater.cpp\ Placer.cpp\ PointPlacer.cpp\ + PrecipitationEffect.cpp\ Program.cpp\ RadialShooter.cpp\ RandomRateCounter.cpp\ diff --git a/src/osgWrappers/osgParticle/PrecipitationEffect.cpp b/src/osgWrappers/osgParticle/PrecipitationEffect.cpp new file mode 100644 index 000000000..4e5493c74 --- /dev/null +++ b/src/osgWrappers/osgParticle/PrecipitationEffect.cpp @@ -0,0 +1,106 @@ +// *************************************************************************** +// +// Generated automatically by genwrapper. +// Please DO NOT EDIT this file! +// +// *************************************************************************** + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Must undefine IN and OUT macros defined in Windows headers +#ifdef IN +#undef IN +#endif +#ifdef OUT +#undef OUT +#endif + +BEGIN_OBJECT_REFLECTOR(osgParticle::PrecipitationEffect) + I_BaseType(osg::Node); + I_Constructor0(); + I_ConstructorWithDefaults2(IN, const osgParticle::PrecipitationEffect &, copy, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY); + I_Method0(const char *, libraryName); + I_Method0(const char *, className); + I_Method1(bool, isSameKindAs, IN, const osg::Object *, obj); + I_Method1(void, accept, IN, osg::NodeVisitor &, nv); + I_Method1(void, traverse, IN, osg::NodeVisitor &, nv); + I_Method1(void, rain, IN, float, intensity); + I_Method1(void, snow, IN, float, intensity); + I_Method1(void, setMaximumParticleDensity, IN, float, density); + I_Method0(float, setMaximumParticleDensity); + I_Method1(void, setWind, IN, const osg::Vec3 &, wind); + I_Method0(const osg::Vec3 &, getWind); + I_Method1(void, setPosition, IN, const osg::Vec3 &, position); + I_Method0(const osg::Vec3 &, getPosition); + I_Method1(void, setCellSize, IN, const osg::Vec3 &, cellSize); + I_Method0(const osg::Vec3 &, getCellSize); + I_Method1(void, setParticleSpeed, IN, float, particleSpeed); + I_Method0(float, getParticleSpeed); + I_Method1(void, setParticleSize, IN, float, particleSize); + I_Method0(float, getParticleSize); + I_Method1(void, setParticleColor, IN, const osg::Vec4 &, color); + I_Method0(const osg::Vec4 &, getParticleColor); + I_Method1(void, setNearTransition, IN, float, nearTransition); + I_Method0(float, getNearTransition); + I_Method1(void, setFarTransition, IN, float, farTransition); + I_Method0(float, getFarTransition); + I_Method1(void, setUseFarLineSegments, IN, bool, useFarLineSegments); + I_Method0(bool, getUseFarLineSegments); + I_Method1(void, setFog, IN, osg::Fog *, fog); + I_Method0(osg::Fog *, getFog); + I_Method0(const osg::Fog *, getFog); + I_Method0(osg::Geometry *, getQuadGeometry); + I_Method0(osg::StateSet *, getQuadStateSet); + I_Method0(osg::Geometry *, getLineGeometry); + I_Method0(osg::StateSet *, getLineStateSet); + I_Method0(osg::Geometry *, getPointGeometry); + I_Method0(osg::StateSet *, getPointStateSet); + I_Property(const osg::Vec3 &, CellSize); + I_Property(float, FarTransition); + I_Property(osg::Fog *, Fog); + I_ReadOnlyProperty(osg::Geometry *, LineGeometry); + I_ReadOnlyProperty(osg::StateSet *, LineStateSet); + I_WriteOnlyProperty(float, MaximumParticleDensity); + I_Property(float, NearTransition); + I_Property(const osg::Vec4 &, ParticleColor); + I_Property(float, ParticleSize); + I_Property(float, ParticleSpeed); + I_ReadOnlyProperty(osg::Geometry *, PointGeometry); + I_ReadOnlyProperty(osg::StateSet *, PointStateSet); + I_Property(const osg::Vec3 &, Position); + I_ReadOnlyProperty(osg::Geometry *, QuadGeometry); + I_ReadOnlyProperty(osg::StateSet *, QuadStateSet); + I_Property(bool, UseFarLineSegments); + I_Property(const osg::Vec3 &, Wind); +END_REFLECTOR + +TYPE_NAME_ALIAS(std::map< osgParticle::PrecipitationEffect::PrecipitationDrawable::Cell COMMA osgParticle::PrecipitationEffect::PrecipitationDrawable::DepthMatrixStartTime >, osgParticle::PrecipitationEffect::PrecipitationDrawable::CellMatrixMap); + +BEGIN_VALUE_REFLECTOR(osgParticle::PrecipitationEffect::PrecipitationDrawable::Cell) + I_Constructor3(IN, int, in_i, IN, int, in_j, IN, int, in_k); +END_REFLECTOR + +BEGIN_VALUE_REFLECTOR(osgParticle::PrecipitationEffect::PrecipitationDrawable::DepthMatrixStartTime) + I_Constructor0(); +END_REFLECTOR + +BEGIN_VALUE_REFLECTOR(osgParticle::PrecipitationEffect::PrecipitationDrawable::LessFunctor) + I_Constructor0(); +END_REFLECTOR + +STD_MAP_REFLECTOR(std::map< osgParticle::PrecipitationEffect::PrecipitationDrawable::Cell COMMA osgParticle::PrecipitationEffect::PrecipitationDrawable::DepthMatrixStartTime >); +