VR-Forces 4.0.4 Class Documentation
include/vrvOsg/DtParticleEffect.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2008 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtParticleEffect.h,v $ $Revision: 1.15 $ $State: Exp $
00007 ******************************************************************************/
00008 
00011 
00012 #pragma once
00013 
00014 #include <vrvOsg/vrvOsg.h>
00015 #include <osg/MatrixTransform>
00016 #include <osg/Geode>
00017 #include <osg/Sequence>
00018 
00019 namespace makVrv
00020 {
00025    class DT_DLL_VRVOSG DtParticleEffect : public osg::MatrixTransform
00026    {
00027    public:
00028       DtParticleEffect();
00029 
00030       //@ {
00033       virtual const char* libraryName() const;
00034 
00036       virtual const char* className() const;
00037 
00039       virtual bool isSameKindAs(const osg::Object* obj) const;
00040 
00041       virtual void accept(osg::NodeVisitor& v);
00042       //@ }
00043 
00045       virtual osg::Group* emitterGroup();
00046 
00048       virtual osg::Group* programGroup();
00049 
00051       virtual osg::Group* proxyGroup();
00052 
00055       virtual osg::Group* transformGroup();
00056 
00058       virtual void setUpEmittersAndPrograms() = 0;
00059 
00061       virtual void buildEffect();
00062 
00063       virtual bool useLocalParticleSystem();
00064       virtual void setUseLocalParticleSystem(bool b);
00065 
00066       virtual osg::Vec3 position();
00067       virtual void setPosition(const osg::Vec3& vec);
00068 
00069       virtual float scale();
00070       virtual void setScale(float scale);
00071 
00072       virtual float intensity();
00073       virtual void setIntensity(float intensity);
00074 
00075       virtual double startTime();
00076       virtual void setStartTime(double startTime);
00077 
00078       virtual double emitterDuration();
00079       virtual void setEmitterDuration(double emitterDuration);
00080 
00082       virtual double particleLifetime();
00083 
00084       virtual osg::Vec3 wind();
00085       virtual void setWind(const osg::Vec3 wind);
00086 
00087       virtual void stop();
00088 
00089       virtual void start();
00090 
00091       virtual void pause();
00092 
00093       virtual void resume();
00094 
00095       virtual void setLoopMode(bool loopOn);
00096 
00097       virtual void setReverseAnimation(bool reverse);
00098 
00100       virtual void traverse(osg::NodeVisitor& nv);
00101 
00103       virtual osg::Node* particleSystemNode();
00104 
00107       virtual osg::Geode* particleSystemGeode();
00108 
00109       virtual void setMatrix(const osg::Matrix& mat);
00110 
00111    protected:
00112       virtual void addParent(osg::Group* parent);
00113 
00115       virtual ~DtParticleEffect();
00116 
00118       DtParticleEffect(const DtParticleEffect& copy, const osg::CopyOp& copyop);
00119       
00120       osg::ref_ptr<osg::Group> myEmitterGroup;
00121       osg::ref_ptr<osg::Group> myProgramGroup;
00122       osg::ref_ptr<osg::Geode> myParticleSystemGeode;
00123       osg::ref_ptr<osg::Group> myProxyGroup;
00124       osg::ref_ptr<osg::Group> myTransformGroup;
00125 
00126       std::vector<osg::ref_ptr<osg::Sequence> > mySequences;
00127       bool mySequencesLooping;
00128       bool mySequencesReverse;
00129 
00130       osg::ref_ptr<osg::MatrixTransform> myParticleSystemTransform;
00131       bool myTransformsSet;
00132 
00133       bool myUseLocalParticleSystem;
00134       osg::Vec3 myPosition;
00135       float myScale;
00136       float myIntensity;
00137       double myStartTime;
00138       double myEmitterDuration;
00139       osg::Vec3 myWind;
00140    };
00141 }

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)