VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtDecalModelInstance.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2017 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 #include <osg/BoundingSphere>
15 
16 namespace osg
17 {
18  class Geode;
19  class Group;
20 }
21 
22 namespace makVrv
23 {
24 
25  class DtOsgRibbon;
26  class DtSceneObject;
27 
32  {
33  public:
34 
36  virtual ~DtDecalModelInstance();
37 
40  virtual bool realize( DtModelDefinition& definition );
41 
43  virtual void addToConnector( DtOsgSceneConnector* connector );
44 
46  virtual bool removeFromConnector( DtOsgSceneConnector* connector );
47 
49  virtual void setParentSceneObject( const DtUniqueID& sceneObjID );
50 
53  virtual DtSceneObject* parentSceneObject();
54 
58  virtual void setOcclusionEnabled( bool enabled );
59 
61  virtual void setColor( const osg::Vec4& color );
62 
64  virtual void setVisible( bool isVisible ) {}
65 
67  virtual void update();
68 
71  virtual void setNewParticleVisible( bool enabled );
72 
73  protected:
74 
76 
79 
81  virtual DtOsgRibbon* createRibbonEffect( const osg::Vec3& pointA,
82  const osg::Vec3& pointB );
83 
85  virtual osg::Node* findFromCache( DtModelDefinition& definition );
86 
87  protected:
88 
89  osg::ref_ptr<DtOsgRibbon> myRibbon;
92  bool myColorSet;
93  osg::Vec4 myColor;
95 
96  // When the class is destructed, the parent scene object may or may not
97  // exist. Using a separate connection variable makes it possible to
98  // 'disconnect' even if the scene object has been deleted.
99  boost::signalslib::connection mySceneObjectConnection;
100 
101  };
102 
103 
107  : public DtModelInstanceCreator
108  {
109  public:
110 
112  static void registerCreator( DtDe& de );
113 
115  virtual ~DtDecalModelInstanceCreator();
116 
118  virtual DtModelInstance* create( DtDe& de );
119 
120  protected:
121 
123 
124  };
125 
126 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)