WebLVC 1.7d API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pFireInter.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/pInteraction.h>
13 #include <vlutil/vlNetTypes.h>
14 #include <vlutil/vlString.h>
15 #include <matrix/vlVector.h>
16 
17 namespace MAKVrExchange
18 {
19 
20  class DtPortalConnection;
21 
29  : public DtPortalInteraction
30  {
31  public:
32 
33  typedef void (*DtPortalFireInteractionCb) (
34  const DtPortalFireInteraction& inter, void* usr );
35 
38 
40  virtual ~DtPortalFireInteraction();
41 
43  static void addCallback( DtPortalConnection* conn,
44  DtPortalFireInteractionCb cb, void* usr );
45 
47  static void removeCallback( DtPortalConnection* conn,
48  DtPortalFireInteractionCb cb, void* usr );
49 
52 
54  DtDEC_ATTRIBUTE( DtString, AttackerId, attackerId );
55 
58  DtDEC_ATTRIBUTE( DtString, TargetId, targetId );
59 
62  DtDEC_ATTRIBUTE( DtString, EntityType, entityType );
63 
68  DtDEC_ATTRIBUTE( DtString, MunitionType, munitionType );
69 
71  DtDEC_ATTRIBUTE( DtString, MunitionId, munitionId );
72 
74  DtDEC_ATTRIBUTE( DtString, EventId, eventId );
75 
77  DtDEC_ATTRIBUTE( DtU32, WarheadType, warheadType );
78 
80  DtDEC_ATTRIBUTE( DtU32, FireMissionIndex, fireMissionIndex );
81 
83  DtDEC_ATTRIBUTE( DtU32, FuseType, fuseType );
84 
87  DtDEC_ATTRIBUTE( DtU32, Quantity, quantity );
88 
90  DtDEC_ATTRIBUTE( DtU32, Rate, rate );
91 
93  DtDEC_ATTRIBUTE( DtFloat64, Range, range );
94 
96  DtDEC_ATTRIBUTE( DtVector64, Location, location );
97 
99  DtDEC_ATTRIBUTE( DtVector32, Velocity, velocity );
100 
102 
104  public:
105 
107 
108  static DtPortalMessage* create();
109 
110  virtual unsigned int netSize() const;
111  virtual void writeSelfToBuffer( void* buffer, int bufferSize ) const;
112  virtual void readSelfFromBuffer( const void* buffer, int bufferSize );
113 
114  virtual std::ostream& printDataToStream( std::ostream& str ) const;
115 
116  };
117 
118 
120  {
121  return new DtPortalFireInteraction();
122  }
123 
124 }
static DtPortalMessage * create()
Definition: pFireInter.h:119
#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
The base class for all messages passed through the portal.
Definition: pMessage.h:65
Contains the DtPortalInteraction class declaration.
Represents a weapon fire event.
Definition: pFireInter.h:28
DtPortalInteractions are a special type of DtPortalMessages which are used to transmit simulation dat...
Definition: pInteraction.h:21
static const DtPortalMessageKind theKind
NOTE: DtDEC_ATTRIBUTE resets the access specifier to protected.
Definition: pFireInter.h:106
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 Wed Jun 21 15:05:44 EDT 2023 from SVN revision 256253
Copyright © 2005-2023 MAK Technologies. All Rights Reserved (www.mak.com)