VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
soundInteractionHLA.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2026 MAK Technologies, Inc
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
7 #ifndef soundInteractionHLA_H_
8 #define soundInteractionHLA_H_
9 
10 #if DtHLA
11 
12 #include "interactionWithEncDec.h"
13 #include "hostStructs.h"
14 #include "eventId.h"
15 #include <matrix/vlMath.h>
16 
17 
18 
22 
25 
26 
28 typedef void (*DtSoundInteractionCb)
29  (DtSoundInteraction* inter, void* usr);
30 
31 
35 class DT_DLL_VL DtSoundInteraction : public DtInteractionWithEncDec
36 {
37 public:
38 
41 
43  virtual ~DtSoundInteraction();
44 
47 
49  DtSoundInteraction& operator=(const DtSoundInteraction& orig);
50 
52  virtual void printData() const;
53 
55  virtual void printDataToStream(std::ostream& stream) const;
56 
58  virtual void setSourceId(const DtGlobalObjectDesignator& id);
59  virtual const DtGlobalObjectDesignator& sourceId() const;
60 
62  virtual void setSoundType(const DtEntityType& type);
63  virtual DtEntityType soundType() const;
64 
66  virtual void setLocation(const DtVector& loc);
67  virtual const DtVector& location() const;
68 
70  virtual void setRelativeLocation(const DtVector32& loc);
71  virtual const DtVector32& relativeLocation() const;
72 
74  virtual void setDecibelLevel(DtFloat32 intensity);
75  virtual DtFloat32 decibelLevel() const;
76 
78  virtual const char* name() const;
79 
80 public:
81 
84  static DtInteraction* create();
85 
88  static void addCallback(DtExerciseConn* conn,
89  DtSoundInteractionCb cb, void* usr,
90  DtDDMRegionSP region = DtDDMRegionSP());
91  static void removeCallback(DtExerciseConn* conn,
92  DtSoundInteractionCb cb, void* usr,
93  DtDDMRegionSP region = DtDDMRegionSP());
94 
95 protected:
96 
97  DtGlobalObjectDesignator mySourceId;
98  DtEntityType mySoundType;
99  DtVector32 myRelativePosition;
100  DtVector myLocation;
101  DtFloat32 myDecibelLevel;
102 };
103 
104 #endif
105 #endif
DtInteraction is an base class for representing DIS PDUs which don&#39;t have state.
Definition: interactionDIS.h:24
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnDIS.h:63
Instances of DtSoundInteraction are used to represent acoustic emissions.
Definition: soundPdu.h:28
#define DT_DLL_VL
Definition: vlMachineTypes.h:120
DtSoundPdu DtSoundInteraction
Instances of DtSoundInteraction are used to represent acoustic emissions.
Definition: soundPdu.h:19
This file defines math constants and methods which may be useful in simulations.
Definition: vlVector.h:224
Definition: vlVector.h:162
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
This file is deprecated - Please see simulationAddress.h, entityIdentifier.h, entityType.h, burstDescriptor.h, and NetStructs.h.
void(* DtSoundInteractionCb)(DtSoundInteraction *inter, void *usr)
Definition: soundPdu.h:24
Contains the DtEventId class declaration.
DtEntityType is used to represent the type an entity object.
Definition: entityType.h:26

Document ID: Generated on Mon Sep 28 00:09:32 EDT 2026 from SVN revision 295353
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)