VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
dynamicTerrainPdu.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2017 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #if DtDIS
13 
19 #include <vlutil/vlMachineTypes.h>
20 #include <vl/stateMsg.h>
21 #include <vl/exerciseConn.h>
22 
23 
24 
26 
29 typedef void (*DynamicTerrainCb)(DtDynamicTerrainPdu* pdu, void* usr);
30 
35 {
36 public:
38  DtDynamicTerrainPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
39  DtDynamicTerrainPdu(const DtNetPacket* initial,
40  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER, DtPduFactory* pduFactory = 0);
41 
42 
44  virtual ~DtDynamicTerrainPdu();
45 
46 private:
49 
51  DtDynamicTerrainPdu& operator=(const DtDynamicTerrainPdu& orig);
52 
53 public:
54 
56  virtual void setObjectIdentifier(const DtEntityIdentifier& val);
57 
59  DtEntityIdentifier objectIdentifier() const;
60 
62  virtual void setGeometryAndData(const DtTerrainGeometryAndDataList& val);
63 
65  const DtTerrainGeometryAndDataList& geometryAndData() const;
66 
68  virtual void setCommonData(const DtKeyValuePairList& val);
69 
71  const DtKeyValuePairList& commonData() const;
72 
74  virtual void setCommonDataEventNumber(DtU32 val);
75 
77  DtU32 commonDataEventNumber() const;
78 
80  virtual void setFinalUpdate(bool val);
81 
83  bool finalUpdate() const;
84 
85  // Returns a unique Key for this PDU class to be used with
86  // reflected objects and reflected lists. Because the Entity ID
87  // may not be unique, this should be a combination of the minimal
88  // number of attributes required for uniqueness.
89  DtString uniqueKey() const;
90 
91 public:
92 
95  static DtPdu* create(const DtNetPduHeader *initial,
96  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER, DtPduFactory* pduFactory = 0);
97 
100  static void addCallback(DtExerciseConn* conn,
101  DynamicTerrainCb cb, void* usr);
102  static void removeCallback(DtExerciseConn* conn,
103  DynamicTerrainCb cb, void* usr);
104 
105 protected:
106 
107  // Returns the number of bytes in the fixed length portion of this PDU
108  // This is the initial size of the PDU before any variable datums are added
109  virtual unsigned int fixedBytesSize() const;
110  // A pointer to the first byte of variable datums. If there are no variable
111  // datums this points to the first byte out-of-bounds. This address should
112  // only be used if you know the PDU has been resized correctly.
113  virtual char *firstVarDatumStart() const;
114  static DtPduKind internalGetPduKindImpl() {return DtDynamicTerrainPduKind;}
115  DtPduKind internalGetPduKind() const {return internalGetPduKindImpl();}
116 
117 protected:
118 
119  // Cached DtStrings to ensure proper buffering
120 
123 
126 
127 };
128 
129 #endif // DtDIS

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)