VR-Exchange 2.7 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pVrvInputEvent.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2016 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <portal/dllExport.h>
13 #include <portal/pInteraction.h>
14 
15 
16 namespace MAKVrExchange
17 {
18 
19  class DtPortalConnection;
20 
24  : public DtPortalInteraction
25  {
26  public:
27 
29  {
30  KeyboardDataSet = 1,
31  MouseDataSet = 2
32  };
33 
35  {
40  MouseEvent_ButtonDoubleClick
41  };
42 
43  public:
44 
46  typedef void (*functionCallback_type) (
47  const DtPortalVrvInputEventInteraction &interaction, void *userData);
48 
51 
54 
56  static void addCallback( DtPortalConnection* connection,
57  functionCallback_type callbackFunction, void* userData );
58 
60  static void removeCallback( DtPortalConnection* connection,
61  functionCallback_type callbackFunction, void* userData );
62 
65 
66  DtDEC_ATTRIBUTE( DtString, ObserverName, observerName )
67  DtDEC_ATTRIBUTE( DtU8, InputDataUsed, inputDataUsed );
68  DtDEC_ATTRIBUTE( DtU32, Key, key );
69  DtDEC_ATTRIBUTE( bool, KeyState, keyState );
70  DtDEC_ATTRIBUTE( DtU8, MouseEventType, mouseEventType );
71  DtDEC_ATTRIBUTE( double, X, x );
72  DtDEC_ATTRIBUTE( double, Y, y );
73  DtDEC_ATTRIBUTE( double, Wheel, wheel );
74  DtDEC_ATTRIBUTE( bool, Left, left );
75  DtDEC_ATTRIBUTE( bool, Middle, middle );
76  DtDEC_ATTRIBUTE( bool, Right, right );
77  DtDEC_ATTRIBUTE( bool, Shift, shift );
78  DtDEC_ATTRIBUTE( bool, Ctrl, ctrl );
79  DtDEC_ATTRIBUTE( bool, Alt, alt );
81 
83  public:
84 
85  static const DtPortalMessageKind theKind;
86 
87  static DtPortalMessage* create();
88 
89  virtual unsigned int netSize() const;
90  virtual void writeSelfToBuffer( void* buffer, int bufferSize ) const;
91  virtual void readSelfFromBuffer( const void* buffer, int bufferSize );
92 
93  virtual std::ostream& printDataToStream( std::ostream& stream ) const;
94 
95  private:
96 
99 
101  bool operator == ( const DtPortalVrvInputEventInteraction& ) const;
102 
104  bool operator != ( const DtPortalVrvInputEventInteraction& ) const;
105 
106  };
107 
108 
109  inline DtPortalMessage* DtPortalVrvInputEventInteraction::create()
110  {
111  return new DtPortalVrvInputEventInteraction();
112  }
113 
114 }
#define DT_DLL_LIBPORTAL
Definition: include/portal/dllExport.h:20
#define DtDEC_ATTRIBUTE(T, N, n)
A Macro to define an attribute; as well as make an accessor and mutator for that attribute.
Definition: addAttribute.h:49
Vrv InputEvent Interaction class.
Definition: pVrvInputEvent.h:23
The base class for all messages passed through the portal.
Definition: pMessage.h:65
Contains the DtPortalInteraction class declaration.
DtPortalInteractions are a special type of DtPortalMessages which are used to transmit simulation dat...
Definition: pInteraction.h:21
DtMouseEventType
Definition: pVrvInputEvent.h:34
InputDataUsed
Definition: pVrvInputEvent.h:28
Connects a broker to the Portal Data Exchange.
Definition: pConnection.h:49
DtPortalMessageKind
A List of message kinds distributed with the Portal.
Definition: pMessageKinds.h:23

Document ID: Generated on Mon Apr 19 15:55:22 EDT 2021 from SVN revision 227909
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)