VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCameraNode.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 #include <vrvOsg/vrvOsg.h>
12 
13 #include <osg/Camera>
14 
15 #include <boost/signals.hpp>
16 
17 #include <queue>
18 
19 namespace osg
20 {
21  class RenderInfo;
22  class State;
23 }
24 
25 namespace makVrv
26 {
27  class DtGlDebugger;
30  class DT_DLL_VRVOSG DtCameraNode : public osg::Camera
31  {
32  public:
33 
36  {
37  PriorityHighest = 0,
38  PriorityNormal = 5,
39  PriorityLowest = 10
40  };
41 
43  DtCameraNode();
44 
46  META_Node(vrvOsg, DtCameraNode);
47 
49  DtCameraNode(const DtCameraNode& camera,
50  const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
51 
53  DtCameraNode(const osg::Camera& camera,
54  const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
55 
60  virtual void addPostDrawCallback(osg::Camera::DrawCallback* callback,
61  unsigned int priority = PriorityNormal);
62 
64  virtual void removePostDrawCallback(osg::Camera::DrawCallback* callback);
65 
67  void setPostDrawCallback(osg::Camera::DrawCallback* cb);
68 
71  virtual void releaseGLObjects(osg::State* state = 0) const;
72 
73  protected:
75  virtual ~DtCameraNode();
76 
77  protected:
82  {
83  public:
85 
86  VrvPostDrawCallback(const VrvPostDrawCallback&, const osg::CopyOp&);
87 
88  META_Object(vrvOsg, VrvPostDrawCallback);
89 
91  virtual void operator() (osg::RenderInfo& renderInfo) const;
92  };
93 
94  friend class VrvPostDrawCallback;
95  public:
98  {
100  unsigned int priority;
101  };
102 
103  typedef std::list<PriorityDrawCallback> CallbackQueue;
104 
106  CallbackQueue getCallbackQueue();
107 
109  void setCallbackQueue(const CallbackQueue& cbq);
110 
111  protected:
114  friend struct PriorityDrawCallbackComparator;
115 
117  {
118  public:
119  bool operator()(const PriorityDrawCallback& lhs, const PriorityDrawCallback& rhs);
120  };
121 
124  friend struct CallbackMatch;
125 
127  {
129  bool operator()(PriorityDrawCallback& rhs);
130  };
131 
132  //typedef std::vector<PriorityDrawCallback> CallbackQueue;
134 
137  };
138 }
std::list< PriorityDrawCallback > CallbackQueue
Definition: DtCameraNode.h:103
VR-Vantage&#39;s post draw callback.
Definition: DtCameraNode.h:81
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
unsigned int priority
Definition: DtCameraNode.h:100
DtGlDebugger * myGLDebugger
Definition: DtCameraNode.h:136
CallbackPriority
Post draw callback default priority levels.
Definition: DtCameraNode.h:35
osg::ref_ptr< osg::Camera::DrawCallback > callback
Definition: DtCameraNode.h:99
Definition: DtGlDebugger.h:16
VR-Vantage specific subclass of OSG camera.
Definition: DtCameraNode.h:30
Wrapper to add a priority value to a draw callback.
Definition: DtCameraNode.h:97
Definition: DtCameraNode.h:126
Contains DLL export macros.
osg::Camera::DrawCallback * callback
Definition: DtCameraNode.h:128
bool myEnableDebugging
Definition: DtCameraNode.h:135
CallbackQueue myCallbackQueue
Definition: DtCameraNode.h:133

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)