VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectSignalBasedSwitchManager.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 namespace osg
17 {
18  class Sequence;
19  class FrameStamp;
20 }
21 
22 
23 namespace makVrv
24 {
25  class DtDe;
26 
29 
32 
34  template <>
35  inline const char* creatorTypeName<DtIndirectSignalBasedSwitchManager>(void) { return "DtIndirectSignalBasedSwitchManagerCreator"; }
36 
43  {
44  public:
47 
50  protected:
53 
54  private:
61 
62  public:
64  virtual void update(const osg::FrameStamp* frameStamp) override;
65 
67  virtual void removeSwitchPaths(int containerInstanceId) override;
68 
70  virtual bool slot_setSequence(osg::Sequence* clone, osg::Sequence* master, int containerInstanceId) override;
71 
72  protected:
74  virtual void addSequence(osg::Sequence* sequence, int containerInstanceId) override;
75 
77  virtual void updateActiveSequences(const osg::FrameStamp* frameStamp);
78 
80  virtual void printInfoMapsSize() const override;
81 
82  protected:
83  //Map the master to the clone or in the default case the master to the master
85  {
86  public:
87  osg::Sequence* mySequence;
88  unsigned int myValue;
89  };
90  typedef std::map<osg::Sequence*, SequenceAndValue > MapOfSequences;
91  typedef std::map<int, MapOfSequences> MapInstanceToMapOfSequences;
93  };
94 }
95 
96 
handles the switches for all the indirect geometry. Sets up the default state of osg::Switch, osgSim::MultiSwitch, and DtDynamicTerrainSwitchNode. Connects to a signal for the DtDynamicTerrainSwitchNode so it can update the indirect buffer when a switch changes. saves off the node path hash for every switch path that is added. Owned by a DtIndirectGeometry 1:1 This manager&#39;s switches get updated per frame via looking at the actual switches/multi-switches
Definition: DtIndirectSwitchManager.h:71
unsigned int myValue
Definition: DtIndirectSignalBasedSwitchManager.h:88
virtual void addSequence(osg::Sequence *sequence, int containerInstanceId) override
add a sequence
DtIndirectSignalBasedSwitchManager & operator=(const DtIndirectSwitchManager &other)=delete
Assignment Operator Not implemented – Assignment Not Allowed.
virtual void printInfoMapsSize() const override
print out map size information
virtual void updateActiveSequences(const osg::FrameStamp *frameStamp)
update
MapInstanceToMapOfSequences myActiveMapSequenceToInfo
Definition: DtIndirectSignalBasedSwitchManager.h:92
osg::Sequence * mySequence
Definition: DtIndirectSignalBasedSwitchManager.h:87
virtual void removeSwitchPaths(int containerInstanceId) override
remove the switch paths/infos associated with an instance
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
Definition: DtIndirectSignalBasedSwitchManager.h:84
virtual void update(const osg::FrameStamp *frameStamp) override
override of DtIndirectSwitchManager::update
virtual bool slot_setSequence(osg::Sequence *clone, osg::Sequence *master, int containerInstanceId) override
set the sequence
This is used for entities indicate whether this manager&#39;s switches get updated directly using signals...
Definition: DtIndirectSignalBasedSwitchManager.h:42
Contains makVrv::DtIndirectSwitchManager class.
std::map< osg::Sequence *, SequenceAndValue > MapOfSequences
Definition: DtIndirectSignalBasedSwitchManager.h:90
std::map< int, MapOfSequences > MapInstanceToMapOfSequences
Definition: DtIndirectSignalBasedSwitchManager.h:91
Contains DLL export macros.
DtVirtualBaseClassCreator< DtIndirectSignalBasedSwitchManager > DtIndirectSignalBasedSwitchManagerCreator
creator
Definition: DtIndirectSignalBasedSwitchManager.h:28
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
const char * creatorTypeName< DtIndirectSignalBasedSwitchManager >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtIndirectSignalBasedSwitchManager.h:35
friend DtIndirectSignalBasedSwitchManagerCreator
only creator can create
Definition: DtIndirectSignalBasedSwitchManager.h:46
DtIndirectSignalBasedSwitchManager()=delete
default constructor not implemented

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)