VR-Exchange 2.9 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pDetonationInter.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2016 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <portal/pInteraction.h>
13 #include <vlpi/articulatedPartCollection.h>
14 #include <vlutil/vlNetTypes.h>
15 #include <vlutil/vlString.h>
16 #include <matrix/vlVector.h>
17 
18 namespace MAKVrExchange
19 {
20 
21  class DtPortalConnection;
22 
28  : public DtPortalInteraction
29  {
30  public:
31 
32  typedef void (*DtPortalDetonationInteractionCb) (
33  const DtPortalDetonationInteraction& inter, void* usr );
34 
37 
40 
42  static void addCallback( DtPortalConnection* conn,
43  DtPortalDetonationInteractionCb cb, void* usr );
44 
46  static void removeCallback( DtPortalConnection* conn,
47  DtPortalDetonationInteractionCb cb, void* usr );
48 
51 
53  //
54  DtDEC_ATTRIBUTE( DtString, AttackerId, attackerId );
55 
57  DtDEC_ATTRIBUTE( DtString, TargetId, targetId );
58 
60  DtDEC_ATTRIBUTE( DtString, MunitionId, munitionId );
61 
63  //
66  DtDEC_ATTRIBUTE( DtString, MunitionType, munitionType );
67 
69  DtDEC_ATTRIBUTE( DtString, EventId, eventId );
70 
72  DtDEC_ATTRIBUTE( DtVector32, Velocity, velocity );
73 
75  DtDEC_ATTRIBUTE( DtVector64, WorldLocation, worldLocation );
76 
79  DtDEC_ATTRIBUTE( DtVector32, EntityLocation, entityLocation );
80 
82  DtDEC_ATTRIBUTE( DtU32, Result, result );
83 
85  DtDEC_ATTRIBUTE( DtU32, FuseType, fuseType );
86 
88  //
90  DtDEC_ATTRIBUTE( DtU32, Quantity, quantity );
91 
93  DtDEC_ATTRIBUTE( DtU32, Rate, rate );
94 
96  DtDEC_ATTRIBUTE( DtU32, WarheadType, warheadType );
97 
99  DtDEC_ATTRIBUTE( DtU32, TargetsEngaged, targetsEngaged );
100 
102  DtDEC_ATTRIBUTE( DtArticulatedPartCollection, ArticulatedPartList, articulatedPartList );
103 
105  DtDEC_ATTRIBUTE( DtString, MissionId, missionId );
106 
109  DtDEC_ATTRIBUTE( DtU8, HitAimPoint, hitAimPoint );
110 
113  DtDEC_ATTRIBUTE( DtVector, RelativeBulletLocation, relativeBulletLocation );
114 
116  DtDEC_ATTRIBUTE( DtU8, WeaponFailCode, weaponFailCode );
117 
119  DtDEC_ATTRIBUTE( DtString, IntendedTarget, intendedTarget );
120 
122 
123  public:
124 
126 
127  static DtPortalMessage* create();
128 
129  virtual unsigned int netSize() const;
130  virtual void writeSelfToBuffer( void* buffer, int bufferSize ) const;
131  virtual void readSelfFromBuffer( const void* buffer, int bufferSize );
132 
133  virtual std::ostream& printDataToStream( std::ostream& str ) const;
134 
135  };
136 
137 
139  {
140  return new DtPortalDetonationInteraction();
141  }
142 
143 }
#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:66
Contains the DtPortalInteraction class declaration.
DtPortalInteractions are a special type of DtPortalMessages which are used to transmit simulation dat...
Definition: pInteraction.h:21
static DtPortalMessage * create()
Definition: pDetonationInter.h:138
Represents a munition detonation event.
Definition: pDetonationInter.h:27
static const DtPortalMessageKind theKind
Definition: pDetonationInter.h:125
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 Tue Jun 25 16:45:35 EDT 2024 from SVN revision 267383
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)