VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgGraphMergeOperation.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
15 
16 #include <osg/OperationThread>
17 
18 #include <osgEarth/SceneGraphCallback>
19 
20 #include <tbb/concurrent_priority_queue.h>
21 
22 namespace makVrv
23 {
24  class DtDe;
25 
27 
28  class DtOsgGraphMergeOperation;
29 
31  template <>
32  inline const char* creatorTypeName<makVrv::DtOsgGraphMergeOperation>( void )
33  {
34  return "DtOsgGraphMergeOperationCreator";
35  }
38 
41  class DT_DLL_VRVOSG DtOsgGraphMergeOperation : public osg::Operation
42  {
43  public:
45 
47  virtual ~DtOsgGraphMergeOperation();
48 
50  {
52  : myIoslatedGroup( nullptr )
53  , myLiveParentGroup( nullptr )
54  , myPriority( 0 )
55  {
56 
57  };
58 
60  osg::ref_ptr<osg::Group> isolated,
61  osg::ref_ptr<osg::Group> parentLive,
62  int priority )
63  : myIoslatedGroup( isolated )
64  , myLiveParentGroup( parentLive )
65  , myPriority( priority )
66  {
67  };
68 
69  bool operator<( const GroupsToBeMergedStruct& rhs ) const
70  {
71  return myPriority < rhs.myPriority;
72  }
73 
79  };
80 
81  protected:
84 
85  public:
88  DtOsgGraphMergeOperation() = delete;
89  DtOsgGraphMergeOperation& operator=( const DtOsgGraphMergeOperation& rhs ) = delete;
90  DtOsgGraphMergeOperation& operator=( const DtOsgGraphMergeOperation&& rhs ) = delete;
92  DtOsgGraphMergeOperation( const DtOsgGraphMergeOperation&& rhs ) = delete;
94  public:
96  virtual void operator() ( osg::Object* obj ) override;
97 
98  virtual void addMergeOperation( osg::ref_ptr<osg::Group> isolated, osg::ref_ptr<osg::Group> parentLive, int priority );
99  protected:
101 
102  tbb::concurrent_priority_queue< GroupsToBeMergedStruct > myMergeOps;
103  };
104 }
DtDe & myDe
Definition: DtOsgGraphMergeOperation.h:100
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
bool operator<(const GroupsToBeMergedStruct &rhs) const
Definition: DtOsgGraphMergeOperation.h:69
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
tbb::concurrent_priority_queue< GroupsToBeMergedStruct > myMergeOps
Definition: DtOsgGraphMergeOperation.h:102
GroupsToBeMergedStruct()
Definition: DtOsgGraphMergeOperation.h:51
Definition: DtOsgGraphMergeOperation.h:49
friend DtOsgGraphMergeOperationCreator
Definition: DtOsgGraphMergeOperation.h:44
int myPriority
Definition: DtOsgGraphMergeOperation.h:78
DtOsgGraphMergeOperation adds a non-live isolated child Group onto a parent Group which is already li...
Definition: DtOsgGraphMergeOperation.h:41
GroupsToBeMergedStruct(osg::ref_ptr< osg::Group > isolated, osg::ref_ptr< osg::Group > parentLive, int priority)
Definition: DtOsgGraphMergeOperation.h:59
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::ref_ptr< osg::Group > myIoslatedGroup
Child Group.
Definition: DtOsgGraphMergeOperation.h:77
osg::ref_ptr< osg::Group > myLiveParentGroup
Parent Group, already live.
Definition: DtOsgGraphMergeOperation.h:75

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)