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) 2025 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 #include <osg/State>
21 
22 #include <vrvMath/DtCamera.h>
24 #include <vrvMath/DtVector4.h>
25 
28 
31 
32 #include <matrix/vlVector.h>
33 
34 #include <vector>
35 
36 
37 namespace makVrv
38 {
39  // Forward declarations.
40  class Dt3dLinesCameraRenderer;
41  class Dt3dSpheresCameraRenderer;
42  class DtOsgComponentSystemDrawable;
44 
45 
48 
50  template <>
51  inline const char* creatorTypeName<DtOsgComponentSystemNode>(void) { return "DtOsgComponentSystemNodeCreator"; }
52 
53 
82  class DT_DLL_VRVOSG DtOsgComponentSystemNode : public osg::Group
83  {
84  public:
85 
88 
90  DtOsgComponentSystemNode(const DtOsgComponentSystemNode& orig, const osg::CopyOp& opr);
91 
93  virtual ~DtOsgComponentSystemNode();
94 
96  DtOsgComponentSystemNode() = delete;
97 
100 
102  DtOsgComponentSystemNode &operator=(const DtOsgComponentSystemNode &other) = delete;
103 
104  public:
105 
107  virtual void releaseGLObjects(osg::State* state = 0) const override;
108 
110  virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new DtOsgComponentSystemNode(*this, copyop); }
111  virtual osg::Object* cloneType() const { return NULL; }
112 
114  virtual void deleteGeode();
115 
122  virtual void drawObjects(osg::RenderInfo& renderInfo,
123  const DtOsgComponentSystemDrawable& drawable);
124 
125  protected:
126 
128  virtual void slot_reloadShaders();
129 
131  virtual void traverse(osg::NodeVisitor& nv);
132 
137  virtual bool cullObjects(osg::Camera* cam, const DtModelSetId modelSetId);
138 
141  virtual void restoreOsgState(osg::State* state);
142 
145  virtual bool drawGeom3dLinesSystem(osg::RenderInfo& renderInfo,
146  osg::Camera* camera, bool skyRendering);
147 
150  virtual bool drawGeom3dSpheresSystem(osg::RenderInfo& renderInfo,
151  osg::Camera* camera, bool skyRendering);
152 
153  protected:
154 
156 
158 
161 
163 
164  // If using multiple contexts, then create one of these
165  // for each. For a single context, 1 is fine.
168 
169  private:
170 
173  osg::Node* getChildNodeByName(osg::Group* parent, const char* name);
174 
177  void connectSignals();
178  };
179 
180 }
181 
182 
const char * creatorTypeName< DtOsgComponentSystemNode >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtOsgComponentSystemNode.h:51
The DtRenderer owns the component systems that draw. This class is a group node which serves as a nod...
Definition: DtOsgComponentSystemNode.h:82
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Dt3dLinesCameraRenderer * myGeom3dLinesCameraRenderer
Definition: DtOsgComponentSystemNode.h:166
4 dimensional vector
DtVirtualBaseClassCreator< DtOsgComponentSystemNode > DtOsgComponentSystemNodeCreator
creator
Definition: DtOsgComponentSystemNode.h:43
Frustum_64 myFrustum
Definition: DtOsgComponentSystemNode.h:162
Camera forward declarations.
osg::ref_ptr< osg::Drawable > myDrawable
Definition: DtOsgComponentSystemNode.h:160
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
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:111
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtSignalConnectionManager myConnections
Definition: DtOsgComponentSystemNode.h:157
Dt3dSpheresCameraRenderer * myGeom3dSpheresCameraRenderer
Definition: DtOsgComponentSystemNode.h:167
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:110
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
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:159
Contains various enum classes relating to model sets.
DtDe & myDe
Definition: DtOsgComponentSystemNode.h:155

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)