VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtRibbonModelInstance.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 
12 #include <vrvOsg/vrvOsg.h>
13 
15 #include <vrvOsg/DtOsgRibbon.h>
16 
18 
19 #include <matrix/vlVector.h>
20 
21 #include <osg/ref_ptr>
22 
23 namespace osg
24 {
25  class Geode;
26  class Group;
27 }
28 
29 namespace makVrv
30 {
31 
32  class DtOsgRibbon;
33  class DtSceneObject;
34 
39  {
40  public:
41 
43  virtual ~DtRibbonModelInstance();
44 
47  virtual bool realize( DtModelDefinition& definition );
48 
50  virtual void addToConnector( DtOsgSceneConnector* connector );
51 
52  virtual void updateRibbonWidth();
53 
55  virtual bool removeFromConnector( DtOsgSceneConnector* connector );
56 
58  virtual void setParentSceneObject( const DtUniqueID& sceneObjID );
59 
62  virtual DtSceneObject* parentSceneObject();
63 
66  virtual void setOcclusionEnabled( bool enabled );
67 
69  virtual void setRibbonSpacing( float spacing );
70 
75  virtual void setRibbonLength( int maxSamples );
76 
78  virtual void setColor( const osg::Vec4& color );
79 
81  virtual void setVisible( bool isVisible ) {}
82 
84  virtual void update();
85 
86  osg::Node* sensorNode()
87  {
88  if(myRibbon)
89  {
90  return myRibbon->node();
91  }else
92  {
93  return NULL;
94  }
95  }
96 
97  const osg::Node* sensorNode() const
98  {
99  if(myRibbon)
100  {
101  return myRibbon->node();
102  }else
103  {
104  return NULL;
105  }
106  }
107 
108  protected:
109 
111 
114 
116  virtual osg::Node* findFromCache( DtModelDefinition& definition );
117 
118  protected:
119 
120  osg::ref_ptr<DtOsgRibbon> myRibbon;
126  osg::Vec4 myColor;
127 
128  boost::signalslib::connection myBoundingVolumeConnection;
129  boost::signalslib::connection myParentSceneObjectConnection;
130 
131  };
132 
133 
137  : public DtModelInstanceCreator
138  {
139  public:
140 
142  static void registerCreator( DtDe& de );
143 
145  virtual ~DtRibbonModelInstanceCreator();
146 
148  virtual DtModelInstance* create( DtDe& de );
149 
150  protected:
151 
154 
155  };
156 
157 }

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)