VR-Exchange 2.2 API Documentation
pFireInter.h
Go to the documentation of this file.
1 /*********************************************************************
2  ** Copyright (c) 1992-2010 VT MAK
3  ** All rights reserved.
4  *********************************************************************/
5 
6 
7 #ifndef pFireInter_H_
8 #define pFireInter_H_
9 
13 
14 
16 #include <vlutil/vlString.h>
17 #include <vlutil/vlNetTypes.h>
18 #include <matrix/vlVector.h>
19 
20 namespace MAKVrExchange {
21 
22 class DtPortalConnection;
23 
26 //
31 class DT_DLL_LIBPORTAL DtPortalFireInteraction : public DtPortalBaseInteraction
32 {
33 public:
34 
35  typedef void (*DtPortalFireInteractionCb)
36  (const DtPortalFireInteraction &inter, void *usr);
37 
38 public:
39 
42 
44  virtual ~DtPortalFireInteraction();
45 
48 
50  DtDEC_ATTRIBUTE(DtString, AttackerId, attackerId);
51 
55  DtDEC_ATTRIBUTE(DtString, TargetId, targetId);
56 
60  DtDEC_ATTRIBUTE(DtString, EntityType, entityType);
61 
63  //
67  DtDEC_ATTRIBUTE(DtString, MunitionType, munitionType);
68 
70  DtDEC_ATTRIBUTE(DtString, MunitionId, munitionId);
71 
73  DtDEC_ATTRIBUTE(DtString, EventId, eventId);
74 
76  DtDEC_ATTRIBUTE(DtU32, WarheadType, warheadType);
77 
79  DtDEC_ATTRIBUTE(DtU32, FireMissionIndex, fireMissionIndex);
80 
82  DtDEC_ATTRIBUTE(DtU32, FuseType, fuseType);
83 
87  DtDEC_ATTRIBUTE(DtU32, Quantity, quantity);
88 
90  DtDEC_ATTRIBUTE(DtU32, Rate, rate);
91 
93  DtDEC_ATTRIBUTE(DtFloat64, Range, range);
94 
96  DtDEC_ATTRIBUTE(DtVector, Location, location);
97 
99  DtDEC_ATTRIBUTE(DtVector, Velocity, velocity);
100 
102 
103 public: /*The access specifier must be reset after calling DtDEC_ATTRIBUTE() */
104 
105  virtual DtPortalMessageKind kind() const;
106  virtual const char * interactionKindName() const { return "Fire"; }
107 
108  virtual unsigned int netSize() const;
109  virtual void writeSelfToBuffer(void *buffer) const ;
110  virtual void readSelfFromBuffer(const void *buffer);
111  virtual std::ostream &printDataToStream(std::ostream &str) const;
112 
113 
114 public:
115 
117 
118  static DtPortalMessage *create();
119 
120  static void addCallback(DtPortalConnection *conn,
121  DtPortalFireInteractionCb cb, void *usr);
122  static void removeCallback(DtPortalConnection *conn,
123  DtPortalFireInteractionCb cb, void *usr);
124 
125 
126 protected:
127 
128 };
129 }
130 
131 #endif //end #ifndef pFireInter_H_

Document ID: Generated on Mon Apr 15 17:15:50 EDT 2013 from SVN revision 126154
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)