VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtHatHotResponder.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCigi/vrvCigi.h>
13 #include <vrvCore/DtUniqueID.h>
14 
17 
18 
19 #include <map>
20 
21 #include <matrix/vlVector.h>
22 
23 #include <vrvUtil/signalslib.h>
24 
25 class CigiBaseHatHotReq;
26 class CigiHatHotReqV3_2;
27 class CigiHatHotReqV4;
28 
29 namespace makVrv
30 {
31  class DtCigiEntityVisualizer;
32  class DtCigiConnection;
33 
39  {
40  public:
43  {
44  Hat = 0,
45  Hot = 1,
46  Extended = 2
47  };
48 
61  {
62  unsigned short hatHotId;
68  unsigned int lastHostFrameNumber;
69  };
70 
74  {
75  unsigned short hatHotId;
76  bool valid;
78  unsigned int lastHostFrameNumber;
79  double hatValue;
80  double hotValue;
81  int materialCode; // This is a DtElementType
84  };
85 
87 
89  virtual ~DtHatHotResponder();
90 
92  virtual void processHatHotRequests();
93 
95  vrvSignalsLib::signal<void ( const DtHatHotRequestData& )> signal_hatHotRequested;
96 
97  protected:
100 
103  void processHatHotRequest( CigiBaseHatHotReq& hatHotReq);
104 
107  void processHatHotV3( CigiHatHotReqV3_2 &hatHotReq);
108 
111  void processHatHotV4( CigiHatHotReqV4 &hatHotReq);
112 
113 
116  virtual void sendHatHotRequest( DtHatHotRequestData& request );
117 
118  protected:
122  typedef std::map<int, DtHatHotRequestData> HatHotRequestMap;
125 
127  };
128 
131  {
132  public:
135 
137  virtual ~DtHatHotResponderCreator();
138 
140  static DtHatHotResponderCreator& instance( DtDe& de );
141 
143  static DtHatHotResponderCreator& instance( DtCigiConnection& con );
144 
146  virtual DtHatHotResponderCreator* clone();
147 
149  static void copyInstance(DtCigiConnection& con, DtDe& de);
150 
152  virtual DtHatHotResponder* create( DtCigiConnection& connection ) const;
153  };
154 }
HatHotType
Enum for the HATHOT Response Type.
Definition: DtHatHotResponder.h:42
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
bool valid
Definition: DtHatHotResponder.h:76
A DtHatHotResponder receives HAT/HOT requests from CIGI and either initiates an immediate request or ...
Definition: DtHatHotResponder.h:38
std::map< int, DtHatHotRequestData > HatHotRequestMap
Int key here is mapped to the HATHOT ID from packet. Note this map is only used if the requests are c...
Definition: DtHatHotResponder.h:122
float normalAzimuth
Definition: DtHatHotResponder.h:82
double hotValue
Definition: DtHatHotResponder.h:80
HatHotType responseType
Definition: DtHatHotResponder.h:77
DtVector location
Definition: DtHatHotResponder.h:64
unsigned int lastHostFrameNumber
Definition: DtHatHotResponder.h:68
Struct for HatHotResponseData. Unused in this class, used by intersection handler and the networkIO...
Definition: DtHatHotResponder.h:73
Contains DLL export macros.
HatHotRequestMap myHatHotRequests
Definition: DtHatHotResponder.h:123
Contains makVrv::DtVirtualBaseClass class.
Struct storage for the HatHotRequest Data Passed to the DtCigiIntersectionHandler for processing...
Definition: DtHatHotResponder.h:60
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
double hatValue
Definition: DtHatHotResponder.h:79
DtUniqueID entityId
Definition: DtHatHotResponder.h:63
int numberOfFramesBeforeSending
Definition: DtHatHotResponder.h:65
This class is responsible for the actual processing of CIGI data. This holds the entity visualizer...
Definition: DtCigiConnection.h:57
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
DtSignalConnectionManager myConnections
Definition: DtHatHotResponder.h:126
unsigned short hatHotId
Definition: DtHatHotResponder.h:62
float normalElevation
Definition: DtHatHotResponder.h:83
Base class to provide boost signal/slot management.
int lastFrameSent
Definition: DtHatHotResponder.h:66
Creator class for the DtHatHotResponder.
Definition: DtHatHotResponder.h:130
Contains makVrv::DtUniqueID type.
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
DtCigiConnection & myConnection
Definition: DtHatHotResponder.h:124
#define DT_DLL_VRVCIGI
Definition: vrvCigi.h:19
unsigned int lastHostFrameNumber
Definition: DtHatHotResponder.h:78
unsigned short hatHotId
Definition: DtHatHotResponder.h:75
HatHotType requestType
Definition: DtHatHotResponder.h:67
int materialCode
Definition: DtHatHotResponder.h:81
vrvSignalsLib::signal< void(const DtHatHotRequestData &)> signal_hatHotRequested
Signal caught by the intersection handler.
Definition: DtHatHotResponder.h:95

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)