VR-Forces 5.0.1 Developer's Guide
 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) 2020 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 <queue>
16 
17 namespace osg
18 {
19  class RenderInfo;
20  class State;
21 }
22 
23 namespace makVrv
24 {
25  class DtGlDebugger;
26 
29  class DT_DLL_VRVOSG DtCameraNode : public osg::Camera
30  {
31  public:
32 
35  {
36  PriorityHighest = 0,
37  PriorityNormal = 5,
38  PriorityLowest = 10
39  };
40 
42  DtCameraNode();
43 
45  META_Node(vrvOsg, DtCameraNode);
46 
48  DtCameraNode(const DtCameraNode& camera,
49  const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
50 
52  DtCameraNode(const osg::Camera& camera,
53  const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
54 
59  virtual void addPostDrawCallback(osg::Camera::DrawCallback* callback,
60  unsigned int priority = PriorityNormal);
61 
63  virtual void removePostDrawCallback(osg::Camera::DrawCallback* callback);
64 
66  virtual bool containsPostDrawCallback(osg::Camera::DrawCallback* callback);
67 
69  virtual void setPostDrawCallback(osg::Camera::DrawCallback* cb);
70 
73  virtual void releaseGLObjects(osg::State* state = 0) const;
74 
75  protected:
77  virtual ~DtCameraNode();
78 
79  protected:
84  {
85  public:
87 
88  VrvPostDrawCallback(const VrvPostDrawCallback&, const osg::CopyOp&);
89 
90  META_Object(vrvOsg, VrvPostDrawCallback);
91 
93  virtual void operator() (osg::RenderInfo& renderInfo) const;
94  };
95 
96  friend class VrvPostDrawCallback;
97  public:
100  {
102  unsigned int priority;
103  };
104 
105  typedef std::list<PriorityDrawCallback> CallbackQueue;
106 
108  CallbackQueue getCallbackQueue();
109 
111  void setCallbackQueue(const CallbackQueue& cbq);
112 
113  protected:
116  friend struct PriorityDrawCallbackComparator;
117 
119  {
120  public:
121  bool operator()(const PriorityDrawCallback& lhs, const PriorityDrawCallback& rhs);
122  };
123 
126  friend struct CallbackMatch;
127 
129  {
131  bool operator()(PriorityDrawCallback& rhs);
132  };
133 
134  //typedef std::vector<PriorityDrawCallback> CallbackQueue;
136 
139  };
140 }
std::list< PriorityDrawCallback > CallbackQueue
Definition: DtCameraNode.h:105
VR-Vantage&#39;s post draw callback.
Definition: DtCameraNode.h:83
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
unsigned int priority
Definition: DtCameraNode.h:102
DtGlDebugger * myGLDebugger
Definition: DtCameraNode.h:138
CallbackPriority
Post draw callback default priority levels.
Definition: DtCameraNode.h:34
osg::ref_ptr< osg::Camera::DrawCallback > callback
Definition: DtCameraNode.h:101
Definition: DtGlDebugger.h:16
VR-Vantage specific subclass of OSG camera.
Definition: DtCameraNode.h:29
Wrapper to add a priority value to a draw callback.
Definition: DtCameraNode.h:99
Definition: DtCameraNode.h:128
Contains DLL export macros.
osg::Camera::DrawCallback * callback
Definition: DtCameraNode.h:130
bool myEnableDebugging
Definition: DtCameraNode.h:137
CallbackQueue myCallbackQueue
Definition: DtCameraNode.h:135

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)