VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages

In myFireInter.h, we extend the API provided by the DtFireInteraction class, to add accessor functions for the concept of temperature.

Again, we override printData(), and provide a static create() function:


/*********************************************************************
** Copyright (c) 1992-2010 VT MAK
** All rights reserved.
*********************************************************************/
#pragma once
#if DtHLA
#include <stdio.h>
{
public:
virtual void setTemperature(float temp);
virtual float temperature() const;
virtual void printData() const;
public:
static DtInteraction* create();
protected:
};
// Inline functions
inline void MyFireInteraction::setTemperature(float temp)
{
myTemperature = temp;
}
inline float MyFireInteraction::temperature() const
{
return myTemperature;
}
inline void MyFireInteraction::printData() const
{
printf("Temperature: %lf\n", temperature());
}
{
return new MyFireInteraction();
}
#endif

Document ID: Generated on Mon Apr 25 03:39:01 EDT 2022 from SVN revision 242502
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)