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) 2026 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 #include <map>
19 
20 #include <matrix/vlVector.h>
21 
22 #include <vrvUtil/signalslib.h>
23 
24 class CigiBaseHatHotReq;
25 class CigiHatHotReqV3_2;
26 class CigiHatHotReqV4;
27 
28 namespace makVrv
29 {
30  class DtCigiEntityVisualizer;
31  class DtCigiConnection;
32 
38  {
39  public:
42  {
43  Hat = 0,
44  Hot = 1,
45  Extended = 2
46  };
47 
60  {
61  unsigned short hatHotId;
63  DtVector location;
67  unsigned int lastHostFrameNumber;
68  };
69 
73  {
74  unsigned short hatHotId;
75  bool valid;
77  unsigned int lastHostFrameNumber;
78  int materialCode; // This is a DtElementType
81  double hatValue;
82  double hotValue;
83  };
84 
86 
88  virtual ~DtHatHotResponder();
89 
91  virtual void processHatHotRequests();
92 
95  vrvSignalsLib::signal<void ( DtHatHotRequestData*, bool )> signal_hatHotRequested;
96 
98  virtual void reset();
99 
102  DtHatHotResponder() = delete;
103  DtHatHotResponder( const DtHatHotResponder& ) = delete;
104  DtHatHotResponder( DtHatHotResponder&& ) = delete;
105  DtHatHotResponder& operator=( const DtHatHotResponder& ) = delete;
106  DtHatHotResponder& operator=( DtHatHotResponder&& ) = delete;
108  protected:
110  DtHatHotResponder(DtCigiConnection& connection);
111 
114  void processHatHotRequest( CigiBaseHatHotReq& hatHotReq);
115 
118  void processHatHotV3( CigiHatHotReqV3_2 &hatHotReq);
119 
122  void processHatHotV4( CigiHatHotReqV4 &hatHotReq);
123 
125  virtual void sendHatHotRequest( DtHatHotRequestData* request, bool takeOwnership );
126 
128  virtual void cleanUp();
129  protected:
133  using HatHotRequestMap = std::map<int, DtHatHotRequestData*>;
136 
138  };
139 
142  {
143  public:
146 
148  virtual ~DtHatHotResponderCreator();
149 
151  static DtHatHotResponderCreator& instance( DtDe& de );
152 
154  static DtHatHotResponderCreator& instance( DtCigiConnection& con );
155 
157  virtual DtHatHotResponderCreator* clone();
158 
160  static void copyInstance(DtCigiConnection& con, DtDe& de);
161 
163  virtual DtHatHotResponder* create( DtCigiConnection& connection ) const;
164  };
165 }
HatHotType
Enum for the HATHOT Response Type.
Definition: DtHatHotResponder.h:41
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:75
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:133
A DtHatHotResponder receives HAT/HOT requests from CIGI and either initiates an immediate request or ...
Definition: DtHatHotResponder.h:37
float normalAzimuth
Definition: DtHatHotResponder.h:79
double hotValue
Definition: DtHatHotResponder.h:82
HatHotType responseType
Definition: DtHatHotResponder.h:76
DtVector location
Definition: DtHatHotResponder.h:63
unsigned int lastHostFrameNumber
Definition: DtHatHotResponder.h:67
Struct for HatHotResponseData. Unused in this class, used by intersection handler and the networkIO...
Definition: DtHatHotResponder.h:72
Contains DLL export macros.
HatHotRequestMap myHatHotRequests
Definition: DtHatHotResponder.h:134
Contains makVrv::DtVirtualBaseClass class.
Struct storage for the HatHotRequest Data Passed to the DtCigiIntersectionHandler for processing...
Definition: DtHatHotResponder.h:59
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
double hatValue
Definition: DtHatHotResponder.h:81
DtUniqueID entityId
Definition: DtHatHotResponder.h:62
int numberOfFramesBeforeSending
Definition: DtHatHotResponder.h:64
This class is responsible for the actual processing of CIGI data. This holds the entity visualizer...
Definition: DtCigiConnection.h:58
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
DtSignalConnectionManager myConnections
Definition: DtHatHotResponder.h:137
unsigned short hatHotId
Definition: DtHatHotResponder.h:61
float normalElevation
Definition: DtHatHotResponder.h:80
Base class to provide boost signal/slot management.
int lastFrameSent
Definition: DtHatHotResponder.h:65
Creator class for the DtHatHotResponder.
Definition: DtHatHotResponder.h:141
vrvSignalsLib::signal< void(DtHatHotRequestData *, bool)> signal_hatHotRequested
Signal caught by the intersection handler bool for takeOwnership of the DtHatHotRequestData pointer...
Definition: DtHatHotResponder.h:95
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:76
DtCigiConnection & myConnection
Definition: DtHatHotResponder.h:135
#define DT_DLL_VRVCIGI
Definition: vrvCigi.h:19
unsigned int lastHostFrameNumber
Definition: DtHatHotResponder.h:77
unsigned short hatHotId
Definition: DtHatHotResponder.h:74
HatHotType requestType
Definition: DtHatHotResponder.h:66
int materialCode
Definition: DtHatHotResponder.h:78

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)