VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtChannelKeyword3dViewCompass.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
14 
16 
17 #include <string>
18 
19 namespace makVrv
20 {
21  class DtDe;
22  class DtChannelConfiguration;
23  class DtWindowConfiguration;
24  class DtChannel3dViewCompassAgent;
25  class DtObserver;
26  class DtObserverObject;
27  class DtInputDriver;
28 
32  {
33  public:
34 
37 
40 
43 
46 
48  DtChannelKeyword3dViewCompass &operator=(const DtChannelKeyword3dViewCompass &other) = delete;
49 
53  virtual void channelNameChanged( const std::string& displayName,
54  const std::string& windowName, const std::string& channelName );
55 
58  virtual void channelConfigurationChanged(
59  const DtChannelConfiguration& config );
60 
64  const DtWindowConfiguration& config ) {}
65 
67  DtChannel3dViewCompassAgent* compassAgent();
68 
69  protected:
70 
71  // Slots for responding to observer-related signals
72 
73  // Called when an observer is created, so that we can connect to an observer that
74  // didn't exist when the compass itself was created
75  virtual void slot_observerCreated( DtInputDriver*, DtObserver* observer );
76 
77  // Called when an observer is about to be destroyed, so we can disconnect from the
78  // observer mode changed signal and set myObserver to Null
79  virtual void slot_observerToBeDestroyed( DtInputDriver*, DtObserver* observer );
80 
81  // Called when an observer's observer mode changes, so we can determine if we need
82  // to create or destroy a compass
83  virtual void slot_observerModeChanged( DtObserver* observer, int newMode );
84 
85  // Called when an observer mode's setting changes; if its the mode our observer is
86  // using and the setting is DisplayCompass, we may need to create or destroy
87  // a compass
88  virtual void slot_observerModeSettingChanged( int mode, int setting );
89 
90  // Called when an observer projection setting changes; if its the mode our observer is
91  // using, we may need to create or destroy a compass
92  virtual void slot_observerProjectionChanged(DtObserverObject* observerObject, bool is2D);
93 
94  // Helper methods
95 
96  // Set myObserver to the specified observer and connect to the observerModeChanged
97  // signal
98  virtual void connectToObserver( DtObserver* observer );
99 
100  // Look up the observer by name, cache the observer name, and call connectToObserver
101  // with the found observer
102  virtual void connectToObserver( const std::string& observerName );
103 
104  // Disconnect from the current observer's observerModeChanged signal, delete the
105  // the compass agent if it exists, and set myObserver and myCompassAgent
106  // to Null
107  virtual void disconnectFromObserver();
108 
109  // This function looks up the display compass observer setting value and creates
110  // or destroys a compass as needed
111  virtual void updateCompassState();
112 
113  protected:
114 
116  DtChannelKeyword3dViewCompass( DtDe& de, const std::string& keyword,
117  const std::string& displayName, const std::string& windowName,
118  const DtChannelConfiguration& channelConfig, bool is2D );
119 
120  protected:
121 
122  DtChannel3dViewCompassAgent* myCompassAgent;
123  std::string myObserverName;
125  std::string myKeyword;
126  std::string myDisplayName;
127  std::string myWindowName;
128  std::string myChannelName;
130  bool myIs2D;
131  };
132 
133 
137  {
138  public:
141 
144 
147 
150 
152  virtual DtChannelKeywordObject* createChannelKeywordObject(DtDe& de,
153  const std::string& displayName, const std::string& windowName,
154  const DtChannelConfiguration& channelConfig);
155 
156  public:
157  static std::string keyword();
158 
159  protected:
160  std::string myKeyword;
161  };
162 }
163 
164 
The polymorphic creator for the DtChannelKeyword3dViewCompassCreator.
Definition: DtChannelKeyword3dViewCompass.h:136
The base class for all channel keyword objects.
Definition: DtChannelKeywordObject.h:25
The base class for all channel keyword objects.DtChannelKeyword3dViewCompassCreator.
Definition: DtChannelKeyword3dViewCompass.h:31
std::string myWindowName
Definition: DtChannelKeyword3dViewCompass.h:127
virtual void windowConfigurationChanged(const DtWindowConfiguration &config)
Implementing objects use this method to respond to changes in window configuration other than name...
Definition: DtChannelKeyword3dViewCompass.h:63
std::string myChannelName
Definition: DtChannelKeyword3dViewCompass.h:128
This owns a list of channel configurations.
Definition: DtWindowConfiguration.h:26
std::string myKeyword
Definition: DtChannelKeyword3dViewCompass.h:160
DtSignalConnectionManager myConnections
Definition: DtChannelKeyword3dViewCompass.h:129
bool myIs2D
Definition: DtChannelKeyword3dViewCompass.h:130
Contains makVrv::DtChannelKeywordObject class.
The polymorphic creator for the DtChannelKeywordObject.
Definition: DtChannelKeywordObject.h:68
A facade for a DtObserverObject.
Definition: DtObserver.h:37
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
This abstract base class defines the interface for OS-specific keyboard and mouse event listeners...
Definition: DtObserverObject.h:32
This class&#39;s main responsibility is to handle keyboard and mouse events from OSG (Qt events are route...
Definition: DtInputDriver.h:43
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
Base class to provide boost signal/slot management.
std::string myKeyword
Definition: DtChannelKeyword3dViewCompass.h:125
Configuration for a single channel Serialized and sent to remote displays as necessary to configure r...
Definition: DtChannelConfiguration.h:24
std::string myDisplayName
Definition: DtChannelKeyword3dViewCompass.h:126
const char int mode
Definition: ioapi.h:38
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::string myObserverName
Definition: DtChannelKeyword3dViewCompass.h:123
DtChannel3dViewCompassAgent * myCompassAgent
Definition: DtChannelKeyword3dViewCompass.h:122
DtObserver * myObserver
Definition: DtChannelKeyword3dViewCompass.h:124
Contains DLL export macros.

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)