VR-Link API Documentation for HLA Evolved
 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 Fri Dec 2 02:42:08 EST 2016 from SVN revision 171416
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)