VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rectangularPyramidPduDIS.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 
18 #include <vlutil/vlMachineTypes.h>
19 #include <vl/exerciseConn.h>
20 
22 
25 typedef void (*RectangularPyramidCb)(DtRectangularPyramidPdu* pdu, void* usr);
26 
31 {
32 public:
33 
35  DtRectangularPyramidPdu(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
36  DtRectangularPyramidPdu(const DtNetPacket* initial,
37  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER,
38  DtPduFactory* pduFactory = 0);
39 
42 
44  virtual ~DtRectangularPyramidPdu();
45 
48 
49 public:
50 
51 
53  virtual void setXHalfAngle(DtFloat64 val);
54 
56  DtFloat64 xHalfAngle() const;
57 
59  virtual void setYHalfAngle(DtFloat64 val);
60 
62  DtFloat64 yHalfAngle() const;
63 
64  // Returns an entity identifier for this PDU class which
65  // can be used by reflected objects and reflected object lists.
66  DtEntityIdentifier pduEntityIdentifier() const;
67 
68  // Returns a unique Key for this PDU class to be used with
69  // reflected objects and reflected lists. Because the Entity ID
70  // may not be unique, this should be a combination of the minimal
71  // number of attributes required for uniqueness.
72  DtString uniqueKey() const;
73 
74 public:
75 
78  static DtPdu* create(const DtNetPacket *initial,
79  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER,
80  DtPduFactory* pduFactory = 0);
81 
84  static void addCallback(DtExerciseConn* conn,
85  RectangularPyramidCb cb, void* usr);
86  static void removeCallback(DtExerciseConn* conn,
87  RectangularPyramidCb cb, void* usr);
88 
89 protected:
90 
91  // Returns the number of bytes in the fixed length portion of this PDU
92  // This is the initial size of the PDU before any variable datums are added
93  virtual unsigned int fixedBytesSize() const;
94 
95  // A pointer to the first byte of variable datums. If there are no variable
96  // datums this points to the first byte out-of-bounds. This address should
97  // only be used if you know the PDU has been resized correctly.
98  virtual char *firstVarDatumStart() const;
99 
101  DtPduKind internalGetPduKind() const {return internalGetPduKindImpl();}
102 
103 };
104 
105 #endif // DtDIS
static DtPdu * create(const DtNetPacket *initial, DtBufferPtr buffer=DtUSE_INTERNAL_BUFFER, DtPduFactory *pduFactory=0)
Create a DtSensorFieldOfViewPdu. Caller is responsible for deletion.
DtPduKind internalGetPduKind() const
Definition: rectangularPyramidPduDIS.h:101
DtString uniqueKey() const
virtual char * firstVarDatumStart() const
DtSensorFieldOfViewPdu & operator=(const DtSensorFieldOfViewPdu &orig)
Assignment operator.
virtual unsigned int fixedBytesSize() const
static DtPduKind internalGetPduKindImpl()
Definition: rectangularPyramidPduDIS.h:100
static DtPduKind internalGetPduKindImpl()
Definition: sensorFieldOfViewPduDIS.h:180
Contains the DtSensorFieldOfViewPdu class declaration.
void(* RectangularPyramidCb)(DtRectangularPyramidPdu *pdu, void *usr)
DtRectangularPyramidPdu callback function signature.
Definition: rectangularPyramidPduDIS.h:25
DtEntityIdentifier pduEntityIdentifier() const
Instances of DtRectangularPyramidPdu are used for DIS network packets which encode the DtRectangularP...
Definition: rectangularPyramidPduDIS.h:30
static void removeCallback(DtExerciseConn *conn, SensorFieldOfViewCb cb, void *usr)
static void addCallback(DtExerciseConn *conn, SensorFieldOfViewCb cb, void *usr)
Add (register)/Remove (deregister) function to be called when a PDU is received.
double DtFloat64
Definition: vrvControlStructTypes.h:36
Instances of DtSensorFieldOfViewPdu are used for DIS network packets which encode the DtSensorFieldOf...
Definition: sensorFieldOfViewPduDIS.h:32
Contains the DtNetRectangularPyramidPdu struct declaration.
const DtPduKind DtSensorFieldOfViewRectangularPyramidPduKind
Definition: disEnumsExtensions.h:127
#define DT_DLL_vrfExtObjects
Definition: dllExport.h:23

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)