VR-Link API Documentation for DIS
detonatePdu.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
9 
10 #ifndef _detonationPdu_h
11 #define _detonationPdu_h
12 
13 #if DtDIS
14 
15 #include "interaction.h"
16 #include "packets/detonationP.h"
17 #include "hostStructs.h"
18 #include "eventId.h"
19 #include "fireInter.h"
20 
22 #include <vlpi/apSpec.h>
23 
24 #include <matrix/vlMath.h>
25 
26 
27 
28 #define DtMaxNumDetArtParts 25
29 
30 class DtExerciseConn;
32 
35 
37  void *usr);
38 
42 {
43 public:
44 
45  enum { PduStaticSize=104 };
46 
47 public:
49  DtDetonationPdu(const DtNetDetonationPdu *initial,
51 
52  DtDetonationPdu(const DtEntityIdentifier &attacker,
53  const DtEntityIdentifier &target,
54  const DtEntityIdentifier &munition,
55  const DtEventID &eventId,
56  const DtVector& linVelocity,
57  const DtVector& location,
58  const DtBurstDescriptor &burst,
59  const DtVector& entLocation,
60  DtDetonationResult result,
62 
66 
67  static DtPdu *create(const DtNetPacket *initial,
69 
70  static void addCallback(DtExerciseConn *conn,
71  DtDetonationInteractionCb cb, void *usr);
72  static void removeCallback(DtExerciseConn *conn,
73  DtDetonationInteractionCb cb, void *usr);
74 
75  /****************** INSPECTOR FUNCTIONS *******************/
76  const DtObjectId &attackerId() const;
77  void setAttackerId(const DtObjectId &id);
78 
79  const DtObjectId &targetId() const;
80  void setTargetId(const DtObjectId &id);
81 
82  const DtObjectId &munitionId() const;
83  void setMunitionId(const DtObjectId &id);
84 
85  const DtEventID &eventId() const;
86  void setEventId(const DtEventID &id);
87 
88  const DtVector& velocity() const;
89  void setVelocity(const DtVector& velocity);
90 
91  const DtVector& worldLocation() const;
92  void setWorldLocation(const DtVector& location);
93 
94  const DtVector& entityLocation() const;
95  void setEntityLocation(const DtVector& location);
96 
97  DtDetonationResult result() const;
98  void setResult(DtDetonationResult result);
99 
100  DtDetonatorFuze fuseType() const;
101  void setFuseType(DtDetonatorFuze fuse);
102 
103  const DtEntityType &munitionType() const;
104  void setMunitionType(const DtEntityType &munType);
105 
106  int quantity() const;
107  void setQuantity(int quant);
108 
109  int rate() const;
110  void setRate(int rate);
111 
112  DtWarheadType warheadType() const;
113  void setWarheadType(DtWarheadType type);
114 
116  const DtBurstDescriptor &burst() const;
117  void setBurst(const DtBurstDescriptor &burst);
118 
119  void setArticulatedParts(const DtArticulatedPartCollection& apList);
120  const DtArticulatedPartCollection& articulatedParts() const;
121 
122  virtual void printData() const;
123  virtual void printDataToStream(std::ostream& stream) const;
124  virtual void printDataToString(DtString& str) const;
125 
126 protected:
128 
133  DtVector vel, world, ent;
137 };
138 
139 
140 #endif
141 #endif
142 

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)