VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtRibbonModelInstance.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2012 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 
119  protected:
120 
121  osg::ref_ptr<DtOsgRibbon> myRibbon;
127  osg::Vec4 myColor;
128 
129  };
130 
131 
135  : public DtModelInstanceCreator
136  {
137  public:
138 
140  static void registerCreator( DtDe& de );
141 
143  virtual ~DtRibbonModelInstanceCreator();
144 
146  virtual DtModelInstance* create( DtDe& de );
147 
148  protected:
149 
152 
153  };
154 
155 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)