X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWeatherCM%2FFGWindItem.h;h=9aa6ab39577d9c6b29a72b51960429a203214ebd;hb=7d3448294bc7486af3f4c1f0ff5c8493b03ffc90;hp=b06dbd2c582bb9ba56040b1321df6f5bea609b44;hpb=275154500802cc9405b5905b3b055e5c4a17b33f;p=flightgear.git diff --git a/src/WeatherCM/FGWindItem.h b/src/WeatherCM/FGWindItem.h index b06dbd2c5..9aa6ab395 100644 --- a/src/WeatherCM/FGWindItem.h +++ b/src/WeatherCM/FGWindItem.h @@ -36,6 +36,8 @@ HISTORY suggestion 19.10.1999 Christian Mayer change to use PLIB's sg instead of Point[2/3]D and lots of wee code cleaning +21.12.1999 Christian Mayer Added a fix for compatibility to gcc 2.8 which + suggested by Oliver Delise *****************************************************************************/ /****************************************************************************/ @@ -47,7 +49,18 @@ HISTORY /****************************************************************************/ /* INCLUDES */ /****************************************************************************/ -#include "sg.h" + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#ifdef HAVE_WINDOWS_H +# include +#endif + +#include #include "FGWeatherDefs.h" @@ -57,6 +70,12 @@ HISTORY class FGWindItem; FGWindItem operator-(const FGWindItem& arg); +#if ( __GNU_C__ == 2 && __GNU_MAJOR__ < 9 ) +# define const_sgVec3 const sgVec3 +#else +# define const_sgVec3 const sgVec3& +#endif + /****************************************************************************/ /* CLASS DECLARATION */ /****************************************************************************/ @@ -68,7 +87,9 @@ private: protected: public: - FGWindItem(const sgVec3& v) { sgCopyVec3(value, v); } + FGWindItem(const_sgVec3 v) { sgCopyVec3(value, v); } + FGWindItem(const WeatherPrecision x, const WeatherPrecision y, const WeatherPrecision z) + { sgSetVec3 (value, x, y, z); } FGWindItem() { sgZeroVec3(value); } void getValue(sgVec3 ret) const { sgCopyVec3(ret, value); }; @@ -78,6 +99,10 @@ public: WeatherPrecision y(void) const { return value[1]; }; WeatherPrecision z(void) const { return value[2]; }; + void x(const WeatherPrecision x) { value[0] = x; }; + void y(const WeatherPrecision y) { value[1] = y; }; + void z(const WeatherPrecision z) { value[2] = z; }; + FGWindItem& operator*= (const WeatherPrecision arg); FGWindItem& operator+= (const FGWindItem& arg); FGWindItem& operator-= (const FGWindItem& arg);