VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgComponentSystemNode.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
15 
16 #include <osg/Camera>
17 #include <osg/Group>
18 #include <osg/Geode>
19 #include <osg/Drawable>
20 
21 #include <vrvMath/DtCamera.h>
23 #include <vrvMath/DtVector4.h>
24 
27 
30 
31 #include <matrix/vlVector.h>
32 
33 #include <vector>
34 
35 
36 namespace makVrv
37 {
38  // Forward declarations.
39  class Dt3dLinesCameraRenderer;
40  class Dt3dSpheresCameraRenderer;
41  class DtOsgComponentSystemDrawable;
43 
44 
47 
49  template <>
50  inline const char* creatorTypeName<DtOsgComponentSystemNode>(void) { return "DtOsgComponentSystemNodeCreator"; }
51 
52 
81  class DT_DLL_VRVOSG DtOsgComponentSystemNode : public osg::Group
82  {
83  public:
84 
87 
89  DtOsgComponentSystemNode(const DtOsgComponentSystemNode& orig, const osg::CopyOp& opr);
90 
92  virtual ~DtOsgComponentSystemNode();
93 
95  DtOsgComponentSystemNode() = delete;
96 
99 
101  DtOsgComponentSystemNode &operator=(const DtOsgComponentSystemNode &other) = delete;
102 
103  public:
104 
106  virtual void releaseGLObjects(osg::State* state = 0) const override;
107 
109  virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new DtOsgComponentSystemNode(*this, copyop); }
110  virtual osg::Object* cloneType() const { return NULL; }
111 
113  virtual void deleteGeode();
114 
121  virtual void drawObjects(osg::RenderInfo& renderInfo,
122  const DtOsgComponentSystemDrawable& drawable);
123 
124  protected:
125 
127  virtual void slot_reloadShaders();
128 
130  virtual void traverse(osg::NodeVisitor& nv);
131 
136  virtual bool cullObjects(osg::Camera* cam, const DtModelSetId modelSetId);
137 
140  virtual void drawGeom3dLinesSystem(osg::RenderInfo& renderInfo,
141  osg::Camera* camera, bool skyRendering);
142 
145  virtual void drawGeom3dSpheresSystem(osg::RenderInfo& renderInfo,
146  osg::Camera* camera, bool skyRendering);
147 
148  protected:
149 
151 
153 
156 
158 
159  // If using multiple contexts, then create one of these
160  // for each. For a single context, 1 is fine.
163 
164  private:
165 
168  osg::Node* getChildNodeByName(osg::Group* parent, const char* name);
169 
172  void connectSignals();
173  };
174 
175 }
176 
177 
const char * creatorTypeName< DtOsgComponentSystemNode >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtOsgComponentSystemNode.h:50
The DtRenderer owns the component systems that draw. This class is a group node which serves as a nod...
Definition: DtOsgComponentSystemNode.h:81
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Dt3dLinesCameraRenderer * myGeom3dLinesCameraRenderer
Definition: DtOsgComponentSystemNode.h:161
4 dimensional vector
DtVirtualBaseClassCreator< DtOsgComponentSystemNode > DtOsgComponentSystemNodeCreator
creator
Definition: DtOsgComponentSystemNode.h:42
Frustum_64 myFrustum
Definition: DtOsgComponentSystemNode.h:157
Camera forward declarations.
osg::ref_ptr< osg::Drawable > myDrawable
Definition: DtOsgComponentSystemNode.h:155
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
Contains makVrv::DtOsgCullVisitor class.
A class responsible for rendering spheres for a camera context.
Definition: Dt3dSpheresCameraRenderer.h:46
virtual osg::Object * cloneType() const
Definition: DtOsgComponentSystemNode.h:110
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtSignalConnectionManager myConnections
Definition: DtOsgComponentSystemNode.h:152
Dt3dSpheresCameraRenderer * myGeom3dSpheresCameraRenderer
Definition: DtOsgComponentSystemNode.h:162
A class responsible for rendering height lines for a camera context.
Definition: Dt3dLinesCameraRenderer.h:46
Base class to provide boost signal/slot management.
A drawable used for drawing items related to cmoponent systems. The class serves as a draw point entr...
Definition: DtOsgComponentSystemDrawable.h:30
Camera class.
Contains DLL export macros.
virtual osg::Object * clone(const osg::CopyOp &copyop) const
required functions for derriving from osg::Group
Definition: DtOsgComponentSystemNode.h:109
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:72
DtModelSetId
Definition: DtModelSetEnums.h:19
Contains the makVrv::DtOsgCullVisitorParameters class. Visual mode information is set into the camera...
osg::ref_ptr< osg::Geode > myGeode
Definition: DtOsgComponentSystemNode.h:154
Contains various enum classes relating to model sets.
DtDe & myDe
Definition: DtOsgComponentSystemNode.h:150

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)