VR-Link API Documentation for HLA 4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
myFireInter.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2025 MAK Technologies, Inc
3 ** All rights reserved.
4 *********************************************************************/
5 #pragma once
6 
7 #if DtHLA
8 
9 #include <stdio.h>
10 #include <vl/fireInteractionHLA.h>
11 
17 {
18 public:
19 
21  virtual void setTemperature(float temp);
23  virtual float temperature() const;
24 
26  virtual void printData() const;
27 
28 public:
29 
31  static DtInteraction* create();
32 
33 protected:
34 
36 };
37 
38 // Inline functions
39 
40 inline void MyFireInteraction::setTemperature(float temp)
41 {
42  myTemperature = temp;
43 }
44 
45 inline float MyFireInteraction::temperature() const
46 {
47  return myTemperature;
48 }
49 
50 inline void MyFireInteraction::printData() const
51 {
53  printf("Temperature: %lf\n", temperature());
54 }
55 
57 {
58  return new MyFireInteraction();
59 }
60 
61 #endif
virtual void setTemperature(float temp)
Set the temperature.
Definition: myFireInter.h:40
DtInteraction is an abstract base class for representing HLA interactions (or events) (as opposed to ...
Definition: interactionHLA.h:33
Because this example adds a concept that did not already exist in VR-Link&#39;s DtFireInteraction class...
Definition: myFireInter.h:16
This file provides a declaration of the class DtFireInteraction and the DtFireInteractionCb typedef f...
Instances of DtFireInteraction are used to represent the firing of a weapon.
Definition: fireInteractionHLA.h:35
static DtInteraction * create()
Create a MyFireInteraction. Caller is responsible for deletion.
Definition: myFireInter.h:56
virtual void printData() const
Print the interaction&#39;s data to DtInfo.
virtual float temperature() const
The temperature.
Definition: myFireInter.h:45
float myTemperature
Definition: myFireInter.h:35
virtual void printData() const
Virtual function override: print the interaction&#39;s data.
Definition: myFireInter.h:50

Document ID: Generated on Thu Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)