VR-Forces 5.0.1 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) 2021 MAK Technologies, Inc.
3 * All rights reserved.
4 *****************************************************************************/
5 
6 #pragma once
7 
11 
13 
15 
16 namespace makVrv
17 {
18  class DtPostProcessor;
19  class DtOsgChannel;
20  class DtObserverObject;
21 
26  {
27  public:
28 
29  typedef std::map<std::string, DtPostProcessor*> ProcessorTypeToPostProcessorMap;
30 
32 
33  virtual ~DtPostProcessManager();
34 
37  virtual void update(DtChannel *inChannel);
38 
40  bool hasPostProcessor(DtChannel* channel, const std::string& processorType);
41 
43  bool enablePostProcessor(DtChannel* channel, const std::string& processorType);
45  bool disablePostProcessor(DtChannel* channel, const std::string& processorType);
47 
49  bool hasEffect(DtChannel* channel, const std::string& effect);
50 
52  bool enableEffect(DtChannel* channel, const std::string& effect);
54  bool disableEffect(DtChannel* channel, const std::string& effect);
56 
58  bool enableEffects(DtChannel* channel, EffectNameList& effectPostList);
60  bool disableEffects(DtChannel* channel, EffectNameList& effectPostList);
62 
64  DtPostProcessor* postProcessorFromType(DtChannel* channel, const std::string& type);
65 
68  DtPostProcessor* lastPostProcessorInChain(DtChannel* channel);
69 
71  ProcessorTypeToPostProcessorMap* postProcessorTypeMap(DtChannel* channel);
72 
73  protected:
75  virtual void slot_channelCreated(DtChannelManager* channelManager,
76  DtChannel* channel);
77 
80  virtual void slot_channelDestroyed(DtChannelManager* channelManager,
81  DtChannel* channel);
82 
84  virtual void slot_observerSettingChanged( DtObserverObject* observer,
85  int setting, bool value );
86 
89  bool setPostProcessorEnable(DtChannel* channel,
90  const std::string& processorType, bool enabled);
91 
93  bool setEffectEnable(DtChannel* channel,
94  const std::string& effect, bool enabled);
95 
98  DtPostProcessor* postProcessorFromEffect(DtChannel* channel, const std::string& effect);
99 
102  void deletePostProcessorMaps(DtChannel *channel);
103 
104 
105  protected:
107 
108  // Per channel { "myeffect", DtPostProcessor* }
109  typedef std::map<std::string, DtPostProcessor*> EffectToPostProcessorMap;
110  typedef boost::unordered_map<DtChannel*, EffectToPostProcessorMap> ChannelEffectToPostMap;
111 
112  // Per channel { "myPostProcessorType", DtPostProcessor* } in order
113  typedef boost::unordered_map<DtChannel*, ProcessorTypeToPostProcessorMap> ChannelTypeToPostMap;
114 
115  typedef std::map<DtChannel*, DtPostProcessor*> ChannelToPostProcessorMap;
116 
117  // per channel map of post processor effect names and the
118  // corresponding DtPostProcessor*
120 
121  // per channel map of post processor type names and the
122  // corresponding DtPostProcessor*
124 
126  };
127 
129  {
130  public:
131 
134  virtual DtPostProcessManagerInterface* create(DtDe& de);
135  };
136 }
Definition: DtPostProcessManager.h:128
ChannelEffectToPostMap myEffectToPostProcessorMap
Definition: DtPostProcessManager.h:119
ChannelToPostProcessorMap myChannelToLastPostProcessorInChainMap
Definition: DtPostProcessManager.h:125
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
The abstract Channel Class.
Definition: DtChannel.h:35
std::map< std::string, DtPostProcessor * > EffectToPostProcessorMap
Definition: DtPostProcessManager.h:109
This abstract base class defines the interface for OS-specific keyboard and mouse event listeners...
Definition: DtObserverObject.h:29
This class provides the OSG-specific management of post-processing effects.
Definition: DtPostProcessManager.h:25
boost::unordered_map< DtChannel *, EffectToPostProcessorMap > ChannelEffectToPostMap
Definition: DtPostProcessManager.h:110
#define DT_DLL_VRVPOSTPROCESSOR
Definition: vrvPostProcessor.h:19
Contains DLL export macros.
boost::unordered_map< DtChannel *, ProcessorTypeToPostProcessorMap > ChannelTypeToPostMap
Definition: DtPostProcessManager.h:113
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:70
std::map< std::string, DtPostProcessor * > ProcessorTypeToPostProcessorMap
Definition: DtPostProcessManager.h:29
ChannelTypeToPostMap myPostProcessorTypeToPostProcessorMap
Definition: DtPostProcessManager.h:123
std::map< DtChannel *, DtPostProcessor * > ChannelToPostProcessorMap
Definition: DtPostProcessManager.h:115
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 Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)