VR-Forces 4.0.4 Class Documentation
include/vrvOsg/DtParticleSystemModelInstance.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2008 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtParticleSystemModelInstance.h,v $ $Revision: 1.24 $ $State: Exp $
00007 ******************************************************************************/
00008 
00012 
00013 #pragma once
00014 #include <vrvOsg/vrvOsg.h>
00015 #include <vrvOsg/DtOsgModelInstance.h>
00016 #include <vrvOsg/DtParticleEffect.h>
00017 #include <vrvOsg/DtOsgRibbon.h>
00018 #include <matrix/vlVector.h>
00019 #include <osg/ref_ptr>
00020 #include <osg/BoundingBox>
00021 
00022 namespace osg
00023 {
00024    class Geode;
00025    class Group;
00026 }
00027 
00028 namespace makVrv
00029 {
00030    class DtParticleEffect;
00031 
00034    class DT_DLL_VRVOSG DtParticleSystemModelInstance : public DtOsgModelInstance
00035    {
00036    public:
00037 
00038       friend class DtParticleSystemModelInstanceCreator;
00039 
00041       virtual ~DtParticleSystemModelInstance();
00042 
00044       virtual void setIntensity(float intensity);
00045 
00047       virtual void setScale(float scale);
00048 
00050       virtual void setDuration(double seconds);
00051 
00053       virtual void setWind(const DtVector& windVector);
00054 
00057       virtual void setPosition( const DtVector& position);
00058 
00061       virtual bool realize(DtModelDefinition& definition);
00062 
00064       virtual void  addToConnector( DtOsgSceneConnector* connector );
00065 
00067       virtual bool removeFromConnector( DtOsgSceneConnector* connector );
00068 
00070       virtual void stop();
00071 
00073       virtual void start();
00074 
00076       virtual void pause();
00077 
00078       virtual void resume();
00079 
00081       virtual void setVisible(bool isVisible) {}
00082 
00083    protected:
00084 
00086       DtParticleSystemModelInstance(DtDe& de);
00087 
00088       osg::BoundingBox calculateParentExtents(osg::Node* parent);
00089 
00091       osg::Node* findFromCache(DtModelDefinition& definition);
00092 
00094       osg::Node* loadNode(const std::string& filenameParam, const std::string& resourcePathList );
00095      
00096    protected:
00097       osg::ref_ptr<DtParticleEffect> myEffect;
00098    };
00099 
00102    class DT_DLL_VRVOSG DtParticleSystemModelInstanceCreator : public DtModelInstanceCreator
00103    {
00104    public:
00105 
00107       static void registerCreator(DtDe& de);
00108 
00110       virtual ~DtParticleSystemModelInstanceCreator ();
00111 
00113       virtual DtModelInstance* create(DtDe& de);
00114 
00115    protected:
00116       DtParticleSystemModelInstanceCreator ();
00117    };
00118 }

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)