Module: renv.cpp

class REnvironment
.h

constructorREnvironment()
destructor~REnvironment()
Loadbool Load(cstring fileName)


/*
 * REnv - environment
 * 06-08-00: Created!
 * (c) Ruud van Gaal
 */

#include <racer/racer.h>
#include <qlib/debug.h>
#pragma hdrstop
#include <qlib/info.h>
DEBUG_ENABLE

#define ENV_NAME      "env.ini"

REnvironment::REnvironment()
{
  airDensity=0;
  airConstant=0;
  gravity=10;
  Load(ENV_NAME);
}
REnvironment::~REnvironment()
{
}

bool REnvironment::Load(cstring fileName)
{
  QInfo info(RFindFile(fileName));
  airDensity=info.GetFloat("common.air_density");
  airConstant=info.GetFloat("common.air_constant");
  gravity=info.GetFloat("common.gravity");
  return TRUE;
}