VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtEffectModelInstance.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtEffectModelInstance.h,v $ $Revision: 1.24 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtEffectModelInstance_H_
14 #define DtEffectModelInstance_H_
15 
16 #include <vrvOsg/vrvOsg.h>
19 #include <vrvOsg/DtOsgRibbon.h>
20 #include <matrix/vlVector.h>
21 
22 #include <osg/ref_ptr>
23 #include <osg/BoundingBox>
24 
25 namespace osg
26 {
27  class Geode;
28  class Group;
29 }
30 
31 namespace makVrv
32 {
33  class DtParticleEffect;
34  class DtOsgRibbon;
35  class DtOsgSceneConnector;
36 
40  {
41  public:
42 
44 
46  virtual ~DtEffectModelInstance();
47 
49  virtual void setIntensity(float intensity);
50 
52  virtual void setScale(float scale);
53 
55  virtual void setDuration(double seconds);
56 
58  virtual void setWind(const DtVector& windVector);
59 
62  virtual void setPosition( const DtVector& position);
63 
66  virtual bool realize(DtModelDefinition& definition);
67 
69  virtual void addToConnector( DtOsgSceneConnector* connector );
70 
72  virtual bool removeFromConnector( DtOsgSceneConnector* connector );
73 
75  virtual void stop();
76 
78  virtual void start();
79 
81  virtual void pause();
82 
83  virtual void resume();
84 
85  virtual void setLoopMode(bool loopOn);
86 
87  virtual void setReverseAnimation(bool reverse);
88 
90  virtual void setVisible(bool isVisible);
91 
92  protected:
93 
95  DtOsgRibbon* createRibbonEffect(const osg::Vec3& pointA, const osg::Vec3& pointB);
97 
98  osg::BoundingBox calculateParentExtents(osg::Node* parent);
99 
101  osg::Node* findFromCache(DtModelDefinition& definition);
102 
104  osg::ref_ptr<osg::Node> loadNode(const std::string& filenameParam);
105 
106  osg::ref_ptr<DtParticleEffect> myEffect;
109  std::string myDefinition;
110  osg::ref_ptr<DtOsgRibbon> myRibbon;
112  };
113 
117  {
118  public:
119 
121  static void registerCreator(DtDe& de);
122 
124  virtual ~DtEffectModelInstanceCreator ();
125 
127  virtual DtModelInstance* create(DtDe& de);
128 
129  protected:
130 
132  };
133 }
134 
135 #endif
136 

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)