VR-Forces 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) 2025 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 DtDe;
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(DtDe& de);
43 
45  DtCameraNode(const DtCameraNode& camera, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
46 
48  DtCameraNode(DtDe& de, const osg::Camera& camera, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
49 
51  DtCameraNode() = delete;
52 
54  DtCameraNode& operator=(const DtCameraNode& rhs) = delete;
55  public:
57  //META_Node(vrvOsg, DtCameraNode);
58  // actually declare/defines this, since we want DtCameraNode to take DtDe
59  virtual osg::Object* cloneType() const override;
60  virtual osg::Object* clone(const osg::CopyOp& copyop) const override;
61  virtual bool isSameKindAs(const osg::Object* obj) const override;
62  virtual const char* className() const override;
63  virtual const char* libraryName() const override;
64  virtual void accept(osg::NodeVisitor& nv) override;
65  public:
70  virtual void addPostDrawCallback(osg::Camera::DrawCallback* callback,
71  unsigned int priority = PriorityNormal);
72 
74  virtual void removePostDrawCallback(osg::Camera::DrawCallback* callback);
75 
77  virtual bool containsPostDrawCallback(osg::Camera::DrawCallback* callback);
78 
80  virtual void setPostDrawCallback(osg::Camera::DrawCallback* cb);
81 
84  virtual void releaseGLObjects(osg::State* state = 0) const;
85 
86  protected:
88  virtual ~DtCameraNode();
89 
90  protected:
95  {
96  public:
98 
99  VrvPostDrawCallback(const VrvPostDrawCallback&, const osg::CopyOp&);
100 
101  META_Object(vrvOsg, VrvPostDrawCallback);
102 
104  virtual void operator() (osg::RenderInfo& renderInfo) const;
105  };
106 
107  friend class VrvPostDrawCallback;
108  public:
111  {
113  unsigned int priority;
114  };
115 
116  typedef std::list<PriorityDrawCallback> CallbackQueue;
117  public:
119  virtual CallbackQueue getCallbackQueue();
120 
122  virtual void setCallbackQueue(const CallbackQueue& cbq);
123 
125  virtual void setupOpenglDebugging();
126 
127  protected:
129  void setupCallbacks();
130 
131  protected:
134  friend struct PriorityDrawCallbackComparator;
135 
137  {
138  public:
139  bool operator()(const PriorityDrawCallback& lhs, const PriorityDrawCallback& rhs);
140  };
141 
144  friend struct CallbackMatch;
145 
147  {
149  bool operator()(PriorityDrawCallback& rhs);
150  };
151 
152  //typedef std::vector<PriorityDrawCallback> CallbackQueue;
154 
158  };
159 }
std::list< PriorityDrawCallback > CallbackQueue
Definition: DtCameraNode.h:116
VR-Vantage&#39;s post draw callback.
Definition: DtCameraNode.h:94
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
unsigned int priority
Definition: DtCameraNode.h:113
CallbackPriority
Post draw callback default priority levels.
Definition: DtCameraNode.h:34
osg::ref_ptr< osg::Camera::DrawCallback > callback
Definition: DtCameraNode.h:112
bool myDebuggerActive
Definition: DtCameraNode.h:156
DtDe & myDe
Definition: DtCameraNode.h:157
VR-Vantage specific subclass of OSG camera.
Definition: DtCameraNode.h:29
Wrapper to add a priority value to a draw callback.
Definition: DtCameraNode.h:110
Definition: DtCameraNode.h:146
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
osg::Camera::DrawCallback * callback
Definition: DtCameraNode.h:148
bool myEnableDebugging
Definition: DtCameraNode.h:155
CallbackQueue myCallbackQueue
Definition: DtCameraNode.h:153

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)