VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtGlStudioDrawable.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 
14 
15 #include <vrvCore/DtUniqueID.h>
16 #include <osg/Drawable>
17 
19 
20 //forward defs
21 class DtString;
22 
23 namespace osgGA
24 {
25  class GUIEventAdapter;
26 }
27 
28 namespace osgViewer
29 {
30  class Viewer;
31 }
32 namespace disti
33 {
34  class ComponentBase;
35  class DisplayEvent;
36 }
37 
38 namespace makVrv
39 {
40 
41 class DtDe;
42 class DtMouseEvent;
43 
44 class DtGlRenderTexture;
45 class DtGlScreenQuad;
46 
49 class DT_DLL_VRVGLSTUDIOSHARED DtGlStudioDrawable : public osg::Drawable
50 {
51 public:
54 
57  DtGlStudioDrawable(disti::ComponentBase *component);
58 
62  const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
63 
65  virtual ~DtGlStudioDrawable();
66 
68  virtual osg::Object* cloneType() const;
69  virtual osg::Object* clone(const osg::CopyOp& copyop) const;
70  virtual bool isSameKindAs(const osg::Object* obj) const;
71  virtual const char* libraryName() const;
72  virtual const char* className() const;
73 
75  virtual bool loadLiveComponent(const std::string& fileName, const std::string& className);
76 
78  virtual void destroyComponent();
79 
83  virtual void setComponent(disti::ComponentBase* comp);
84 
87  virtual disti::ComponentBase* component();
88 
90  virtual bool handleMouseInput(const DtMouseEvent& ea);
91 
93  virtual osg::BoundingBox computeBoundingBox() const;
94 
96  virtual bool supports(osg::PrimitiveFunctor&) const;
97 
103  virtual void accept(osg::PrimitiveFunctor& functor) const;
104 
107  virtual void update(osg::NodeVisitor* visitor, osg::Drawable* drawable);
108 
109  virtual bool cull(osg::NodeVisitor* visitor, osg::Drawable* drawable, osg::State* state=NULL) const;
110 
111  virtual void drawImplementation(osg::RenderInfo& state) const;
112 
113  virtual void setProperty(const std::string& prop, const std::string& val);
114 
115  virtual void setDe(DtDe* de);
116  virtual void setCockpitObject(DtOsgGlStudioCockpit* cockpitObject);
117 
118  virtual void releaseGLObjects(osg::State* state=0) const;
119 
121  virtual void dirtyRenderObjects();
122 
123 protected:
124 
127  virtual void initQuadRendering(osg::Camera* camera) const;
128 
130  virtual void deinitQuadRendering() const;
131 
133  virtual void initRTT(osg::Camera* camera) const;
134 
136  virtual void deinitRTT() const;
137 
139  virtual void slot_reloadShaders();
140 
141 protected:
142 
144  disti::ComponentBase* myComponent;
146 
147  mutable std::map<osg::Camera *, DtGlRenderTexture*> myGLRenderTextures;
148  mutable std::map<osg::Camera *, DtGlScreenQuad*> myGLScreenQuads;
149 
150  mutable osg::ref_ptr<osg::Program> myProgram;
151 
153 };
154 
155 } //makVrv::

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)