VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtPostProcessManager.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * Copyright (c) 2023 MAK Technologies, Inc.
3 * All rights reserved.
4 *****************************************************************************/
5 
6 #pragma once
7 
11 
13 
15 
16 #include <unordered_map>
17 
18 namespace makVrv
19 {
20  class DtPostProcessor;
21  class DtOsgChannel;
22  class DtObserverObject;
23 
28  {
29  public:
30 
31  typedef std::map<std::string, DtPostProcessor*> ProcessorTypeToPostProcessorMap;
32 
34 
35  virtual ~DtPostProcessManager();
36 
39  virtual void update(DtChannel *inChannel);
40 
42  bool hasPostProcessor(DtChannel* channel, const std::string& processorType);
43 
45  bool enablePostProcessor(DtChannel* channel, const std::string& processorType);
47  bool disablePostProcessor(DtChannel* channel, const std::string& processorType);
49 
51  bool hasEffect(DtChannel* channel, const std::string& effect);
52 
54  bool enableEffect(DtChannel* channel, const std::string& effect);
56  bool disableEffect(DtChannel* channel, const std::string& effect);
58 
60  bool enableEffects(DtChannel* channel, EffectNameList& effectPostList);
62  bool disableEffects(DtChannel* channel, EffectNameList& effectPostList);
64 
66  DtPostProcessor* postProcessorFromType(DtChannel* channel, const std::string& type);
67 
70  DtPostProcessor* lastPostProcessorInChain(DtChannel* channel);
71 
73  ProcessorTypeToPostProcessorMap* postProcessorTypeMap(DtChannel* channel);
74 
75  protected:
77  virtual void slot_channelCreated(DtChannelManager* channelManager,
78  DtChannel* channel);
79 
82  virtual void slot_channelDestroyed(DtChannelManager* channelManager,
83  DtChannel* channel);
84 
86  virtual void slot_observerSettingChanged( DtObserverObject* observer,
87  int setting, bool value );
88 
91  bool setPostProcessorEnable(DtChannel* channel,
92  const std::string& processorType, bool enabled);
93 
95  bool setEffectEnable(DtChannel* channel,
96  const std::string& effect, bool enabled);
97 
100  DtPostProcessor* postProcessorFromEffect(DtChannel* channel, const std::string& effect);
101 
104  void deletePostProcessorMaps(DtChannel *channel);
105 
106 
107  protected:
109 
110  // Per channel { "myeffect", DtPostProcessor* }
111  typedef std::map<std::string, DtPostProcessor*> EffectToPostProcessorMap;
112  typedef std::unordered_map<DtChannel*, EffectToPostProcessorMap> ChannelEffectToPostMap;
113 
114  // Per channel { "myPostProcessorType", DtPostProcessor* } in order
115  typedef std::unordered_map<DtChannel*, ProcessorTypeToPostProcessorMap> ChannelTypeToPostMap;
116 
117  typedef std::map<DtChannel*, DtPostProcessor*> ChannelToPostProcessorMap;
118 
119  // per channel map of post processor effect names and the
120  // corresponding DtPostProcessor*
122 
123  // per channel map of post processor type names and the
124  // corresponding DtPostProcessor*
126 
128  };
129 
131  {
132  public:
133 
136  virtual DtPostProcessManagerInterface* create(DtDe& de);
137  };
138 }
Definition: DtPostProcessManager.h:130
ChannelEffectToPostMap myEffectToPostProcessorMap
Definition: DtPostProcessManager.h:121
std::unordered_map< DtChannel *, EffectToPostProcessorMap > ChannelEffectToPostMap
Definition: DtPostProcessManager.h:112
ChannelToPostProcessorMap myChannelToLastPostProcessorInChainMap
Definition: DtPostProcessManager.h:127
This class provides the management of post processors and their post processing effects.
Definition: DtPostProcessManagerInterface.h:24
Creator for a DtPostProcessManagerInterface.
Definition: DtPostProcessManagerInterface.h:84
std::unordered_map< DtChannel *, ProcessorTypeToPostProcessorMap > ChannelTypeToPostMap
Definition: DtPostProcessManager.h:115
The abstract Channel Class.
Definition: DtChannel.h:35
std::map< std::string, DtPostProcessor * > EffectToPostProcessorMap
Definition: DtPostProcessManager.h:111
This abstract base class defines the interface for OS-specific keyboard and mouse event listeners...
Definition: DtObserverObject.h:32
This class provides the OSG-specific management of post-processing effects.
Definition: DtPostProcessManager.h:27
#define DT_DLL_VRVPOSTPROCESSOR
Definition: vrvPostProcessor.h:19
Contains DLL export macros.
Base class for handling DtChannels. Derived classes should override the tick() method and advance the...
Definition: DtChannelManager.h:32
Contains makVrv::DtPostProcessManagerInterface class.
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
std::map< std::string, DtPostProcessor * > ProcessorTypeToPostProcessorMap
Definition: DtPostProcessManager.h:31
ChannelTypeToPostMap myPostProcessorTypeToPostProcessorMap
Definition: DtPostProcessManager.h:125
std::map< DtChannel *, DtPostProcessor * > ChannelToPostProcessorMap
Definition: DtPostProcessManager.h:117
This class provides the OSG-specific implementation of a post processor. A post processor has a type ...
Definition: DtPostProcessor.h:66
std::list< std::string > EffectNameList
List of effect names.
Definition: DtPostProcessManagerInterface.h:28

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)