SGThread.hxx   SGThread.hxx 
skipping to change at line 21 skipping to change at line 21
// //
// This program is distributed in the hope that it will be useful, but // This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of // WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details. // General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// $Id: SGThread.hxx,v 1.3 2005/01/09 10:24:54 ehofman Exp $ // $Id: SGThread.hxx,v 1.6 2005/11/14 18:25:17 ehofman Exp $
#ifndef SGTHREAD_HXX_INCLUDED #ifndef SGTHREAD_HXX_INCLUDED
#define SGTHREAD_HXX_INCLUDED 1 #define SGTHREAD_HXX_INCLUDED 1
#include <simgear/compiler.h> #include <simgear/compiler.h>
#include <pthread.h> #include <pthread.h>
#if defined ( SG_HAVE_STD_INCLUDES ) #if defined ( SG_HAVE_STD_INCLUDES )
# include <cassert> # include <cassert>
# include <cerrno> # include <cerrno>
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 animation.hxx   animation.hxx 
skipping to change at line 25 skipping to change at line 25
#include <map> #include <map>
SG_USING_STD(vector); SG_USING_STD(vector);
SG_USING_STD(map); SG_USING_STD(map);
#include <plib/sg.h> #include <plib/sg.h>
#include <plib/ssg.h> #include <plib/ssg.h>
#include <simgear/math/point3d.hxx> #include <simgear/math/point3d.hxx>
#include <simgear/props/props.hxx> #include <simgear/props/props.hxx>
#include <simgear/misc/sg_path.hxx>
// Don't pull in the headers, since we don't need them here. // Don't pull in the headers, since we don't need them here.
class SGInterpTable; class SGInterpTable;
class SGCondition; class SGCondition;
class SGPersonalityBranch; class SGPersonalityBranch;
// Has anyone done anything *really* stupid, like making min and max macros ? // Has anyone done anything *really* stupid, like making min and max macros ?
#ifdef min #ifdef min
#undef min #undef min
#endif #endif
skipping to change at line 48 skipping to change at line 49
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Animation classes // Animation classes
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
/** /**
* Abstract base class for all animations. * Abstract base class for all animations.
*/ */
class SGAnimation : public ssgBase class SGAnimation : public ssgBase
{ {
public: public:
enum PersonalityVar { INIT_SPIN, LAST_TIME_SEC_SPIN, FACTOR_SPIN,
POSITION_DEG_SPIN, INIT_TIMED, LAST_TIME_SEC_TIMED,
TOTAL_DURATION_SEC_TIMED, BRANCH_DURATION_SEC_TIMED
,
STEP_TIMED };
SGAnimation (SGPropertyNode_ptr props, ssgBranch * branch); SGAnimation (SGPropertyNode_ptr props, ssgBranch * branch);
virtual ~SGAnimation (); virtual ~SGAnimation ();
/** /**
* Get the SSG branch holding the animation. * Get the SSG branch holding the animation.
*/ */
virtual ssgBranch * getBranch () { return _branch; } virtual ssgBranch * getBranch () { return _branch; }
skipping to change at line 85 skipping to change at line 90
* frame in order for the time based animations to work correctly. * frame in order for the time based animations to work correctly.
*/ */
static void set_sim_time_sec( double val ) { sim_time_sec = val; } static void set_sim_time_sec( double val ) { sim_time_sec = val; }
/** /**
* Current personality branch : enable animation to behave differently * Current personality branch : enable animation to behave differently
* for similar objects * for similar objects
*/ */
static SGPersonalityBranch *current_object; static SGPersonalityBranch *current_object;
int get_animation_type(void) { return animation_type; }
protected: protected:
static double sim_time_sec; static double sim_time_sec;
ssgBranch * _branch; ssgBranch * _branch;
int animation_type;
}; };
/** /**
* A no-op animation. * A no-op animation.
*/ */
class SGNullAnimation : public SGAnimation class SGNullAnimation : public SGAnimation
{ {
public: public:
SGNullAnimation (SGPropertyNode_ptr props); SGNullAnimation (SGPropertyNode_ptr props);
virtual ~SGNullAnimation (); virtual ~SGNullAnimation ();
skipping to change at line 161 skipping to change at line 169
*/ */
class SGSpinAnimation : public SGAnimation class SGSpinAnimation : public SGAnimation
{ {
public: public:
SGSpinAnimation( SGPropertyNode *prop_root, SGSpinAnimation( SGPropertyNode *prop_root,
SGPropertyNode_ptr props, SGPropertyNode_ptr props,
double sim_time_sec ); double sim_time_sec );
virtual ~SGSpinAnimation (); virtual ~SGSpinAnimation ();
virtual int update(); virtual int update();
private: private:
bool _use_personality;
SGPropertyNode_ptr _prop; SGPropertyNode_ptr _prop;
double _factor; double _factor;
double _factor_min;
double _factor_max;
double _position_deg; double _position_deg;
double _position_deg_min;
double _position_deg_max;
double _last_time_sec; double _last_time_sec;
sgMat4 _matrix; sgMat4 _matrix;
sgVec3 _center; sgVec3 _center;
sgVec3 _axis; sgVec3 _axis;
SGCondition * _condition; SGCondition * _condition;
}; };
/** /**
* Animation to draw objects for a specific amount of time each. * Animation to draw objects for a specific amount of time each.
*/ */
class SGTimedAnimation : public SGAnimation class SGTimedAnimation : public SGAnimation
{ {
public: public:
SGTimedAnimation (SGPropertyNode_ptr props); SGTimedAnimation (SGPropertyNode_ptr props);
virtual ~SGTimedAnimation (); virtual ~SGTimedAnimation ();
virtual void init(); virtual void init();
virtual int update(); virtual int update();
private: private:
bool _use_personality; bool _use_personality;
enum PersonalityVar { INIT, LAST_TIME_SEC, TOTAL_DURATION_SEC, BRANCH_D URATION_SEC, STEP };
double _duration_sec; double _duration_sec;
double _last_time_sec; double _last_time_sec;
double _total_duration_sec; double _total_duration_sec;
int _step; int _step;
struct DurationSpec { struct DurationSpec {
DurationSpec( double m = 0.0 ) : _min(m), _max(m) {} DurationSpec( double m = 0.0 ) : _min(m), _max(m) {}
DurationSpec( double m1, double m2 ) : _min(m1), _max(m2) {} DurationSpec( double m1, double m2 ) : _min(m1), _max(m2) {}
double _min, _max; double _min, _max;
}; };
vector<DurationSpec> _branch_duration_specs; vector<DurationSpec> _branch_duration_specs;
skipping to change at line 411 skipping to change at line 423
public: public:
SGAlphaTestAnimation(SGPropertyNode_ptr props); SGAlphaTestAnimation(SGPropertyNode_ptr props);
virtual ~SGAlphaTestAnimation (); virtual ~SGAlphaTestAnimation ();
virtual void init(); virtual void init();
private: private:
void setAlphaClampToBranch(ssgBranch *b, float clamp); void setAlphaClampToBranch(ssgBranch *b, float clamp);
float _alpha_clamp; float _alpha_clamp;
}; };
/** /**
* An "animation" to modify material properties
*/
class SGMaterialAnimation : public SGAnimation
{
public:
SGMaterialAnimation(SGPropertyNode *prop_root, SGPropertyNode_ptr props
,
const SGPath &texpath);
virtual ~SGMaterialAnimation() {}
virtual void init();
virtual int update();
private:
enum {
DIFFUSE = 1,
AMBIENT = 2,
SPECULAR = 4,
EMISSION = 8,
SHININESS = 16,
TRANSPARENCY = 32,
THRESHOLD = 64,
TEXTURE = 128,
};
struct ColorSpec {
float red, green, blue;
float factor;
float offset;
SGPropertyNode_ptr red_prop;
SGPropertyNode_ptr green_prop;
SGPropertyNode_ptr blue_prop;
SGPropertyNode_ptr factor_prop;
SGPropertyNode_ptr offset_prop;
sgVec4 v;
inline bool dirty() {
return red >= 0.0 || green >= 0.0 || blue >= 0.0;
}
inline bool live() {
return red_prop || green_prop || blue_prop
|| factor_prop || offset_prop;
}
inline bool operator!=(ColorSpec& a) {
return red != a.red || green != a.green || blue != a.blue
|| factor != a.factor || offset != a.offset;
}
sgVec4 &rgba() {
v[0] = clamp(red * factor + offset);
v[1] = clamp(green * factor + offset);
v[2] = clamp(blue * factor + offset);
v[3] = 1.0;
return v;
}
inline float clamp(float val) {
return val < 0.0 ? 0.0 : val > 1.0 ? 1.0 : val;
}
};
struct PropSpec {
float value;
float factor;
float offset;
float min;
float max;
SGPropertyNode_ptr value_prop;
SGPropertyNode_ptr factor_prop;
SGPropertyNode_ptr offset_prop;
inline bool dirty() { return value >= 0.0; }
inline bool live() { return value_prop || factor_prop || offset_pro
p; }
inline bool operator!=(PropSpec& a) {
return value != a.value || factor != a.factor || offset != a.of
fset;
}
};
SGCondition *_condition;
SGPropertyNode *_prop_root;
string _prop_base;
SGPath _texture_base;
SGPath _texture;
string _texture_str;
ssgSimpleState* _cached_material;
ssgSimpleState* _cloned_material;
unsigned _read;
unsigned _update;
bool _global;
ColorSpec _diff;
ColorSpec _amb;
ColorSpec _emis;
ColorSpec _spec;
float _shi;
PropSpec _trans;
float _thresh; // alpha_clamp (see man glAlphaFunc)
string _tex;
string _tmpstr;
SGPropertyNode_ptr _shi_prop;
SGPropertyNode_ptr _thresh_prop;
SGPropertyNode_ptr _tex_prop;
void cloneMaterials(ssgBranch *b);
void setMaterialBranch(ssgBranch *b);
void initColorGroup(SGPropertyNode_ptr, ColorSpec *, int flag);
void updateColorGroup(ColorSpec *, int flag);
inline float clamp(float val, float min = 0.0, float max = 1.0) {
return val < min ? min : val > max ? max : val;
}
const char *path(const char *rel) {
return (_tmpstr = _prop_base + rel).c_str();
}
};
/**
* An "animation" that compute a scale according to * An "animation" that compute a scale according to
* the angle between an axis and the view direction * the angle between an axis and the view direction
*/ */
class SGFlashAnimation : public SGAnimation class SGFlashAnimation : public SGAnimation
{ {
public: public:
SGFlashAnimation(SGPropertyNode_ptr props); SGFlashAnimation(SGPropertyNode_ptr props);
virtual ~SGFlashAnimation (); virtual ~SGFlashAnimation ();
static void flashCallback( sgMat4 r, sgFrustum *f, sgMat4 m, void *d ); static void flashCallback( sgMat4 r, sgFrustum *f, sgMat4 m, void *d );
skipping to change at line 449 skipping to change at line 566
static void distScaleCallback( sgMat4 r, sgFrustum *f, sgMat4 m, void *d ); static void distScaleCallback( sgMat4 r, sgFrustum *f, sgMat4 m, void *d );
void distScaleCallback( sgMat4 r, sgFrustum *f, sgMat4 m ); void distScaleCallback( sgMat4 r, sgFrustum *f, sgMat4 m );
private: private:
sgVec3 _center; sgVec3 _center;
float _factor, _offset, _min_v, _max_v; float _factor, _offset, _min_v, _max_v;
bool _has_min, _has_max; bool _has_min, _has_max;
SGInterpTable * _table; SGInterpTable * _table;
}; };
/**
* An animation to tell wich objects don't cast shadows.
*/
class SGShadowAnimation : public SGAnimation
{
public:
SGShadowAnimation ( SGPropertyNode *prop_root,
SGPropertyNode_ptr props );
virtual ~SGShadowAnimation ();
virtual int update();
bool get_condition_value(void);
private:
SGCondition * _condition;
bool _condition_value;
};
/**
+ * An "animation" that replace fixed opengl pipeline by shaders
+ */
class SGShaderAnimation : public SGAnimation
{
public:
SGShaderAnimation ( SGPropertyNode *prop_root,
SGPropertyNode_ptr props );
virtual ~SGShaderAnimation ();
virtual void init();
virtual int update();
bool get_condition_value(void);
private:
SGCondition * _condition;
bool _condition_value;
int _shader_type;
float _param_1;
sgVec4 _param_color;
public:
bool _depth_test;
float _factor;
SGPropertyNode_ptr _factor_prop;
float _speed;
SGPropertyNode_ptr _speed_prop;
ssgTexture *_effectTexture;
unsigned char *_textureData;
GLint _texWidth, _texHeight;
sgVec4 _envColor;
};
#endif // _SG_ANIMATION_HXX #endif // _SG_ANIMATION_HXX
 End of changes. 10 change blocks. 
1 lines changed or deleted 168 lines changed or added


 cloud.hxx   cloud.hxx 
skipping to change at line 25 skipping to change at line 25
// This library is distributed in the hope that it will be useful, // This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details. // Library General Public License for more details.
// //
// You should have received a copy of the GNU Library General Public // You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the // License along with this library; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA. // Boston, MA 02111-1307, USA.
// //
// $Id: cloud.hxx,v 1.13 2005/01/11 15:21:58 curt Exp $ // $Id: cloud.hxx,v 1.15 2005/05/15 09:27:00 ehofman Exp $
#ifndef _SG_CLOUD_HXX_ #ifndef _SG_CLOUD_HXX_
#define _SG_CLOUD_HXX_ #define _SG_CLOUD_HXX_
#include <simgear/compiler.h> #include <simgear/compiler.h>
#include <plib/ssg.h> #include <plib/ssg.h>
#include STL_STRING #include STL_STRING
SG_USING_STD(string); SG_USING_STD(string);
// #include <iostream> // #include <iostream>
// SG_USING_STD(cout); // SG_USING_STD(cout);
// SG_USING_STD(endl); // SG_USING_STD(endl);
class SGCloudField;
/** /**
* A class layer to model a single cloud layer * A class layer to model a single cloud layer
*/ */
class SGCloudLayer { class SGCloudLayer {
public: public:
/** /**
* This is the list of available cloud coverages/textures * This is the list of available cloud coverages/textures
*/ */
enum Coverage { enum Coverage {
skipping to change at line 184 skipping to change at line 186
* @param dt the time elapsed since the last call * @param dt the time elapsed since the last call
*/ */
bool reposition( sgVec3 p, sgVec3 up, double lon, double lat, double al t, bool reposition( sgVec3 p, sgVec3 up, double lon, double lat, double al t,
double dt = 0.0 ); double dt = 0.0 );
/** draw the cloud layer */ /** draw the cloud layer */
void draw( bool top ); void draw( bool top );
static bool enable_bump_mapping; static bool enable_bump_mapping;
/** return the 3D layer cloud associated with this 2D layer */
SGCloudField *get_layer3D(void) { return layer3D; }
private: private:
struct CloudVertex { struct CloudVertex {
sgVec3 position; sgVec3 position;
sgVec2 texCoord; sgVec2 texCoord;
sgVec3 tangentSpLight; sgVec3 tangentSpLight;
sgVec3 sTangent; sgVec3 sTangent;
sgVec3 tTangent; sgVec3 tTangent;
sgVec3 normal; sgVec3 normal;
sgVec4 color; sgVec4 color;
skipping to change at line 226 skipping to change at line 231
Coverage layer_coverage; Coverage layer_coverage;
float scale; float scale;
float speed; float speed;
float direction; float direction;
// for handling texture coordinates to simulate cloud movement // for handling texture coordinates to simulate cloud movement
// from winds, and to simulate the clouds being tied to ground // from winds, and to simulate the clouds being tied to ground
// position, not view position // position, not view position
// double xoff, yoff; // double xoff, yoff;
double last_lon, last_lat, last_course; double last_lon, last_lat, last_course;
SGCloudField *layer3D;
}; };
// make an ssgSimpleState for a cloud layer given the named texture // make an ssgSimpleState for a cloud layer given the named texture
ssgSimpleState *sgCloudMakeState( const string &path ); ssgSimpleState *sgCloudMakeState( const string &path );
#endif // _SG_CLOUD_HXX_ #endif // _SG_CLOUD_HXX_
 End of changes. 4 change blocks. 
1 lines changed or deleted 8 lines changed or added


 colors.hxx   colors.hxx 
skipping to change at line 21 skipping to change at line 21
// //
// This program is distributed in the hope that it will be useful, but // This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of // WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details. // General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// $Id: colors.hxx,v 1.5 2004/03/22 20:03:53 ehofman Exp $ // $Id: colors.hxx,v 1.6 2005/02/12 12:44:46 ehofman Exp $
#ifndef _SG_COLORS_HXX #ifndef _SG_COLORS_HXX
#define _SG_COLORS_HXX 1 #define _SG_COLORS_HXX 1
#include <math.h> #include <math.h>
#if defined( macintosh ) #if defined( macintosh )
const float system_gamma = 1.4; const float system_gamma = 1.4;
#elif defined (sgi) #elif defined (sgi)
const float system_gamma = 1.7; const float system_gamma = 2.0/1.7;
#else // others #else // others
const float system_gamma = 2.5; const float system_gamma = 2.5;
#endif #endif
// simple architecture independant gamma correction function. // simple architecture independant gamma correction function.
inline void gamma_correct_rgb(float *color, inline void gamma_correct_rgb(float *color,
float reff = 2.5, float system = system_gamma ) float reff = 2.5, float system = system_gamma )
{ {
if (reff == system) if (reff == system)
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 compiler.h   compiler.h 
skipping to change at line 19 skipping to change at line 19
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details. * Library General Public License for more details.
* *
* You should have received a copy of the GNU Library General Public * You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the * License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
* *
* $Id: compiler.h,v 1.15 2005/01/15 14:24:28 ehofman Exp $ * $Id: compiler.h,v 1.21 2005/10/06 11:06:27 ehofman Exp $
* *
************************************************************************** / ************************************************************************** /
/** \file compiler.h /** \file compiler.h
* A set of defines to encapsulate compiler and platform differences. * A set of defines to encapsulate compiler and platform differences.
* Please refer to the source code for full documentation on this file. * Please refer to the source code for full documentation on this file.
* *
* Here is a summary of what this file does. * Here is a summary of what this file does.
* *
* (1) Defines macros for some STL includes which may be affected * (1) Defines macros for some STL includes which may be affected
skipping to change at line 326 skipping to change at line 326
#pragma set woff 1682,3303 #pragma set woff 1682,3303
#if (_COMPILER_VERSION >= 740) #if (_COMPILER_VERSION >= 740)
# pragma set woff 3624 # pragma set woff 3624
#endif #endif
#endif #endif
# define SG_COMPILER_STR "SGI MipsPro compiler version " SG_STRINGIZE(_COM PILER_VERSION) # define SG_COMPILER_STR "SGI MipsPro compiler version " SG_STRINGIZE(_COM PILER_VERSION)
#endif // Native SGI compilers #endif // Native SGI compilers
#if defined ( sun ) #if defined (__sun)
# include <strings.h> # include <strings.h>
# include <memory.h> # include <memory.h>
# if defined ( __cplusplus ) # if defined ( __cplusplus )
// typedef unsigned int size_t; // typedef unsigned int size_t;
extern "C" { extern "C" {
extern void *memmove(void *, const void *, size_t); extern void *memmove(void *, const void *, size_t);
} }
# else # else
extern void *memmove(void *, const void *, size_t); extern void *memmove(void *, const void *, size_t);
# endif // __cplusplus # endif // __cplusplus
skipping to change at line 374 skipping to change at line 374
# define SG_COMPILER_STR "Intel C++ version " SG_STRINGIZE(__ICC) # define SG_COMPILER_STR "Intel C++ version " SG_STRINGIZE(__ICC)
#endif // __ICC #endif // __ICC
// //
// Platform dependent gl.h and glut.h definitions // Platform dependent gl.h and glut.h definitions
// //
#ifdef __APPLE__ #ifdef __APPLE__
# define SG_GL_H <OpenGL/gl.h> # define SG_GL_H <OpenGL/gl.h>
# define SG_GLX_H <AGL/agl.h>
# define SG_GLU_H <OpenGL/glu.h> # define SG_GLU_H <OpenGL/glu.h>
# define SG_GLEXT_H <OpenGL/glext.h> # define SG_GLEXT_H <OpenGL/glext.h>
# define SG_GLUT_H <GLUT/glut.h> # define SG_GLUT_H <GLUT/glut.h>
inline int (isnan)(double r) { return !(r <= 0 || r >= 0); }
#else #else
# define SG_GL_H <GL/gl.h> # define SG_GL_H <GL/gl.h>
# define SG_GLX_H <GL/glx.h>
# define SG_GLU_H <GL/glu.h> # define SG_GLU_H <GL/glu.h>
# define SG_GLEXT_H <GL/glext.h> # define SG_GLEXT_H <GL/glext.h>
# define SG_GLUT_H <GL/glut.h> # define SG_GLUT_H <GL/glut.h>
#endif #endif
// //
// No user modifiable definitions beyond here. // No user modifiable definitions beyond here.
// //
#ifdef SG_NEED_EXPLICIT #ifdef SG_NEED_EXPLICIT
 End of changes. 5 change blocks. 
2 lines changed or deleted 6 lines changed or added


 constants.h   constants.h 
skipping to change at line 22 skipping to change at line 22
// This library is distributed in the hope that it will be useful, // This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details. // Library General Public License for more details.
// //
// You should have received a copy of the GNU Library General Public // You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the // License along with this library; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA. // Boston, MA 02111-1307, USA.
// //
// $Id: constants.h,v 1.4 2004/11/19 21:44:16 curt Exp $ // $Id: constants.h,v 1.5 2005/10/27 08:21:00 ehofman Exp $
/** \file constants.h /** \file constants.h
* Various constant definitions. * Various constant definitions.
*/ */
#ifndef _SG_CONSTANTS_H #ifndef _SG_CONSTANTS_H
#define _SG_CONSTANTS_H #define _SG_CONSTANTS_H
#include <simgear/compiler.h> #include <simgear/compiler.h>
#ifdef _MSC_VER
# define _USE_MATH_DEFINES
#endif
#ifdef SG_HAVE_STD_INCLUDES #ifdef SG_HAVE_STD_INCLUDES
# include <cmath> # include <cmath>
#else #else
# ifdef SG_MATH_EXCEPTION_CLASH # ifdef SG_MATH_EXCEPTION_CLASH
# define exception C_exception # define exception C_exception
# endif # endif
# include <math.h> # include <math.h>
#endif #endif
#include <plib/sg.h> #include <plib/sg.h>
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added


 dome.hxx   dome.hxx 
skipping to change at line 23 skipping to change at line 23
// This library is distributed in the hope that it will be useful, // This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details. // Library General Public License for more details.
// //
// You should have received a copy of the GNU Library General Public // You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the // License along with this library; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA. // Boston, MA 02111-1307, USA.
// //
// $Id: dome.hxx,v 1.4 2004/11/19 21:44:17 curt Exp $ // $Id: dome.hxx,v 1.5 2005/10/23 11:46:41 ehofman Exp $
#ifndef _SKYDOME_HXX #ifndef _SKYDOME_HXX
#define _SKYDOME_HXX #define _SKYDOME_HXX
#ifndef __cplusplus #ifndef __cplusplus
# error This library requires C++ # error This library requires C++
#endif #endif
#include <plib/ssg.h> // plib include #include <plib/ssg.h> // plib include
skipping to change at line 50 skipping to change at line 50
ssgVertexArray *upper_ring_vl; ssgVertexArray *upper_ring_vl;
ssgColourArray *upper_ring_cl; ssgColourArray *upper_ring_cl;
ssgVertexArray *middle_ring_vl; ssgVertexArray *middle_ring_vl;
ssgColourArray *middle_ring_cl; ssgColourArray *middle_ring_cl;
ssgVertexArray *lower_ring_vl; ssgVertexArray *lower_ring_vl;
ssgColourArray *lower_ring_cl; ssgColourArray *lower_ring_cl;
float asl;
public: public:
// Constructor // Constructor
SGSkyDome( void ); SGSkyDome( void );
// Destructor // Destructor
~SGSkyDome( void ); ~SGSkyDome( void );
// initialize the sky object and connect it into our scene graph // initialize the sky object and connect it into our scene graph
// root // root
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 event_mgr.hxx   event_mgr.hxx 
skipping to change at line 54 skipping to change at line 54
int rchild(int n) { return ((n+1)*2 + 1) - 1; } int rchild(int n) { return ((n+1)*2 + 1) - 1; }
double pri(int n) { return _table[n].pri; } double pri(int n) { return _table[n].pri; }
void swap(int a, int b) { void swap(int a, int b) {
HeapEntry tmp = _table[a]; HeapEntry tmp = _table[a];
_table[a] = _table[b]; _table[a] = _table[b];
_table[b] = tmp; _table[b] = tmp;
} }
void siftDown(int n); void siftDown(int n);
void siftUp(int n); void siftUp(int n);
void growArray(); void growArray();
void check();
// gcc complains there is no function specification anywhere.
// void check();
double _now; double _now;
HeapEntry *_table; HeapEntry *_table;
int _numEntries; int _numEntries;
int _tableSize; int _tableSize;
}; };
class SGEventMgr : public SGSubsystem class SGEventMgr : public SGSubsystem
{ {
public: public:
SGEventMgr() { _freezeProp = 0; } SGEventMgr() { _rtProp = 0; }
~SGEventMgr() { _freezeProp = 0; } ~SGEventMgr() { _rtProp = 0; }
virtual void init() {} virtual void init() {}
virtual void update(double delta_time_sec); virtual void update(double delta_time_sec);
void setFreezeProperty(SGPropertyNode* node) { _freezeProp = node; } void setRealtimeProperty(SGPropertyNode* node) { _rtProp = node; }
/** /**
* Add a single function callback event as a repeating task. * Add a single function callback event as a repeating task.
* ex: addTask("foo", &Function ... ) * ex: addTask("foo", &Function ... )
*/ */
template<typename FUNC> template<typename FUNC>
inline void addTask(const char* name, const FUNC& f, inline void addTask(const char* name, const FUNC& f,
double interval, double delay=0, bool sim=false) double interval, double delay=0, bool sim=false)
{ add(make_callback(f), interval, delay, true, sim); } { add(make_callback(f), interval, delay, true, sim); }
skipping to change at line 119 skipping to change at line 121
{ add(make_callback(o,m), 0, delay, false, sim); } { add(make_callback(o,m), 0, delay, false, sim); }
private: private:
friend struct SGTimer; friend struct SGTimer;
void add(SGCallback* cb, void add(SGCallback* cb,
double interval, double delay, double interval, double delay,
bool repeat, bool simtime); bool repeat, bool simtime);
SGPropertyNode* _freezeProp; SGPropertyNode* _freezeProp;
SGPropertyNode* _rtProp;
SGTimerQueue _rtQueue; SGTimerQueue _rtQueue;
SGTimerQueue _simQueue; SGTimerQueue _simQueue;
}; };
#endif // _SG_EVENT_MGR_HXX #endif // _SG_EVENT_MGR_HXX
 End of changes. 4 change blocks. 
4 lines changed or deleted 7 lines changed or added


 extensions.hxx   extensions.hxx 
skipping to change at line 51 skipping to change at line 51
#include SG_GL_H #include SG_GL_H
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#endif #endif
#ifndef APIENTRY #ifndef APIENTRY
#define APIENTRY #define APIENTRY
#endif #endif
// static bool SGSearchExtensionsString(char *extString, char *extName) ; bool SGSearchExtensionsString(const char *extString, const char *extName);
bool SGIsOpenGLExtensionSupported(char *extName); bool SGIsOpenGLExtensionSupported(char *extName);
#ifdef __APPLE__ #ifdef __APPLE__
// don't use an inline function for symbol lookup, since it is too big // don't use an inline function for symbol lookup, since it is too big
void* macosxGetGLProcAddress(const char *func); void* macosxGetGLProcAddress(const char *func);
#elif !defined( WIN32 ) #elif !defined( WIN32 )
void *SGGetGLProcAddress(const char *func); void *SGGetGLProcAddress(const char *func);
skipping to change at line 83 skipping to change at line 83
return (void (*)()) SGGetGLProcAddress(func); return (void (*)()) SGGetGLProcAddress(func);
#endif #endif
} }
/* /*
* OpenGL 1.2 and 1.3 enumerants * OpenGL 1.2 and 1.3 enumerants
*/ */
#ifndef GL_VERSION_1_2 #ifndef GL_VERSION_1_2
#define GL_CLAMP_TO_EDGE 0x812F #define GL_CLAMP_TO_EDGE 0x812F
#define GL_TEXTURE_WRAP_R 0x8072 #define GL_TEXTURE_WRAP_R 0x8072
#define GL_BLEND_EQUATION 0x8009 #define GL_BLEND_EQUATION 0x8009
#define GL_MIN 0x8007 #define GL_MIN 0x8007
#define GL_MAX 0x8008 #define GL_MAX 0x8008
#define GL_FUNC_ADD 0x8006 #define GL_FUNC_ADD 0x8006
#define GL_FUNC_SUBTRACT 0x800A #define GL_FUNC_SUBTRACT 0x800A
#define GL_FUNC_REVERSE_SUBTRACT 0x800B #define GL_FUNC_REVERSE_SUBTRACT 0x800B
#define GL_BLEND_COLOR 0x8005 #define GL_BLEND_COLOR 0x8005
#define GL_CONSTANT_COLOR 0x8001 #define GL_CONSTANT_COLOR 0x8001
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
#define GL_CONSTANT_ALPHA 0x8003 #define GL_CONSTANT_ALPHA 0x8003
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
#endif #endif
typedef void (APIENTRY * glBlendEquationProc) (GLenum mode ); typedef void (APIENTRY * glBlendEquationProc) (GLenum mode );
typedef void (APIENTRY * glBlendColorProc) (GLclampf red, GLclampf green, G Lclampf blue, GLclampf alpha ); typedef void (APIENTRY * glBlendColorProc) (GLclampf red, GLclampf green, G Lclampf blue, GLclampf alpha );
/* OpenGL extension declarations */ /* OpenGL extension declarations */
/* /*
* glPointParameterf and glPointParameterfv * glPointParameterf and glPointParameterfv
*/ */
#ifndef GL_EXT_point_parameters #ifndef GL_EXT_point_parameters
#define GL_EXT_point_parameters 1 #define GL_EXT_point_parameters 1
#define GL_POINT_SIZE_MIN_EXT 0x8126 #define GL_POINT_SIZE_MIN_EXT 0x8126
#define GL_DISTANCE_ATTENUATION_EXT 0x8129 #define GL_DISTANCE_ATTENUATION_EXT 0x8129
#endif #endif
#ifndef GL_ARB_point_parameters #ifndef GL_ARB_point_parameters
#define GL_ARB_point_parameters 1 #define GL_ARB_point_parameters 1
#define GL_POINT_SIZE_MIN_ARB 0x8126 #define GL_POINT_SIZE_MIN_ARB 0x8126
#define GL_DISTANCE_ATTENUATION_ARB 0x8129 #define GL_DISTANCE_ATTENUATION_ARB 0x8129
#endif #endif
typedef void (APIENTRY * glPointParameterfProc)(GLenum pname, GLfloat param ); typedef void (APIENTRY * glPointParameterfProc)(GLenum pname, GLfloat param );
typedef void (APIENTRY * glPointParameterfvProc)(GLenum pname, const GLfloa t *params); typedef void (APIENTRY * glPointParameterfvProc)(GLenum pname, const GLfloa t *params);
/* /*
* glActiveTextureARB * glActiveTextureARB
*/ */
#ifndef GL_ARB_multitexture #ifndef GL_ARB_multitexture
#define GL_ARB_multitexture 1 #define GL_ARB_multitexture 1
#define GL_TEXTURE0_ARB 0x84C0 #define GL_TEXTURE0_ARB 0x84
#define GL_TEXTURE1_ARB 0x84C1 C0
#define GL_TEXTURE2_ARB 0x84C2 #define GL_TEXTURE1_ARB 0x84
#define GL_TEXTURE3_ARB 0x84C3 C1
#define GL_TEXTURE4_ARB 0x84C4 #define GL_TEXTURE2_ARB 0x84
#define GL_TEXTURE5_ARB 0x84C5 C2
#define GL_TEXTURE6_ARB 0x84C6 #define GL_TEXTURE3_ARB 0x84
#define GL_TEXTURE7_ARB 0x84C7 C3
#define GL_TEXTURE8_ARB 0x84C8 #define GL_TEXTURE4_ARB 0x84
#define GL_TEXTURE9_ARB 0x84C9 C4
#define GL_TEXTURE10_ARB 0x84CA #define GL_TEXTURE5_ARB 0x84
#define GL_TEXTURE11_ARB 0x84CB C5
#define GL_TEXTURE12_ARB 0x84CC #define GL_TEXTURE6_ARB 0x84
#define GL_TEXTURE13_ARB 0x84CD C6
#define GL_TEXTURE14_ARB 0x84CE #define GL_TEXTURE7_ARB 0x84
#define GL_TEXTURE15_ARB 0x84CF C7
#define GL_TEXTURE16_ARB 0x84D0 #define GL_TEXTURE8_ARB 0x84
#define GL_TEXTURE17_ARB 0x84D1 C8
#define GL_TEXTURE18_ARB 0x84D2 #define GL_TEXTURE9_ARB 0x84
#define GL_TEXTURE19_ARB 0x84D3 C9
#define GL_TEXTURE20_ARB 0x84D4 #define GL_TEXTURE10_ARB 0x84CA
#define GL_TEXTURE21_ARB 0x84D5 #define GL_TEXTURE11_ARB 0x84CB
#define GL_TEXTURE22_ARB 0x84D6 #define GL_TEXTURE12_ARB 0x84CC
#define GL_TEXTURE23_ARB 0x84D7 #define GL_TEXTURE13_ARB 0x84CD
#define GL_TEXTURE24_ARB 0x84D8 #define GL_TEXTURE14_ARB 0x84CE
#define GL_TEXTURE25_ARB 0x84D9 #define GL_TEXTURE15_ARB 0x84CF
#define GL_TEXTURE26_ARB 0x84DA #define GL_TEXTURE16_ARB 0x84D0
#define GL_TEXTURE27_ARB 0x84DB #define GL_TEXTURE17_ARB 0x84D1
#define GL_TEXTURE28_ARB 0x84DC #define GL_TEXTURE18_ARB 0x84D2
#define GL_TEXTURE29_ARB 0x84DD #define GL_TEXTURE19_ARB 0x84D3
#define GL_TEXTURE30_ARB 0x84DE #define GL_TEXTURE20_ARB 0x84D4
#define GL_TEXTURE31_ARB 0x84DF #define GL_TEXTURE21_ARB 0x84D5
#define GL_ACTIVE_TEXTURE_ARB 0x84E0 #define GL_TEXTURE22_ARB 0x84D6
#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 #define GL_TEXTURE23_ARB 0x84D7
#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 #define GL_TEXTURE24_ARB 0x84D8
#define GL_TEXTURE25_ARB 0x84D9
#define GL_TEXTURE26_ARB 0x84DA
#define GL_TEXTURE27_ARB 0x84DB
#define GL_TEXTURE28_ARB 0x84DC
#define GL_TEXTURE29_ARB 0x84DD
#define GL_TEXTURE30_ARB 0x84DE
#define GL_TEXTURE31_ARB 0x84DF
#define GL_ACTIVE_TEXTURE_ARB 0x84E0
#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
#endif #endif
typedef void (APIENTRY * glActiveTextureProc)(GLenum texture); typedef void (APIENTRY * glActiveTextureProc)(GLenum texture);
typedef void (APIENTRY * glClientActiveTextureProc)(GLenum texture); typedef void (APIENTRY * glClientActiveTextureProc)(GLenum texture);
/* /*
* GL_EXT_separate_specular_color * GL_EXT_separate_specular_color
*/ */
#ifndef GL_LIGHT_MODEL_COLOR_CONTROL #ifndef GL_LIGHT_MODEL_COLOR_CONTROL
#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 #define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
#define GL_SINGLE_COLOR 0x81F9 #define GL_SINGLE_COLOR 0x81
#define GL_SEPARATE_SPECULAR_COLOR 0x81FA F9
#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
#endif #endif
/* /*
* GL_ARB_texture_cube_map * GL_ARB_texture_cube_map
*/ */
#ifndef GL_ARB_texture_cube_map #ifndef GL_ARB_texture_cube_map
#define GL_ARB_texture_cube_map 1 #define GL_ARB_texture_cube_map 1
#define GL_NORMAL_MAP_ARB 0x8511 #define GL_NORMAL_MAP_ARB 0x8511
#define GL_REFLECTION_MAP_ARB 0x8512 #define GL_REFLECTION_MAP_ARB 0x8512
#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 #define GL_TEXTURE_CUBE_MAP_ARB 0x85
#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 13
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 #define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x85
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 14
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
#endif #endif
/* /*
* GL_ARB_texture_env_combine * GL_ARB_texture_env_combine
*/ */
#ifndef GL_ARB_texture_env_combine #ifndef GL_ARB_texture_env_combine
#define GL_ARB_texture_env_combine 1 #define GL_ARB_texture_env_combine 1
#define GL_COMBINE_ARB 0x8570 #define GL_COMBINE_ARB 0x8570
#define GL_COMBINE_RGB_ARB 0x8571 #define GL_COMBINE_RGB_ARB 0x8571
#define GL_COMBINE_ALPHA_ARB 0x8572 #define GL_COMBINE_ALPHA_ARB 0x8572
#define GL_RGB_SCALE_ARB 0x8573 #define GL_RGB_SCALE_ARB 0x8573
#define GL_ADD_SIGNED_ARB 0x8574 #define GL_ADD_SIGNED_ARB 0x8574
#define GL_INTERPOLATE_ARB 0x8575 #define GL_INTERPOLATE_ARB 0x8575
#define GL_CONSTANT_ARB 0x8576 #define GL_SUBTRACT_ARB 0x84E7
#define GL_PRIMARY_COLOR_ARB 0x8577 #define GL_CONSTANT_ARB 0x85
#define GL_PREVIOUS_ARB 0x8578 76
#define GL_SOURCE0_RGB_ARB 0x8580 #define GL_PRIMARY_COLOR_ARB 0x8577
#define GL_SOURCE1_RGB_ARB 0x8581 #define GL_PREVIOUS_ARB 0x85
#define GL_SOURCE2_RGB_ARB 0x8582 78
#define GL_SOURCE0_ALPHA_ARB 0x8588 #define GL_SOURCE0_RGB_ARB 0x8580
#define GL_SOURCE1_ALPHA_ARB 0x8589 #define GL_SOURCE1_RGB_ARB 0x8581
#define GL_SOURCE2_ALPHA_ARB 0x858A #define GL_SOURCE2_RGB_ARB 0x8582
#define GL_OPERAND0_RGB_ARB 0x8590 #define GL_SOURCE0_ALPHA_ARB 0x8588
#define GL_OPERAND1_RGB_ARB 0x8591 #define GL_SOURCE1_ALPHA_ARB 0x8589
#define GL_OPERAND2_RGB_ARB 0x8592 #define GL_SOURCE2_ALPHA_ARB 0x858A
#define GL_OPERAND0_ALPHA_ARB 0x8598 #define GL_OPERAND0_RGB_ARB 0x8590
#define GL_OPERAND1_ALPHA_ARB 0x8599 #define GL_OPERAND1_RGB_ARB 0x8591
#define GL_OPERAND2_ALPHA_ARB 0x859A #define GL_OPERAND2_RGB_ARB 0x8592
#define GL_OPERAND0_ALPHA_ARB 0x8598
#define GL_OPERAND1_ALPHA_ARB 0x8599
#define GL_OPERAND2_ALPHA_ARB 0x859A
#endif #endif
/* /*
* GL_ARB_texture_env_dot3 * GL_ARB_texture_env_dot3
*/ */
#ifndef GL_ARB_texture_env_dot3 #ifndef GL_ARB_texture_env_dot3
#define GL_ARB_texture_env_dot3 1 #define GL_ARB_texture_env_dot3 1
#define GL_DOT3_RGB_ARB 0x86AE #define GL_DOT3_RGB_ARB 0x86
#define GL_DOT3_RGBA_ARB 0x86AF AE
#define GL_DOT3_RGBA_ARB 0x86AF
#endif #endif
/*
* ARB_depth_texture
*/
#ifndef GL_ARB_depth_texture
#define GL_ARB_depth_texture 1
#define GL_DEPTH_COMPONENT16_ARB 0x81A5
#define GL_DEPTH_COMPONENT24_ARB 0x81A6
#define GL_DEPTH_COMPONENT32_ARB 0x81A7
#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
#endif
/*
* ARB_multisample
*/
#ifndef GL_ARB_multisample
#define GL_ARB_multisample 1
#define GL_MULTISAMPLE_ARB 0x809D
#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x80
9E
#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
#define GL_SAMPLE_COVERAGE_ARB 0x80A0
#define GL_SAMPLE_BUFFERS_ARB 0x80A8
#define GL_SAMPLES_ARB 0x80A9
#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
#define GL_MULTISAMPLE_BIT_ARB 0x20000000
#define GL_DOUBLEBUFFER 0x0C
32
#define GL_AUX_BUFFERS 0x0C00
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
#define WGL_SAMPLES_ARB 0x20
42
#endif
#ifndef GL_SGIS_generate_mipmap
#define GL_SGIS_generate_mipmap 1
#define GL_GENERATE_MIPMAP_SGIS 0x81
91
#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
#endif
/* WGL spcific OpenGL extenstions */
#ifdef WIN32
/*
* WGL_ARB_extensions_string
*/
#ifndef WGL_ARB_extensions_string
#define WGL_ARB_extensions_string 1
typedef const char * (APIENTRY * wglGetExtensionsStringARBProc) (HDC hDC);
#endif
/*
* WGL_ARB_pbuffer
*/
#ifndef WGL_ARB_pbuffer
#define WGL_ARB_pbuffer 1
#define WGL_DRAW_TO_PBUFFER_ARB 0x20
2D
#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
#define WGL_PBUFFER_LARGEST_ARB 0x20
33
#define WGL_PBUFFER_WIDTH_ARB 0x2034
#define WGL_PBUFFER_HEIGHT_ARB 0x2035
#define WGL_PBUFFER_LOST_ARB 0x2036
DECLARE_HANDLE(HPBUFFERARB);
typedef HPBUFFERARB (APIENTRY * wglCreatePbufferARBProc) (HDC hDC, int iPix
elFormat, int iWidth, int iHeight, const int *piAttribList);
typedef HDC (APIENTRY * wglGetPbufferDCARBProc) (HPBUFFERARB hPbuffer);
typedef int (APIENTRY * wglReleasePbufferDCARBProc) (HPBUFFERARB hPbuffer,
HDC hDC);
typedef BOOL (APIENTRY * wglDestroyPbufferARBProc) (HPBUFFERARB hPbuffer);
typedef BOOL (APIENTRY * wglQueryPbufferARBProc) (HPBUFFERARB hPbuffer, int
iAttribute, int *piValue);
#endif
/*
* ARB_pixel_format
*/
#ifndef WGL_ARB_pixel_format
#define WGL_ARB_pixel_format 1
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
#define WGL_DRAW_TO_BITMAP_ARB 0x2002
#define WGL_ACCELERATION_ARB 0x2003
#define WGL_NEED_PALETTE_ARB 0x2004
#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
#define WGL_SWAP_METHOD_ARB 0x2007
#define WGL_NUMBER_OVERLAYS_ARB 0x20
08
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
#define WGL_TRANSPARENT_ARB 0x200A
#define WGL_SHARE_DEPTH_ARB 0x200C
#define WGL_SHARE_STENCIL_ARB 0x200D
#define WGL_SHARE_ACCUM_ARB 0x200E
#define WGL_SUPPORT_GDI_ARB 0x200F
#define WGL_SUPPORT_OPENGL_ARB 0x2010
#define WGL_DOUBLE_BUFFER_ARB 0x2011
#define WGL_STEREO_ARB 0x2012
#define WGL_PIXEL_TYPE_ARB 0x2013
#define WGL_COLOR_BITS_ARB 0x2014
#define WGL_RED_BITS_ARB 0x2015
#define WGL_RED_SHIFT_ARB 0x2016
#define WGL_GREEN_BITS_ARB 0x2017
#define WGL_GREEN_SHIFT_ARB 0x2018
#define WGL_BLUE_BITS_ARB 0x2019
#define WGL_BLUE_SHIFT_ARB 0x201A
#define WGL_ALPHA_BITS_ARB 0x201B
#define WGL_ALPHA_SHIFT_ARB 0x201C
#define WGL_ACCUM_BITS_ARB 0x201D
#define WGL_ACCUM_RED_BITS_ARB 0x201E
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
#define WGL_ACCUM_BLUE_BITS_ARB 0x20
20
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
#define WGL_DEPTH_BITS_ARB 0x2022
#define WGL_STENCIL_BITS_ARB 0x2023
#define WGL_AUX_BUFFERS_ARB 0x2024
#define WGL_NO_ACCELERATION_ARB 0x20
25
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
#define WGL_FULL_ACCELERATION_ARB 0x2027
#define WGL_SWAP_EXCHANGE_ARB 0x2028
#define WGL_SWAP_COPY_ARB 0x2029
#define WGL_SWAP_UNDEFINED_ARB 0x202A
#define WGL_TYPE_RGBA_ARB 0x202B
#define WGL_TYPE_COLORINDEX_ARB 0x20
2C
#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x20
38
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x20
3A
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x20
3B
typedef BOOL (APIENTRY * wglGetPixelFormatAttribivARBProc) (HDC hdc, int iP
ixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int
*piValues);
typedef BOOL (APIENTRY * wglGetPixelFormatAttribfvARBProc) (HDC hdc, int iP
ixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLO
AT *pfValues);
typedef BOOL (APIENTRY * wglChoosePixelFormatARBProc) (HDC hdc, const int *
piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats
, UINT *nNumFormats);
#endif
/*
* ARB_render_texture
*/
#ifndef WGL_ARB_render_texture
#define WGL_ARB_render_texture 1
#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
#define WGL_TEXTURE_FORMAT_ARB 0x2072
#define WGL_TEXTURE_TARGET_ARB 0x2073
#define WGL_MIPMAP_TEXTURE_ARB 0x2074
#define WGL_TEXTURE_RGB_ARB 0x2075
#define WGL_TEXTURE_RGBA_ARB 0x2076
#define WGL_NO_TEXTURE_ARB 0x2077
#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
#define WGL_TEXTURE_1D_ARB 0x2079
#define WGL_TEXTURE_2D_ARB 0x207A
#define WGL_NO_TEXTURE_ARB 0x2077
#define WGL_MIPMAP_LEVEL_ARB 0x207B
#define WGL_CUBE_MAP_FACE_ARB 0x207C
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
#define WGL_FRONT_LEFT_ARB 0x2083
#define WGL_FRONT_RIGHT_ARB 0x2084
#define WGL_BACK_LEFT_ARB 0x2085
#define WGL_BACK_RIGHT_ARB 0x2086
#define WGL_AUX0_ARB 0x2087
#define WGL_AUX1_ARB 0x2088
#define WGL_AUX2_ARB 0x2089
#define WGL_AUX3_ARB 0x208A
#define WGL_AUX4_ARB 0x208B
#define WGL_AUX5_ARB 0x208C
#define WGL_AUX6_ARB 0x208D
#define WGL_AUX7_ARB 0x208E
#define WGL_AUX8_ARB 0x208F
#define WGL_AUX9_ARB 0x2090
typedef BOOL (APIENTRY * wglBindTexImageARBProc) (HPBUFFERARB hPbuffer, int
iBuffer);
typedef BOOL (APIENTRY * wglReleaseTexImageARBProc) (HPBUFFERARB hPbuffer,
int iBuffer);
typedef BOOL (APIENTRY * wglSetPbufferAttribARBProc) (HPBUFFERARB hPbuffer,
const int *piAttribList);
#endif
#elif !defined(__APPLE__) /* !WIN32 */
/* GLX pcific OpenGL extenstions */
#include <GL/glx.h>
#ifndef GLX_ARB_multisample
#define GLX_ARB_multisample1
#define GLX_SAMPLE_BUFFERS_ARB 100001
#define GLX_SAMPLES_ARB 1000
00
#endif
#ifndef GLX_SGIX_pbuffer
#define GLX_SGIX_pbuffer 1
#define GLX_DOUBLEBUFFER 5
#define GLX_AUX_BUFFERS 0x00
000010
#endif
#ifndef GLXPbuffer
# ifdef GLXPbufferSGIX
# define GLXPbuffer GLXPbufferSGIX
# endif
#endif
#ifndef GLXFBConfig
# ifdef GLXFBConfigSGIX
# define GLXFBConfig GLXFBConfigSGIX
# endif
#endif
typedef GLXFBConfig *(*glXChooseFBConfigProc) (Display *dpy, int screen, in
t *attribList, int *nitems);
typedef GLXPbuffer (*glXCreateGLXPbufferProc) (Display *dpy, GLXFBConfig co
nfig, unsigned int width, unsigned int height, int *attrib_list);
typedef GLXPbuffer (*glXCreatePbufferProc) (Display *dpy, GLXFBConfig confi
g, int *attrib_list);
typedef XVisualInfo *(*glXGetVisualFromFBConfigProc) (Display *dpy, GLXFBCo
nfig config);
typedef GLXContext (*glXCreateContextWithConfigProc) (Display *dpy, GLXFBC
onfig config, int render_type, GLXContext share_list, Bool direct);
typedef GLXContext (*glXCreateContextProc) (Display *dpy, XVisualInfo *vis,
GLXContext shareList, Bool direct);
typedef void (*glXDestroyPbufferProc) (Display *dpy, GLXPbuffer pbuf);
typedef int (*glXQueryGLXPbufferSGIXProc) (Display *, GLXPbuffer, int, unsi
gned int *);
typedef void (*glXQueryDrawableProc) (Display *, GLXDrawable, int, unsigned
int *);
#endif /* WIN32 */
/* NVIDIA specific extension */
/*
* NV_texture_rectangle
*/
#ifndef GL_NV_texture_rectangle
#define GL_NV_texture_rectangle 1
#define GL_TEXTURE_RECTANGLE_NV 0x84
F5
#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84
F6
#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
#endif
/*
* WGL_NV_texture_rectangle
*/
#ifndef WGL_NV_texture_rectangle
#define WGL_NV_texture_rectangle 1
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
#define WGL_TEXTURE_RECTANGLE_NV 0x20A2
#endif
/*
* NV_render_depth_texture
*/
#ifndef WGL_NV_render_depth_texture
#define WGL_NV_render_depth_texture 1
#define WGL_NO_TEXTURE_ARB 0x2077
#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
#define WGL_DEPTH_COMPONENT_NV 0x20A7
#endif
/*
* NV_float_buffer
*/
#ifndef GL_NV_float_buffer
#define GL_NV_float_buffer 1
#define GL_FLOAT_R_NV 0x8880
#define GL_FLOAT_RG_NV 0x8881
#define GL_FLOAT_RGB_NV 0x88
82
#define GL_FLOAT_RGBA_NV 0x8883
#define GL_FLOAT_R16_NV 0x88
84
#define GL_FLOAT_R32_NV 0x88
85
#define GL_FLOAT_RG16_NV 0x8886
#define GL_FLOAT_RG32_NV 0x8887
#define GL_FLOAT_RGB16_NV 0x8888
#define GL_FLOAT_RGB32_NV 0x8889
#define GL_FLOAT_RGBA16_NV 0x888A
#define GL_FLOAT_RGBA32_NV 0x888B
#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
#define GL_FLOAT_RGBA_MODE_NV 0x888E
#endif
#ifndef GLX_NV_float_buffer
#define GLX_NV_float_buffer 1
#define GLX_FLOAT_COMPONENTS_NV 0x20
B0
#define GLX_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
#define GLX_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
#define GLX_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
#define GLX_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
#define GLX_TEXTURE_FLOAT_R_NV 0x20B5
#define GLX_TEXTURE_FLOAT_RG_NV 0x20
B6
#define GLX_TEXTURE_FLOAT_RGB_NV 0x20B7
#define GLX_TEXTURE_FLOAT_RGBA_NV 0x20B8
#endif
#ifndef WGL_NV_float_buffer
#define WGL_NV_float_buffer 1
#define WGL_FLOAT_COMPONENTS_NV 0x20
B0
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
#define WGL_TEXTURE_FLOAT_R_NV 0x20B5
#define WGL_TEXTURE_FLOAT_RG_NV 0x20
B6
#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7
#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8
#endif
/* ATI specific extension */
/*
* ATI_pixel_format_float
*/
#ifndef WGL_ATI_pixel_format_float
#define WGL_ATI_pixel_format_float 1
#define WGL_TYPE_RGBA_FLOAT_ATI 0x21
A0
#define GL_RGBA_FLOAT_MODE_ATI 0x8820
#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
#endif
/*
* ATI_texture_float
*/
#ifndef GL_ATI_texture_float
#define GL_ATI_texture_float 1
#define GL_RGBA_FLOAT32_ATI 0x8814
#define GL_RGB_FLOAT32_ATI 0x8815
#define GL_ALPHA_FLOAT32_ATI 0x8816
#define GL_INTENSITY_FLOAT32_ATI 0x8817
#define GL_LUMINANCE_FLOAT32_ATI 0x8818
#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
#define GL_RGBA_FLOAT16_ATI 0x881A
#define GL_RGB_FLOAT16_ATI 0x881B
#define GL_ALPHA_FLOAT16_ATI 0x881C
#define GL_INTENSITY_FLOAT16_ATI 0x881D
#define GL_LUMINANCE_FLOAT16_ATI 0x881E
#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
#endif
/*
* ARB_vertex_program
*/
#ifndef GL_ARB_vertex_program
#define GL_ARB_vertex_program 1
#define GL_COLOR_SUM_ARB 0x8458
#define GL_VERTEX_PROGRAM_ARB 0x8620
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
#define GL_PROGRAM_LENGTH_ARB 0x8627
#define GL_PROGRAM_STRING_ARB 0x8628
#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
#define GL_CURRENT_MATRIX_ARB 0x8641
#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
#define GL_PROGRAM_BINDING_ARB 0x8677
#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
#define GL_PROGRAM_FORMAT_ARB 0x8876
#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
#define GL_MATRIX0_ARB 0x88C0
#define GL_MATRIX1_ARB 0x88C1
#define GL_MATRIX2_ARB 0x88C2
#define GL_MATRIX3_ARB 0x88C3
#define GL_MATRIX4_ARB 0x88C4
#define GL_MATRIX5_ARB 0x88C5
#define GL_MATRIX6_ARB 0x88C6
#define GL_MATRIX7_ARB 0x88C7
#define GL_MATRIX8_ARB 0x88C8
#define GL_MATRIX9_ARB 0x88C9
#define GL_MATRIX10_ARB 0x88CA
#define GL_MATRIX11_ARB 0x88CB
#define GL_MATRIX12_ARB 0x88CC
#define GL_MATRIX13_ARB 0x88CD
#define GL_MATRIX14_ARB 0x88CE
#define GL_MATRIX15_ARB 0x88CF
#define GL_MATRIX16_ARB 0x88D0
#define GL_MATRIX17_ARB 0x88D1
#define GL_MATRIX18_ARB 0x88D2
#define GL_MATRIX19_ARB 0x88D3
#define GL_MATRIX20_ARB 0x88D4
#define GL_MATRIX21_ARB 0x88D5
#define GL_MATRIX22_ARB 0x88D6
#define GL_MATRIX23_ARB 0x88D7
#define GL_MATRIX24_ARB 0x88D8
#define GL_MATRIX25_ARB 0x88D9
#define GL_MATRIX26_ARB 0x88DA
#define GL_MATRIX27_ARB 0x88DB
#define GL_MATRIX28_ARB 0x88DC
#define GL_MATRIX29_ARB 0x88DD
#define GL_MATRIX30_ARB 0x88DE
#define GL_MATRIX31_ARB 0x88DF
#endif
/*
* ARB_fragment_program
*/
#ifndef GL_ARB_fragment_program
#define GL_ARB_fragment_program 1
#define GL_FRAGMENT_PROGRAM_ARB 0x8804
#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
#endif
typedef void (APIENTRY * glVertexAttrib1dProc) (GLuint index, GLdouble x);
typedef void (APIENTRY * glVertexAttrib1dvProc) (GLuint index, const GLdoub
le *v);
typedef void (APIENTRY * glVertexAttrib1fProc) (GLuint index, GLfloat x);
typedef void (APIENTRY * glVertexAttrib1fvProc) (GLuint index, const GLfloa
t *v);
typedef void (APIENTRY * glVertexAttrib1sProc) (GLuint index, GLshort x);
typedef void (APIENTRY * glVertexAttrib1svProc) (GLuint index, const GLshor
t *v);
typedef void (APIENTRY * glVertexAttrib2dProc) (GLuint index, GLdouble x, G
Ldouble y);
typedef void (APIENTRY * glVertexAttrib2dvProc) (GLuint index, const GLdoub
le *v);
typedef void (APIENTRY * glVertexAttrib2fProc) (GLuint index, GLfloat x, GL
float y);
typedef void (APIENTRY * glVertexAttrib2fvProc) (GLuint index, const GLfloa
t *v);
typedef void (APIENTRY * glVertexAttrib2sProc) (GLuint index, GLshort x, GL
short y);
typedef void (APIENTRY * glVertexAttrib2svProc) (GLuint index, const GLshor
t *v);
typedef void (APIENTRY * glVertexAttrib3dProc) (GLuint index, GLdouble x, G
Ldouble y, GLdouble z);
typedef void (APIENTRY * glVertexAttrib3dvProc) (GLuint index, const GLdoub
le *v);
typedef void (APIENTRY * glVertexAttrib3fProc) (GLuint index, GLfloat x, GL
float y, GLfloat z);
typedef void (APIENTRY * glVertexAttrib3fvProc) (GLuint index, const GLfloa
t *v);
typedef void (APIENTRY * glVertexAttrib3sProc) (GLuint index, GLshort x, GL
short y, GLshort z);
typedef void (APIENTRY * glVertexAttrib3svProc) (GLuint index, const GLshor
t *v);
typedef void (APIENTRY * glVertexAttrib4NbvProc) (GLuint index, const GLbyt
e *v);
typedef void (APIENTRY * glVertexAttrib4NivProc) (GLuint index, const GLint
*v);
typedef void (APIENTRY * glVertexAttrib4NsvProc) (GLuint index, const GLsho
rt *v);
typedef void (APIENTRY * glVertexAttrib4NubProc) (GLuint index, GLubyte x,
GLubyte y, GLubyte z, GLubyte w);
typedef void (APIENTRY * glVertexAttrib4NubvProc) (GLuint index, const GLub
yte *v);
typedef void (APIENTRY * glVertexAttrib4NuivProc) (GLuint index, const GLui
nt *v);
typedef void (APIENTRY * glVertexAttrib4NusvProc) (GLuint index, const GLus
hort *v);
typedef void (APIENTRY * glVertexAttrib4bvProc) (GLuint index, const GLbyte
*v);
typedef void (APIENTRY * glVertexAttrib4dProc) (GLuint index, GLdouble x, G
Ldouble y, GLdouble z, GLdouble w);
typedef void (APIENTRY * glVertexAttrib4dvProc) (GLuint index, const GLdoub
le *v);
typedef void (APIENTRY * glVertexAttrib4fProc) (GLuint index, GLfloat x, GL
float y, GLfloat z, GLfloat w);
typedef void (APIENTRY * glVertexAttrib4fvProc) (GLuint index, const GLfloa
t *v);
typedef void (APIENTRY * glVertexAttrib4ivProc) (GLuint index, const GLint
*v);
typedef void (APIENTRY * glVertexAttrib4sProc) (GLuint index, GLshort x, GL
short y, GLshort z, GLshort w);
typedef void (APIENTRY * glVertexAttrib4svProc) (GLuint index, const GLshor
t *v);
typedef void (APIENTRY * glVertexAttrib4ubvProc) (GLuint index, const GLuby
te *v);
typedef void (APIENTRY * glVertexAttrib4uivProc) (GLuint index, const GLuin
t *v);
typedef void (APIENTRY * glVertexAttrib4usvProc) (GLuint index, const GLush
ort *v);
typedef void (APIENTRY * glVertexAttribPointerProc) (GLuint index, GLint si
ze, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointe
r);
typedef void (APIENTRY * glEnableVertexAttribArrayProc) (GLuint index);
typedef void (APIENTRY * glDisableVertexAttribArrayProc) (GLuint index);
typedef void (APIENTRY * glProgramStringProc) (GLenum target, GLenum format
, GLsizei len, const GLvoid *string);
typedef void (APIENTRY * glBindProgramProc) (GLenum target, GLuint program)
;
typedef void (APIENTRY * glDeleteProgramsProc) (GLsizei n, const GLuint *pr
ograms);
typedef void (APIENTRY * glGenProgramsProc) (GLsizei n, GLuint *programs);
typedef void (APIENTRY * glProgramEnvParameter4dProc) (GLenum target, GLuin
t index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
typedef void (APIENTRY * glProgramEnvParameter4dvProc) (GLenum target, GLui
nt index, const GLdouble *params);
typedef void (APIENTRY * glProgramEnvParameter4fProc) (GLenum target, GLuin
t index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
typedef void (APIENTRY * glProgramEnvParameter4fvProc) (GLenum target, GLui
nt index, const GLfloat *params);
typedef void (APIENTRY * glProgramLocalParameter4dProc) (GLenum target, GLu
int index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
typedef void (APIENTRY * glProgramLocalParameter4dvProc) (GLenum target, GL
uint index, const GLdouble *params);
typedef void (APIENTRY * glProgramLocalParameter4fProc) (GLenum target, GLu
int index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
typedef void (APIENTRY * glProgramLocalParameter4fvProc) (GLenum target, GL
uint index, const GLfloat *params);
typedef void (APIENTRY * glGetProgramEnvParameterdvProc) (GLenum target, GL
uint index, GLdouble *params);
typedef void (APIENTRY * glGetProgramEnvParameterfvProc) (GLenum target, GL
uint index, GLfloat *params);
typedef void (APIENTRY * glGetProgramLocalParameterdvProc) (GLenum target,
GLuint index, GLdouble *params);
typedef void (APIENTRY * glGetProgramLocalParameterfvProc) (GLenum target,
GLuint index, GLfloat *params);
typedef void (APIENTRY * glGetProgramivProc) (GLenum target, GLenum pname,
GLint *params);
typedef void (APIENTRY * glGetProgramStringProc) (GLenum target, GLenum pna
me, GLvoid *string);
typedef void (APIENTRY * glGetVertexAttribdvProc) (GLuint index, GLenum pna
me, GLdouble *params);
typedef void (APIENTRY * glGetVertexAttribfvProc) (GLuint index, GLenum pna
me, GLfloat *params);
typedef void (APIENTRY * glGetVertexAttribivProc) (GLuint index, GLenum pna
me, GLint *params);
typedef void (APIENTRY * glGetVertexAttribPointervProc) (GLuint index, GLen
um pname, GLvoid* *pointer);
typedef GLboolean (APIENTRY * glIsProgramProc) (GLuint program);
/*
* ARB_shader_objects
*/
#ifndef GL_ARB_shader_objects
#define GL_ARB_shader_objects 1
/* GL types for handling shader object handles and program/shader text */
typedef char GLcharARB; /* native character */
typedef unsigned int GLhandleARB; /* shader object handle */
#define GL_PROGRAM_OBJECT_ARB 0x8B40
#define GL_SHADER_OBJECT_ARB 0x8B48
#define GL_OBJECT_TYPE_ARB 0x8B4E
#define GL_OBJECT_SUBTYPE_ARB 0x8B4F
#define GL_FLOAT_VEC2_ARB 0x8B50
#define GL_FLOAT_VEC3_ARB 0x8B51
#define GL_FLOAT_VEC4_ARB 0x8B52
#define GL_INT_VEC2_ARB 0x8B53
#define GL_INT_VEC3_ARB 0x8B54
#define GL_INT_VEC4_ARB 0x8B55
#define GL_BOOL_ARB 0x8B56
#define GL_BOOL_VEC2_ARB 0x8B57
#define GL_BOOL_VEC3_ARB 0x8B58
#define GL_BOOL_VEC4_ARB 0x8B59
#define GL_FLOAT_MAT2_ARB 0x8B5A
#define GL_FLOAT_MAT3_ARB 0x8B5B
#define GL_FLOAT_MAT4_ARB 0x8B5C
#define GL_SAMPLER_1D_ARB 0x8B5D
#define GL_SAMPLER_2D_ARB 0x8B5E
#define GL_SAMPLER_3D_ARB 0x8B5F
#define GL_SAMPLER_CUBE_ARB 0x8B60
#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
#define GL_SAMPLER_2D_RECT_ARB 0x8B63
#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
#define GL_OBJECT_LINK_STATUS_ARB 0x8B82
#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
#endif
typedef void (APIENTRY * glDeleteObjectProc) (GLhandleARB obj);
typedef GLhandleARB (APIENTRY * glGetHandleProc) (GLenum pname);
typedef void (APIENTRY * glDetachObjectProc) (GLhandleARB containerObj, GLh
andleARB attachedObj);
typedef GLhandleARB (APIENTRY * glCreateShaderObjectProc) (GLenum shaderTyp
e);
typedef void (APIENTRY * glShaderSourceProc) (GLhandleARB shaderObj, GLsize
i count, const GLcharARB* *string, const GLint *length);
typedef void (APIENTRY * glCompileShaderProc) (GLhandleARB shaderObj);
typedef GLhandleARB (APIENTRY * glCreateProgramObjectProc) (void);
typedef void (APIENTRY * glAttachObjectProc) (GLhandleARB containerObj, GLh
andleARB obj);
typedef void (APIENTRY * glLinkProgramProc) (GLhandleARB programObj);
typedef void (APIENTRY * glUseProgramObjectProc) (GLhandleARB programObj);
typedef void (APIENTRY * glValidateProgramProc) (GLhandleARB programObj);
typedef void (APIENTRY * glUniform1fProc) (GLint location, GLfloat v0);
typedef void (APIENTRY * glUniform2fProc) (GLint location, GLfloat v0, GLfl
oat v1);
typedef void (APIENTRY * glUniform3fProc) (GLint location, GLfloat v0, GLfl
oat v1, GLfloat v2);
typedef void (APIENTRY * glUniform4fProc) (GLint location, GLfloat v0, GLfl
oat v1, GLfloat v2, GLfloat v3);
typedef void (APIENTRY * glUniform1iProc) (GLint location, GLint v0);
typedef void (APIENTRY * glUniform2iProc) (GLint location, GLint v0, GLint
v1);
typedef void (APIENTRY * glUniform3iProc) (GLint location, GLint v0, GLint
v1, GLint v2);
typedef void (APIENTRY * glUniform4iProc) (GLint location, GLint v0, GLint
v1, GLint v2, GLint v3);
typedef void (APIENTRY * glUniform1fvProc) (GLint location, GLsizei count,
const GLfloat *value);
typedef void (APIENTRY * glUniform2fvProc) (GLint location, GLsizei count,
const GLfloat *value);
typedef void (APIENTRY * glUniform3fvProc) (GLint location, GLsizei count,
const GLfloat *value);
typedef void (APIENTRY * glUniform4fvProc) (GLint location, GLsizei count,
const GLfloat *value);
typedef void (APIENTRY * glUniform1ivProc) (GLint location, GLsizei count,
const GLint *value);
typedef void (APIENTRY * glUniform2ivProc) (GLint location, GLsizei count,
const GLint *value);
typedef void (APIENTRY * glUniform3ivProc) (GLint location, GLsizei count,
const GLint *value);
typedef void (APIENTRY * glUniform4ivProc) (GLint location, GLsizei count,
const GLint *value);
typedef void (APIENTRY * glUniformMatrix2fvProc) (GLint location, GLsizei c
ount, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRY * glUniformMatrix3fvProc) (GLint location, GLsizei c
ount, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRY * glUniformMatrix4fvProc) (GLint location, GLsizei c
ount, GLboolean transpose, const GLfloat *value);
typedef void (APIENTRY * glGetObjectParameterfvProc) (GLhandleARB obj, GLen
um pname, GLfloat *params);
typedef void (APIENTRY * glGetObjectParameterivProc) (GLhandleARB obj, GLen
um pname, GLint *params);
typedef void (APIENTRY * glGetInfoLogProc) (GLhandleARB obj, GLsizei maxLen
gth, GLsizei *length, GLcharARB *infoLog);
typedef void (APIENTRY * glGetAttachedObjectsProc) (GLhandleARB containerOb
j, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
typedef GLint (APIENTRY * glGetUniformLocationProc) (GLhandleARB programObj
, const GLcharARB *name);
typedef void (APIENTRY * glGetActiveUniformProc) (GLhandleARB programObj, G
Luint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type,
GLcharARB *name);
typedef void (APIENTRY * glGetUniformfvProc) (GLhandleARB programObj, GLint
location, GLfloat *params);
typedef void (APIENTRY * glGetUniformivProc) (GLhandleARB programObj, GLint
location, GLint *params);
typedef void (APIENTRY * glGetShaderSourceProc) (GLhandleARB obj, GLsizei m
axLength, GLsizei *length, GLcharARB *source);
/*
* ARB_vertex_shader
*/
#ifndef GL_ARB_vertex_shader
#define GL_ARB_vertex_shader 1
#define GL_VERTEX_SHADER_ARB 0x8B31
#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
#endif
typedef void (APIENTRY * glBindAttribLocationProc) (GLhandleARB programObj,
GLuint index, const GLcharARB *name);
typedef void (APIENTRY * glGetActiveAttribProc) (GLhandleARB programObj, GL
uint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type,
GLcharARB *name);
typedef GLint (APIENTRY * glGetAttribLocationProc) (GLhandleARB programObj,
const GLcharARB *name);
/*
* ARB_fragment_shader
*/
#ifndef GL_ARB_fragment_shader
#define GL_ARB_fragment_shader1
#define GL_FRAGMENT_SHADER_ARB 0x8B30
#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
#endif
/*
* NV_fragment_program
*/
#ifndef GL_NV_fragment_program
#define GL_NV_fragment_program 1
#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
#define GL_FRAGMENT_PROGRAM_NV 0x8870
#define GL_MAX_TEXTURE_COORDS_NV 0x8871
#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
#define GL_PROGRAM_ERROR_STRING_NV 0x8874
#endif
#ifndef GL_NV_vertex_program
#define GL_NV_vertex_program 1
#define GL_VERTEX_PROGRAM_NV 0x8620
#define GL_PROGRAM_ERROR_POSITION_NV 0x864B
#endif
typedef void (APIENTRY * glBindProgramNVProc) (GLenum target, GLuint id);
typedef void (APIENTRY * glDeleteProgramsNVProc) (GLsizei n, const GLuint *
programs);
typedef void (APIENTRY * glGenProgramsNVProc) (GLsizei n, GLuint *programs)
;
typedef void (APIENTRY * glLoadProgramNVProc) (GLenum target, GLuint id, GL
sizei len, const GLubyte *program);
typedef void (APIENTRY * glProgramParameter4fvNVProc) (GLenum target, GLuin
t index, const GLfloat *v);
#if defined(__cplusplus) #if defined(__cplusplus)
} }
#endif #endif
#endif // !__SG_EXTENSIONS_HXX #endif // !__SG_EXTENSIONS_HXX
 End of changes. 9 change blocks. 
89 lines changed or deleted 883 lines changed or added


 iochannel.hxx   iochannel.hxx 
skipping to change at line 24 skipping to change at line 24
// //
// This program is distributed in the hope that it will be useful, but // This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of // WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details. // General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// $Id: iochannel.hxx,v 1.2 2004/11/19 21:44:16 curt Exp $ // $Id: iochannel.hxx,v 1.3 2005/09/24 12:28:14 curt Exp $
#ifndef _IOCHANNEL_HXX #ifndef _IOCHANNEL_HXX
#define _IOCHANNEL_HXX #define _IOCHANNEL_HXX
#include <simgear/compiler.h> #include <simgear/compiler.h>
// #include "protocol.hxx" // #include "protocol.hxx"
#include STL_STRING #include STL_STRING
#include <vector> #include <vector>
skipping to change at line 150 skipping to change at line 150
virtual int writestring( const char *str ); virtual int writestring( const char *str );
/** /**
* The close() method is modeled after the close() Unix system * The close() method is modeled after the close() Unix system
* call and will close an open device. You should call this method * call and will close an open device. You should call this method
* when you are done using your IO class, before it is destructed. * when you are done using your IO class, before it is destructed.
* @return result of close * @return result of close
*/ */
virtual bool close(); virtual bool close();
/**
* The eof() method returns true if end of file has been reached
* in a context where that makes sense. Otherwise it returns
* false.
* @return result of eof check
*/
virtual bool eof();
inline void set_type( SGChannelType t ) { type = t; } inline void set_type( SGChannelType t ) { type = t; }
inline SGChannelType get_type() const { return type; } inline SGChannelType get_type() const { return type; }
inline void set_dir( const SGProtocolDir d ) { dir = d; } inline void set_dir( const SGProtocolDir d ) { dir = d; }
inline SGProtocolDir get_dir() const { return dir; } inline SGProtocolDir get_dir() const { return dir; }
inline bool isvalid() const { return valid; } inline bool isvalid() const { return valid; }
inline void set_valid( const bool v ) { valid = v; } inline void set_valid( const bool v ) { valid = v; }
}; };
#endif // _IOCHANNEL_HXX #endif // _IOCHANNEL_HXX
 End of changes. 2 change blocks. 
1 lines changed or deleted 9 lines changed or added


 location.hxx   location.hxx 
skipping to change at line 21 skipping to change at line 21
// //
// This program is distributed in the hope that it will be useful, but // This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of // WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details. // General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// $Id: location.hxx,v 1.3 2003/05/13 03:18:36 curt Exp $ // $Id: location.hxx,v 1.5 2005/09/05 13:23:55 ehofman Exp $
#ifndef _SG_LOCATION_HXX #ifndef _SG_LOCATION_HXX
#define _SG_LOCATION_HXX #define _SG_LOCATION_HXX
#ifndef __cplusplus #ifndef __cplusplus
# error This library requires C++ # error This library requires C++
#endif #endif
#include <simgear/compiler.h> #include <simgear/compiler.h>
#include <simgear/constants.h> #include <simgear/constants.h>
#include <simgear/math/point3d.hxx> #include <simgear/math/point3d.hxx>
#include <plib/sg.h> // plib include #include <plib/sg.h> // plib include
// Define a structure containing view information // Define a structure containing view information
class SGLocation class SGLocation
{ {
public: public:
// Constructor // Constructor
SGLocation( void ); SGLocation( void );
// Destructor // Destructor
virtual ~SGLocation( void ); virtual ~SGLocation( void );
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Part 1: standard FGSubsystem implementation.
//////////////////////////////////////////////////////////////////////
virtual void init ();
virtual void bind ();
virtual void unbind ();
void update (int dt);
//////////////////////////////////////////////////////////////////////
// Part 2: user settings. // Part 2: user settings.
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Geodetic position of model... // Geodetic position of model...
virtual double getLongitude_deg () const { return _lon_deg; } virtual double getLongitude_deg () const { return _lon_deg; }
virtual double getLatitude_deg () const { return _lat_deg; } virtual double getLatitude_deg () const { return _lat_deg; }
virtual double getAltitudeASL_ft () const { return _alt_ft; } virtual double getAltitudeASL_ft () const { return _alt_ft; }
virtual void setPosition (double lon_deg, double lat_deg, double alt_ft ); virtual void setPosition (double lon_deg, double lat_deg, double alt_ft );
// Reference orientation rotations... // Reference orientation rotations...
skipping to change at line 86 skipping to change at line 76
virtual double getPitch_deg () const {return _pitch_deg; } virtual double getPitch_deg () const {return _pitch_deg; }
virtual double getHeading_deg () const {return _heading_deg; } virtual double getHeading_deg () const {return _heading_deg; }
virtual void setOrientation (double roll_deg, double pitch_deg, double heading_deg); virtual void setOrientation (double roll_deg, double pitch_deg, double heading_deg);
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Part 3: output vectors and matrices in FlightGear coordinates. // Part 3: output vectors and matrices in FlightGear coordinates.
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Vectors and positions... // Vectors and positions...
// Get zero view_pos //! Get the absolute view position in fgfs coordinates.
virtual float * get_view_pos() { return _relative_view_pos; } virtual double * get_absolute_view_pos( );
// Get the absolute view position in fgfs coordinates.
virtual double * get_absolute_view_pos( const Point3D scenery_center ); //! Return the position relative to the given scenery center.
// Get zero elev virtual float * get_view_pos( const Point3D& scenery_center );
virtual float * get_zero_elev() { return _zero_elev_view_pos; }
// Get world up vector // Get world up vector
virtual float *get_world_up() { return _world_up; } virtual float *get_world_up()
// Get the relative (to scenery center) view position in fgfs coordinat { recalcAbsolutePosition(); return _world_up; }
es.
virtual float * getRelativeViewPos( const Point3D scenery_center );
// Get the absolute zero-elevation view position in fgfs coordinates.
virtual float * getZeroElevViewPos( const Point3D scenery_center );
// Get surface east vector // Get surface east vector
virtual float *get_surface_east() { return _surface_east; } virtual float *get_surface_east()
{ recalcAbsolutePosition(); return _surface_east; }
// Get surface south vector // Get surface south vector
virtual float *get_surface_south() { return _surface_south; } virtual float *get_surface_south()
{ recalcAbsolutePosition(); return _surface_south; }
// Elevation of ground under location (based on scenery output)... // Elevation of ground under location (based on scenery output)...
void set_cur_elev_m ( double elev ) { _cur_elev_m = elev; } void set_cur_elev_m ( double elev ) { _cur_elev_m = elev; }
inline double get_cur_elev_m () { return _cur_elev_m; } inline double get_cur_elev_m () { return _cur_elev_m; }
// Interface to current buckets for use with tilemgr...
void set_tile_center ( Point3D tile_center ) { _tile_center = tile_cent
er; }
inline Point3D get_tile_center () { return _tile_center; }
// Matrices... // Matrices...
virtual const sgVec4 *getTransformMatrix( const Point3D scenery_center virtual const sgVec4 *getTransformMatrix() {
) { recalcOrientation();
if ( _dirty ) { return TRANS;
recalc( scenery_center );
}
return TRANS;
} }
virtual const sgVec4 *getCachedTransformMatrix() { return TRANS; } virtual const sgVec4 *getCachedTransformMatrix() { return TRANS; }
virtual const sgVec4 *getUpMatrix( const Point3D scenery_center ) {
if ( _dirty ) { virtual const sgVec4 *getUpMatrix(const Point3D& scenery_center) {
recalc( scenery_center ); recalcAbsolutePosition();
} return UP;
return UP;
} }
virtual const sgVec4 *getCachedUpMatrix() { return UP; } virtual const sgVec4 *getCachedUpMatrix() { return UP; }
private: private:
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////
// private data // // private data //
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////
// flag forcing a recalc of derived view parameters // flag forcing a recalc of derived view parameters
bool _dirty; mutable bool _orientation_dirty, _position_dirty;
mutable sgdVec3 _absolute_view_pos; mutable sgdVec3 _absolute_view_pos;
mutable sgVec3 _relative_view_pos; mutable sgVec3 _relative_view_pos;
mutable sgVec3 _zero_elev_view_pos;
double _lon_deg; double _lon_deg;
double _lat_deg; double _lat_deg;
double _alt_ft; double _alt_ft;
double _roll_deg; double _roll_deg;
double _pitch_deg; double _pitch_deg;
double _heading_deg; double _heading_deg;
// elevation of ground under this location... // elevation of ground under this location...
double _cur_elev_m; double _cur_elev_m;
Point3D _tile_center;
// surface vector heading south // surface vector heading south
sgVec3 _surface_south; mutable sgVec3 _surface_south;
// surface vector heading east (used to unambiguously align sky // surface vector heading east (used to unambiguously align sky
// with sun) // with sun)
sgVec3 _surface_east; mutable sgVec3 _surface_east;
// world up vector (normal to the plane tangent to the earth's // world up vector (normal to the plane tangent to the earth's
// surface at the spot we are directly above // surface at the spot we are directly above)
sgVec3 _world_up; mutable sgVec3 _world_up;
// sg versions of our friendly matrices // sg versions of our friendly matrices
sgMat4 TRANS, UP; mutable sgMat4 TRANS, UP;
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////
// private functions // // private functions //
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////
void recalc( const Point3D scenery_center ); void recalcOrientation() const;
void recalcPosition( double lon_deg, double lat_deg, double alt_ft, void recalcAbsolutePosition() const;
const Point3D scenery_center ) const;
inline void set_dirty() { _dirty = true; }
inline void set_clean() { _dirty = false; }
}; };
#endif // _SG_LOCATION_HXX #endif // _SG_LOCATION_HXX
 End of changes. 18 change blocks. 
57 lines changed or deleted 33 lines changed or added


 logstream.hxx   logstream.hxx 
skipping to change at line 24 skipping to change at line 24
// This library is distributed in the hope that it will be useful, // This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details. // Library General Public License for more details.
// //
// You should have received a copy of the GNU Library General Public // You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the // License along with this library; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA. // Boston, MA 02111-1307, USA.
// //
// $Id: logstream.hxx,v 1.4 2004/03/20 22:38:13 ehofman Exp $ // $Id: logstream.hxx,v 1.5 2005/11/10 09:57:58 ehofman Exp $
#ifndef _LOGSTREAM_H #ifndef _LOGSTREAM_H
#define _LOGSTREAM_H #define _LOGSTREAM_H
#include <simgear/compiler.h> #include <simgear/compiler.h>
#ifdef _MSC_VER #ifdef _MSC_VER
# include <windows.h> # include <windows.h>
#endif #endif
skipping to change at line 183 skipping to change at line 183
inline void inline void
logbuf::set_log_state( sgDebugClass c, sgDebugPriority p ) logbuf::set_log_state( sgDebugClass c, sgDebugPriority p )
{ {
logging_enabled = ((c & logClass) != 0 && p >= logPriority); logging_enabled = ((c & logClass) != 0 && p >= logPriority);
} }
inline logbuf::int_type inline logbuf::int_type
logbuf::overflow( int c ) logbuf::overflow( int c )
{ {
#ifdef _MSC_VER #ifdef _MSC_VER
static has_console = false; static bool has_console = false;
if ( logging_enabled ) { if ( logging_enabled ) {
if ( !has_console ) { if ( !has_console ) {
AllocConsole(); AllocConsole();
freopen("conin$", "r", stdin); freopen("conin$", "r", stdin);
freopen("conout$", "w", stdout); freopen("conout$", "w", stdout);
freopen("conout$", "w", stderr); freopen("conout$", "w", stderr);
has_console = true; has_console = true;
} }
sbuf->sputc(c); sbuf->sputc(c);
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 lowlevel.hxx   lowlevel.hxx 
skipping to change at line 23 skipping to change at line 23
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// $Id: lowlevel.hxx,v 1.2 2004/11/19 21:44:16 curt Exp $ // $Id: lowlevel.hxx,v 1.7 2005/09/22 09:11:28 ehofman Exp $
// //
#ifndef _SG_LOWLEVEL_HXX #ifndef _SG_LOWLEVEL_HXX
#define _SG_LOWLEVEL_HXX #define _SG_LOWLEVEL_HXX
#include <stdio.h> #include <stdio.h>
#include <zlib.h> #include <zlib.h>
#include <plib/sg.h> #include <plib/sg.h>
#ifdef _MSC_VER #include <simgear/compiler.h>
typedef __int64 int64; #include <simgear/misc/stdint.hxx>
typedef __int64 uint64;
#else
typedef long long int64;
typedef unsigned long long uint64;
#endif
// Note that output is written in little endian form (and converted as // Note that output is written in little endian form (and converted as
// necessary for big endian machines) // necessary for big endian machines)
void sgReadChar ( gzFile fd, char *var ) ; void sgReadChar ( gzFile fd, char *var ) ;
void sgWriteChar ( gzFile fd, const char var ) ; void sgWriteChar ( gzFile fd, const char var ) ;
void sgReadFloat ( gzFile fd, float *var ) ; void sgReadFloat ( gzFile fd, float *var ) ;
void sgWriteFloat ( gzFile fd, const float var ) ; void sgWriteFloat ( gzFile fd, const float var ) ;
void sgReadDouble ( gzFile fd, double *var ) ; void sgReadDouble ( gzFile fd, double *var ) ;
void sgWriteDouble ( gzFile fd, const double var ) ; void sgWriteDouble ( gzFile fd, const double var ) ;
void sgReadUInt ( gzFile fd, unsigned int *var ) ; void sgReadUInt ( gzFile fd, unsigned int *var ) ;
void sgWriteUInt ( gzFile fd, const unsigned int var ) ; void sgWriteUInt ( gzFile fd, const unsigned int var ) ;
void sgReadInt ( gzFile fd, int *var ) ; void sgReadInt ( gzFile fd, int *var ) ;
void sgWriteInt ( gzFile fd, const int var ) ; void sgWriteInt ( gzFile fd, const int var ) ;
void sgReadLong ( gzFile fd, long int *var ) ; void sgReadLong ( gzFile fd, int32_t *var ) ;
void sgWriteLong ( gzFile fd, const long int var ) ; void sgWriteLong ( gzFile fd, const int32_t var ) ;
void sgReadLongLong ( gzFile fd, int64 *var ) ; void sgReadLongLong ( gzFile fd, int64_t *var ) ;
void sgWriteLongLong ( gzFile fd, const int64 var ) ; void sgWriteLongLong ( gzFile fd, const int64_t var ) ;
void sgReadUShort ( gzFile fd, unsigned short *var ) ; void sgReadUShort ( gzFile fd, unsigned short *var ) ;
void sgWriteUShort ( gzFile fd, const unsigned short var ) ; void sgWriteUShort ( gzFile fd, const unsigned short var ) ;
void sgReadShort ( gzFile fd, short *var ) ; void sgReadShort ( gzFile fd, short *var ) ;
void sgWriteShort ( gzFile fd, const short var ) ; void sgWriteShort ( gzFile fd, const short var ) ;
void sgReadFloat ( gzFile fd, const unsigned int n, float *var ) ; void sgReadFloat ( gzFile fd, const unsigned int n, float *var ) ;
void sgWriteFloat ( gzFile fd, const unsigned int n, const float *var ) ; void sgWriteFloat ( gzFile fd, const unsigned int n, const float *var ) ;
void sgReadDouble ( gzFile fd, const unsigned int n, double *var ) ; void sgReadDouble ( gzFile fd, const unsigned int n, double *var ) ;
void sgWriteDouble ( gzFile fd, const unsigned int n, const double *var ) ; void sgWriteDouble ( gzFile fd, const unsigned int n, const double *var ) ;
void sgReadUInt ( gzFile fd, const unsigned int n, unsigned int *var ) ; void sgReadUInt ( gzFile fd, const unsigned int n, unsigned int *var ) ;
skipping to change at line 122 skipping to change at line 117
} }
inline void sgWriteMat4 ( gzFile fd, const sgMat4 var ) { inline void sgWriteMat4 ( gzFile fd, const sgMat4 var ) {
sgWriteFloat ( fd, 16, (float *)var ) ; sgWriteFloat ( fd, 16, (float *)var ) ;
} }
void sgClearReadError(); void sgClearReadError();
void sgClearWriteError(); void sgClearWriteError();
int sgReadError(); int sgReadError();
int sgWriteError(); int sgWriteError();
inline bool sgIsLittleEndian() {
static const int sgEndianTest = 1;
return (*((char *) &sgEndianTest ) != 0);
}
inline bool sgIsBigEndian() {
static const int sgEndianTest = 1;
return (*((char *) &sgEndianTest ) == 0);
}
inline void sgEndianSwap(unsigned short *x) {
*x =
(( *x >> 8 ) & 0x00FF ) |
(( *x << 8 ) & 0xFF00 ) ;
}
inline void sgEndianSwap(unsigned int *x) {
*x =
(( *x >> 24 ) & 0x000000FF ) |
(( *x >> 8 ) & 0x0000FF00 ) |
(( *x << 8 ) & 0x00FF0000 ) |
(( *x << 24 ) & 0xFF000000 ) ;
}
inline void sgEndianSwap(uint64 *x) {
#ifndef _MSC_VER
*x =
(( *x >> 56 ) & 0x00000000000000FFULL ) |
(( *x >> 40 ) & 0x000000000000FF00ULL ) |
(( *x >> 24 ) & 0x0000000000FF0000ULL ) |
(( *x >> 8 ) & 0x00000000FF000000ULL ) |
(( *x << 8 ) & 0x000000FF00000000ULL ) |
(( *x << 24 ) & 0x0000FF0000000000ULL ) |
(( *x << 40 ) & 0x00FF000000000000ULL ) |
(( *x << 56 ) & 0xFF00000000000000ULL ) ;
#else
*x =
(( *x >> 56 ) & 0x00000000000000FF ) |
(( *x >> 40 ) & 0x000000000000FF00 ) |
(( *x >> 24 ) & 0x0000000000FF0000 ) |
(( *x >> 8 ) & 0x00000000FF000000 ) |
(( *x << 8 ) & 0x000000FF00000000 ) |
(( *x << 24 ) & 0x0000FF0000000000 ) |
(( *x << 40 ) & 0x00FF000000000000 ) |
(( *x << 56 ) & 0xFF00000000000000 ) ;
#endif
}
#endif // _SG_LOWLEVEL_HXX #endif // _SG_LOWLEVEL_HXX
 End of changes. 4 change blocks. 
60 lines changed or deleted 7 lines changed or added


 mat.hxx   mat.hxx 
skipping to change at line 23 skipping to change at line 23
// //
// This program is distributed in the hope that it will be useful, but // This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of // WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details. // General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// $Id: mat.hxx,v 1.15 2004/11/19 21:44:17 curt Exp $ // $Id: mat.hxx,v 1.17 2005/10/23 13:47:46 ehofman Exp $
#ifndef _SG_MAT_HXX #ifndef _SG_MAT_HXX
#define _SG_MAT_HXX #define _SG_MAT_HXX
#ifndef __cplusplus #ifndef __cplusplus
# error This library requires C++ # error This library requires C++
#endif #endif
#include <simgear/compiler.h> #include <simgear/compiler.h>
skipping to change at line 71 skipping to change at line 71
// Public Constructors. // Public Constructors.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
/** /**
* Construct a material from a set of properties. * Construct a material from a set of properties.
* *
* @param props A property node containing subnodes with the * @param props A property node containing subnodes with the
* state information for the material. This node is usually * state information for the material. This node is usually
* loaded from the $FG_ROOT/materials.xml file. * loaded from the $FG_ROOT/materials.xml file.
*/ */
SGMaterial( const string &fg_root, const SGPropertyNode *props ); SGMaterial( const string &fg_root, const SGPropertyNode *props, const cha r *season );
/** /**
* Construct a material from an absolute texture path. * Construct a material from an absolute texture path.
* *
* @param texture_path A string containing an absolute path * @param texture_path A string containing an absolute path
* to a texture file (usually RGB). * to a texture file (usually RGB).
*/ */
SGMaterial( const string &texpath ); SGMaterial( const string &texpath );
/** /**
skipping to change at line 229 skipping to change at line 229
// ref count so we can properly delete if we have multiple // ref count so we can properly delete if we have multiple
// pointers to this record // pointers to this record
int refcount; int refcount;
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Internal constructors and methods. // Internal constructors and methods.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
SGMaterial( const string &fg_root, const SGMaterial &mat ); // unimplemen ted SGMaterial( const string &fg_root, const SGMaterial &mat ); // unimplemen ted
void read_properties( const string &fg_root, const SGPropertyNode *props ); void read_properties( const string &fg_root, const SGPropertyNode *props, const char *season );
void build_ssg_state( bool defer_tex_load ); void build_ssg_state( bool defer_tex_load );
void set_ssg_state( ssgSimpleState *s ); void set_ssg_state( ssgSimpleState *s );
}; };
#endif // _SG_MAT_HXX #endif // _SG_MAT_HXX
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 matlib.hxx   matlib.hxx 
skipping to change at line 21 skipping to change at line 21
// //
// This program is distributed in the hope that it will be useful, but // This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of // WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details. // General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// $Id: matlib.hxx,v 1.5 2004/11/19 21:44:17 curt Exp $ // $Id: matlib.hxx,v 1.7 2005/10/23 13:47:46 ehofman Exp $
#ifndef _MATLIB_HXX #ifndef _MATLIB_HXX
#define _MATLIB_HXX #define _MATLIB_HXX
#ifndef __cplusplus #ifndef __cplusplus
# error This library requires C++ # error This library requires C++
#endif #endif
#include <simgear/compiler.h> #include <simgear/compiler.h>
skipping to change at line 63 skipping to change at line 63
typedef material_map::const_iterator const_material_map_iterator; typedef material_map::const_iterator const_material_map_iterator;
material_map matlib; material_map matlib;
public: public:
// Constructor // Constructor
SGMaterialLib ( void ); SGMaterialLib ( void );
// Load a library of material properties // Load a library of material properties
bool load( const string &fg_root, const string& mpath ); bool load( const string &fg_root, const string& mpath, const char *seas on );
// Add the named texture with default properties // Add the named texture with default properties
bool add_item( const string &tex_path ); bool add_item( const string &tex_path );
bool add_item( const string &mat_name, const string &tex_path ); bool add_item( const string &mat_name, const string &tex_path );
bool add_item( const string &mat_name, ssgSimpleState *state ); bool add_item( const string &mat_name, ssgSimpleState *state );
// find a material record by material name // find a material record by material name
SGMaterial *find( const string& material ); SGMaterial *find( const string& material );
/** /**
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 metar.hxx   metar.hxx 
skipping to change at line 21 skipping to change at line 21
// //
// This program is distributed in the hope that it will be useful, but // This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of // WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details. // General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA // Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
// //
// $Id: metar.hxx,v 1.4 2004/02/26 09:46:36 ehofman Exp $ // $Id: metar.hxx,v 1.6 2005/10/25 13:48:58 ehofman Exp $
#ifndef _METAR_HXX #ifndef _METAR_HXX
#define _METAR_HXX #define _METAR_HXX
#include <vector> #include <vector>
#include <map> #include <map>
#include <string> #include <string>
#include <simgear/constants.h> #include <simgear/constants.h>
skipping to change at line 69 skipping to change at line 69
GREATER_THAN GREATER_THAN
}; };
enum Tendency { enum Tendency {
NONE, NONE,
STABLE, STABLE,
INCREASING, INCREASING,
DECREASING DECREASING
}; };
void set(double dist, int dir = -1, int mod = -1, int tend = -1);
inline double getVisibility_m() const { return _distance; } inline double getVisibility_m() const { return _distance; }
inline double getVisibility_ft() const { return _distance == NaN ? NaN : _distance * SG_METER_TO_FEET; } inline double getVisibility_ft() const { return _distance == NaN ? NaN : _distance * SG_METER_TO_FEET; }
inline double getVisibility_sm() const { return _distance == NaN ? NaN : _distance * SG_METER_TO_SM; } inline double getVisibility_sm() const { return _distance == NaN ? NaN : _distance * SG_METER_TO_SM; }
inline int getDirection() const { return _direction; } inline int getDirection() const { return _direction; }
inline int getModifier() const { return _modifier; } inline int getModifier() const { return _modifier; }
inline int getTendency() const { return _tendency; } inline int getTendency() const { return _tendency; }
protected: protected:
double _distance; double _distance;
int _direction; int _direction;
int _modifier; int _modifier;
int _tendency; int _tendency;
}; };
// runway condition (surface and visibility) // runway condition (surface and visibility)
class SGMetarRunway { class SGMetarRunway {
friend class SGMetar; friend class SGMetar;
public: public:
SGMetarRunway() : SGMetarRunway() :
_deposit(0), _deposit(-1),
_deposit_string(0),
_extent(-1), _extent(-1),
_extent_string(0), _extent_string(0),
_depth(NaN), _depth(NaN),
_friction(NaN), _friction(NaN),
_friction_string(0), _friction_string(0),
_comment(0), _comment(0),
_wind_shear(false) {} _wind_shear(false) {}
inline const char *getDeposit() const { retu inline int getDeposit() const { retu
rn _deposit; } rn _deposit; }
inline const char *getDepositString() const { retu
rn _deposit_string; }
inline double getExtent() const { retu rn _extent; } inline double getExtent() const { retu rn _extent; }
inline const char *getExtentString() const { retu rn _extent_string; } inline const char *getExtentString() const { retu rn _extent_string; }
inline double getDepth() const { retu rn _depth; } inline double getDepth() const { retu rn _depth; }
inline double getFriction() const { retu rn _friction; } inline double getFriction() const { retu rn _friction; }
inline const char *getFrictionString() const { retu rn _friction_string; } inline const char *getFrictionString() const { retu rn _friction_string; }
inline const char *getComment() const { retu rn _comment; } inline const char *getComment() const { retu rn _comment; }
inline const bool getWindShear() const { retu rn _wind_shear; } inline const bool getWindShear() const { retu rn _wind_shear; }
inline SGMetarVisibility getMinVisibility() const { retu inline const SGMetarVisibility& getMinVisibility() const { retu
rn _min_visibility; } rn _min_visibility; }
inline SGMetarVisibility getMaxVisibility() const { retu inline const SGMetarVisibility& getMaxVisibility() const { retu
rn _max_visibility; } rn _max_visibility; }
protected: protected:
SGMetarVisibility _min_visibility; SGMetarVisibility _min_visibility;
SGMetarVisibility _max_visibility; SGMetarVisibility _max_visibility;
const char *_deposit; int _deposit;
const char *_deposit_string;
int _extent; int _extent;
const char *_extent_string; const char *_extent_string;
double _depth; double _depth;
double _friction; double _friction;
const char *_friction_string; const char *_friction_string;
const char *_comment; const char *_comment;
bool _wind_shear; bool _wind_shear;
}; };
// cloud layer // cloud layer
class SGMetarCloud { class SGMetarCloud {
friend class SGMetar; friend class SGMetar;
public: public:
SGMetarCloud() : SGMetarCloud() :
_coverage(-1), _coverage(-1),
_altitude(NaN), _altitude(NaN),
_type(0), _type(0),
_type_long(0) {} _type_long(0) {}
void set(double alt, int cov = -1);
inline int getCoverage() const { return _coverage; } inline int getCoverage() const { return _coverage; }
inline double getAltitude_m() const { return _altitude; } inline double getAltitude_m() const { return _altitude; }
inline double getAltitude_ft() const { return _altitude == NaN ? NaN : _altitude * SG_METER_TO_FEET; } inline double getAltitude_ft() const { return _altitude == NaN ? NaN : _altitude * SG_METER_TO_FEET; }
inline char *getTypeString() const { return _type; } inline char *getTypeString() const { return _type; }
inline char *getTypeLongString() const { return _type_long; } inline char *getTypeLongString() const { return _type_long; }
protected: protected:
int _coverage; // quarters: 0 -> clear ... 4 -> ove rcast int _coverage; // quarters: 0 -> clear ... 4 -> ove rcast
double _altitude; // 1000 m double _altitude; // 1000 m
char *_type; // CU char *_type; // CU
char *_type_long; // cumulus char *_type_long; // cumulus
}; };
class SGMetar { class SGMetar {
public: public:
SGMetar(const string& m, const string& proxy = "", const string& por SGMetar(const string& m, const string& proxy = "", const string& por
t = "", const string &auth = ""); t = "",
const string &auth = "", const time_t time = 0);
~SGMetar(); ~SGMetar();
enum ReportType { enum ReportType {
NONE, NONE,
AUTO, AUTO,
COR, COR,
RTD RTD
}; };
inline const char *getData() const { return _data; } inline const char *getData() const { return _data; }
inline const char *getUnusedData() const { return _m; } inline const char *getUnusedData() const { return _m; }
inline const bool getProxy() const { return _x_proxy; }
inline const char *getId() const { return _icao; } inline const char *getId() const { return _icao; }
inline int getYear() const { return _year; } inline int getYear() const { return _year; }
inline int getMonth() const { return _month; } inline int getMonth() const { return _month; }
inline int getDay() const { return _day; } inline int getDay() const { return _day; }
inline int getHour() const { return _hour; } inline int getHour() const { return _hour; }
inline int getMinute() const { return _minute; } inline int getMinute() const { return _minute; }
inline int getReportType() const { return _report_type; } inline int getReportType() const { return _report_type; }
inline int getWindDir() const { return _wind_dir; } inline int getWindDir() const { return _wind_dir; }
inline double getWindSpeed_mps() const { return _wind_speed; } inline double getWindSpeed_mps() const { return _wind_speed; }
skipping to change at line 180 skipping to change at line 189
inline double getWindSpeed_mph() const { return _wind_speed = = NaN ? NaN : _wind_speed * SG_MPS_TO_MPH; } inline double getWindSpeed_mph() const { return _wind_speed = = NaN ? NaN : _wind_speed * SG_MPS_TO_MPH; }
inline double getGustSpeed_mps() const { return _gust_speed; } inline double getGustSpeed_mps() const { return _gust_speed; }
inline double getGustSpeed_kmh() const { return _gust_speed = = NaN ? NaN : _gust_speed * SG_MPS_TO_KMH; } inline double getGustSpeed_kmh() const { return _gust_speed = = NaN ? NaN : _gust_speed * SG_MPS_TO_KMH; }
inline double getGustSpeed_kt() const { return _gust_speed = = NaN ? NaN : _gust_speed * SG_MPS_TO_KT; } inline double getGustSpeed_kt() const { return _gust_speed = = NaN ? NaN : _gust_speed * SG_MPS_TO_KT; }
inline double getGustSpeed_mph() const { return _gust_speed = = NaN ? NaN : _gust_speed * SG_MPS_TO_MPH; } inline double getGustSpeed_mph() const { return _gust_speed = = NaN ? NaN : _gust_speed * SG_MPS_TO_MPH; }
inline int getWindRangeFrom() const { return _wind_range_f rom; } inline int getWindRangeFrom() const { return _wind_range_f rom; }
inline int getWindRangeTo() const { return _wind_range_t o; } inline int getWindRangeTo() const { return _wind_range_t o; }
inline SGMetarVisibility& getMinVisibility() { return _min_visibi inline const SGMetarVisibility& getMinVisibility() const { retu
lity; } rn _min_visibility; }
inline SGMetarVisibility& getMaxVisibility() { return _max_visibi inline const SGMetarVisibility& getMaxVisibility() const { retu
lity; } rn _max_visibility; }
inline SGMetarVisibility& getVertVisibility() { return _vert_visib inline const SGMetarVisibility& getVertVisibility() const { retu
ility; } rn _vert_visibility; }
inline SGMetarVisibility *getDirVisibility() { return _dir_visibi inline const SGMetarVisibility *getDirVisibility() const { retu
lity; } rn _dir_visibility; }
inline double getTemperature_C() const { return _temp; } inline double getTemperature_C() const { return _temp; }
inline double getTemperature_F() const { return _temp == NaN ? NaN : 1.8 * _temp + 32; } inline double getTemperature_F() const { return _temp == NaN ? NaN : 1.8 * _temp + 32; }
inline double getDewpoint_C() const { return _dewp; } inline double getDewpoint_C() const { return _dewp; }
inline double getDewpoint_F() const { return _dewp == NaN ? NaN : 1.8 * _dewp + 32; } inline double getDewpoint_F() const { return _dewp == NaN ? NaN : 1.8 * _dewp + 32; }
inline double getPressure_hPa() const { return _pressure == NaN ? NaN : _pressure / 100; } inline double getPressure_hPa() const { return _pressure == NaN ? NaN : _pressure / 100; }
inline double getPressure_inHg() const { return _pressure == NaN ? NaN : _pressure * SG_PA_TO_INHG; } inline double getPressure_inHg() const { return _pressure == NaN ? NaN : _pressure * SG_PA_TO_INHG; }
inline int getRain() const { return _rain; }
inline int getHail() const { return _hail; }
inline int getSnow() const { return _snow; }
inline bool getCAVOK() const { return _cavok; }
double getRelHumidity() const; double getRelHumidity() const;
inline vector<SGMetarCloud>& getClouds() { return _clouds; } inline const vector<SGMetarCloud>& getClouds() const { return _cl
inline map<string, SGMetarRunway>& getRunways() { return _runways; } ouds; }
inline vector<string>& getWeather() { return _weather; } inline const map<string, SGMetarRunway>& getRunways() const { re
turn _runways; }
inline const vector<string>& getWeather() const { re
turn _weather; }
protected: protected:
string _url; string _url;
int _grpcount; int _grpcount;
bool _x_proxy;
char *_data; char *_data;
char *_m; char *_m;
char _icao[5]; char _icao[5];
int _year; int _year;
int _month; int _month;
int _day; int _day;
int _hour; int _hour;
int _minute; int _minute;
int _report_type; int _report_type;
int _wind_dir; int _wind_dir;
double _wind_speed; double _wind_speed;
double _gust_speed; double _gust_speed;
int _wind_range_from; int _wind_range_from;
int _wind_range_to; int _wind_range_to;
double _temp; double _temp;
double _dewp; double _dewp;
double _pressure; double _pressure;
int _rain;
int _hail;
int _snow;
bool _cavok;
SGMetarVisibility _min_visibility; SGMetarVisibility _min_visibility;
SGMetarVisibility _max_visibility; SGMetarVisibility _max_visibility;
SGMetarVisibility _vert_visibility; SGMetarVisibility _vert_visibility;
SGMetarVisibility _dir_visibility[8]; SGMetarVisibility _dir_visibility[8];
vector<SGMetarCloud> _clouds; vector<SGMetarCloud> _clouds;
map<string, SGMetarRunway> _runways; map<string, SGMetarRunway> _runways;
vector<string> _weather; vector<string> _weather;
bool scanPreambleDate(); bool scanPreambleDate();
bool scanPreambleTime(); bool scanPreambleTime();
void useCurrentDate();
bool scanType(); bool scanType();
bool scanId(); bool scanId();
bool scanDate(); bool scanDate();
bool scanModifier(); bool scanModifier();
bool scanWind(); bool scanWind();
bool scanVariability(); bool scanVariability();
bool scanVisibility(); bool scanVisibility();
bool scanRwyVisRange(); bool scanRwyVisRange();
bool scanSkyCondition(); bool scanSkyCondition();
skipping to change at line 252 skipping to change at line 272
bool scanRunwayReport(); bool scanRunwayReport();
bool scanWindShear(); bool scanWindShear();
bool scanTrendForecast(); bool scanTrendForecast();
bool scanColorState(); bool scanColorState();
bool scanRemark(); bool scanRemark();
bool scanRemainder(); bool scanRemainder();
int scanNumber(char **str, int *num, int min, int max = 0); int scanNumber(char **str, int *num, int min, int max = 0);
bool scanBoundary(char **str); bool scanBoundary(char **str);
const struct Token *scanToken(char **str, const struct Token *list); const struct Token *scanToken(char **str, const struct Token *list);
char *loadData(const char *id, const string& proxy, const string& char *loadData(const char *id, const string& proxy, const string&
port, const string &auth); port,
const string &auth, time_t time);
void normalizeData(); void normalizeData();
}; };
#undef NaN #undef NaN
#endif // _METAR_HXX #endif // _METAR_HXX
 End of changes. 16 change blocks. 
24 lines changed or deleted 49 lines changed or added


 model.hxx   model.hxx 
skipping to change at line 22 skipping to change at line 22
#include <vector> #include <vector>
#include <set> #include <set>
SG_USING_STD(vector); SG_USING_STD(vector);
SG_USING_STD(set); SG_USING_STD(set);
#include <plib/sg.h> #include <plib/sg.h>
#include <plib/ssg.h> #include <plib/ssg.h>
#include <simgear/misc/sg_path.hxx>
#include <simgear/props/props.hxx> #include <simgear/props/props.hxx>
// Has anyone done anything *really* stupid, like making min and max macros ? // Has anyone done anything *really* stupid, like making min and max macros ?
#ifdef min #ifdef min
#undef min #undef min
#endif #endif
#ifdef max #ifdef max
#undef max #undef max
#endif #endif
skipping to change at line 66 skipping to change at line 67
/** /**
* Make the animation * Make the animation
*/ */
void void
sgMakeAnimation( ssgBranch * model, sgMakeAnimation( ssgBranch * model,
const char * name, const char * name,
vector<SGPropertyNode_ptr> &name_nodes, vector<SGPropertyNode_ptr> &name_nodes,
SGPropertyNode *prop_root, SGPropertyNode *prop_root,
SGPropertyNode_ptr node, SGPropertyNode_ptr node,
double sim_time_sec, double sim_time_sec,
SGPath &texture_path,
set<ssgBranch *> &ignore_branches ); set<ssgBranch *> &ignore_branches );
/** /**
* Set the filter state on models * Set the filter state on models
*/ */
bool bool
sgSetModelFilter( bool filter ); sgSetModelFilter( bool filter );
/** /**
* Check if the ssg node contains an animation
*/
bool
sgCheckAnimationBranch (ssgEntity * entity);
/**
* Enable or disable Display list usage * Enable or disable Display list usage
*/ */
extern bool sgUseDisplayList; extern bool sgUseDisplayList;
#endif // __MODEL_HXX #endif // __MODEL_HXX
 End of changes. 3 change blocks. 
0 lines changed or deleted 8 lines changed or added


 nasal.h   nasal.h 
skipping to change at line 65 skipping to change at line 65
#ifdef NASAL_BIG_ENDIAN_32_BIT #ifdef NASAL_BIG_ENDIAN_32_BIT
int reftag; // Big-endian systems need this here! int reftag; // Big-endian systems need this here!
#endif #endif
union { union {
struct naObj* obj; struct naObj* obj;
struct naStr* str; struct naStr* str;
struct naVec* vec; struct naVec* vec;
struct naHash* hash; struct naHash* hash;
struct naCode* code; struct naCode* code;
struct naFunc* func; struct naFunc* func;
struct naClosure* closure;
struct naCCode* ccode; struct naCCode* ccode;
struct naGhost* ghost; struct naGhost* ghost;
} ptr; } ptr;
#ifndef NASAL_BIG_ENDIAN_32_BIT #ifndef NASAL_BIG_ENDIAN_32_BIT
int reftag; // Little-endian and 64 bit systems need this here! int reftag; // Little-endian and 64 bit systems need this here!
#endif #endif
} ref; } ref;
} naRef; } naRef;
typedef struct Context* naContext; typedef struct Context* naContext;
// The function signature for an extension function: // The function signature for an extension function:
typedef naRef (*naCFunction)(naContext ctx, naRef args); typedef naRef (*naCFunction)(naContext ctx, naRef me, int argc, naRef* args );
// All Nasal code runs under the watch of a naContext: // All Nasal code runs under the watch of a naContext:
naContext naNewContext(); naContext naNewContext();
void naFreeContext(naContext c);
// Save this object in the context, preventing it (and objects // Save this object in the context, preventing it (and objects
// referenced by it) from being garbage collected. // referenced by it) from being garbage collected.
void naSave(naContext ctx, naRef obj); void naSave(naContext ctx, naRef obj);
// Similar, but the object is automatically released when the
// context next runs native bytecode. Useful for saving off C-space
// temporaries to protect them before passing back into a naCall.
void naTempSave(naContext c, naRef r);
// Parse a buffer in memory into a code object. // Parse a buffer in memory into a code object.
naRef naParseCode(naContext c, naRef srcFile, int firstLine, naRef naParseCode(naContext c, naRef srcFile, int firstLine,
char* buf, int len, int* errLine); char* buf, int len, int* errLine);
// Binds a bare code object (as returned from naParseCode) with a // Binds a bare code object (as returned from naParseCode) with a
// closure object (a hash) to act as the outer scope / namespace. // closure object (a hash) to act as the outer scope / namespace.
// FIXME: this API is weak. It should expose the recursive nature of // FIXME: this API is weak. It should expose the recursive nature of
// closures, and allow for extracting the closure and namespace // closures, and allow for extracting the closure and namespace
// information from function objects. // information from function objects.
naRef naBindFunction(naContext ctx, naRef code, naRef closure); naRef naBindFunction(naContext ctx, naRef code, naRef closure);
// Similar, but it binds to the current context's closure (i.e. the
// namespace at the top of the current call stack).
naRef naBindToContext(naContext ctx, naRef code);
// Call a code or function object with the specifed arguments "on" the // Call a code or function object with the specifed arguments "on" the
// specified object and using the specified hash for the local // specified object and using the specified hash for the local
// variables. Any of args, obj or locals may be nil. // variables. Any of args, obj or locals may be nil.
naRef naCall(naContext ctx, naRef func, naRef args, naRef obj, naRef locals ); naRef naCall(naContext ctx, naRef func, int argc, naRef* args, naRef obj, n aRef locals);
// Throw an error from the current call stack. This function makes a // Throw an error from the current call stack. This function makes a
// longjmp call to a handler in naCall() and DOES NOT RETURN. It is // longjmp call to a handler in naCall() and DOES NOT RETURN. It is
// intended for use in library code that cannot otherwise report an // intended for use in library code that cannot otherwise report an
// error via the return value, and MUST be used carefully. If in // error via the return value, and MUST be used carefully. If in
// doubt, return naNil() as your error condition. // doubt, return naNil() as your error condition.
void naRuntimeError(naContext ctx, char* msg); void naRuntimeError(naContext ctx, char* msg);
// Call a method on an object (NOTE: func is a function binding, *not* // Call a method on an object (NOTE: func is a function binding, *not*
// a code object as returned from naParseCode). // a code object as returned from naParseCode).
naRef naMethod(naContext ctx, naRef func, naRef object); naRef naMethod(naContext ctx, naRef func, naRef object);
// Returns a hash containing functions from the Nasal standard library // Returns a hash containing functions from the Nasal standard library
// Useful for passing as a namespace to an initial function call // Useful for passing as a namespace to an initial function call
naRef naStdLib(naContext c); naRef naStdLib(naContext c);
// Ditto, with math functions // Ditto, for other core libraries
naRef naMathLib(naContext c); naRef naMathLib(naContext c);
naRef naBitsLib(naContext c);
naRef naIOLib(naContext c);
naRef naRegexLib(naContext c);
naRef naUnixLib(naContext c);
// Current line number & error message // Current line number & error message
int naStackDepth(naContext ctx); int naStackDepth(naContext ctx);
int naGetLine(naContext ctx, int frame); int naGetLine(naContext ctx, int frame);
naRef naGetSourceFile(naContext ctx, int frame); naRef naGetSourceFile(naContext ctx, int frame);
char* naGetError(naContext ctx); char* naGetError(naContext ctx);
// Type predicates // Type predicates
int naIsNil(naRef r); int naIsNil(naRef r);
int naIsNum(naRef r); int naIsNum(naRef r);
skipping to change at line 149 skipping to change at line 162
naRef naNil(); naRef naNil();
naRef naNum(double num); naRef naNum(double num);
naRef naNewString(naContext c); naRef naNewString(naContext c);
naRef naNewVector(naContext c); naRef naNewVector(naContext c);
naRef naNewHash(naContext c); naRef naNewHash(naContext c);
naRef naNewFunc(naContext c, naRef code); naRef naNewFunc(naContext c, naRef code);
naRef naNewCCode(naContext c, naCFunction fptr); naRef naNewCCode(naContext c, naCFunction fptr);
// Some useful conversion/comparison routines // Some useful conversion/comparison routines
int naEqual(naRef a, naRef b); int naEqual(naRef a, naRef b);
int naStrEqual(naRef a, naRef b);
int naTrue(naRef b); int naTrue(naRef b);
naRef naNumValue(naRef n); naRef naNumValue(naRef n);
naRef naStringValue(naContext c, naRef n); naRef naStringValue(naContext c, naRef n);
// String utilities: // String utilities:
int naStr_len(naRef s); int naStr_len(naRef s);
char* naStr_data(naRef s); char* naStr_data(naRef s);
naRef naStr_fromdata(naRef dst, char* data, int len); naRef naStr_fromdata(naRef dst, char* data, int len);
naRef naStr_concat(naRef dest, naRef s1, naRef s2); naRef naStr_concat(naRef dest, naRef s1, naRef s2);
naRef naStr_substr(naRef dest, naRef str, int start, int len); naRef naStr_substr(naRef dest, naRef str, int start, int len);
naRef naInternSymbol(naRef sym);
// Vector utilities: // Vector utilities:
int naVec_size(naRef v); int naVec_size(naRef v);
naRef naVec_get(naRef v, int i); naRef naVec_get(naRef v, int i);
void naVec_set(naRef vec, int i, naRef o); void naVec_set(naRef vec, int i, naRef o);
int naVec_append(naRef vec, naRef o); int naVec_append(naRef vec, naRef o);
naRef naVec_removelast(naRef vec); naRef naVec_removelast(naRef vec);
void naVec_setsize(naRef vec, int sz); void naVec_setsize(naRef vec, int sz);
// Hash utilities: // Hash utilities:
skipping to change at line 186 skipping to change at line 201
// Ghost utilities: // Ghost utilities:
typedef struct naGhostType { typedef struct naGhostType {
void (*destroy)(void* ghost); void (*destroy)(void* ghost);
} naGhostType; } naGhostType;
naRef naNewGhost(naContext c, naGhostType* t, void* ghost); naRef naNewGhost(naContext c, naGhostType* t, void* ghost);
naGhostType* naGhost_type(naRef ghost); naGhostType* naGhost_type(naRef ghost);
void* naGhost_ptr(naRef ghost); void* naGhost_ptr(naRef ghost);
int naIsGhost(naRef r); int naIsGhost(naRef r);
// Acquires a "modification lock" on a context, allowing the C code to
// modify Nasal data without fear that such data may be "lost" by the
// garbage collector (the C stack is not examined in GC!). This
// disallows garbage collection until the current thread can be
// blocked. The lock should be acquired whenever modifications to
// Nasal objects are made. It need not be acquired when only read
// access is needed. It MUST NOT be acquired by naCFunction's, as
// those are called with the lock already held; acquiring two locks
// for the same thread will cause a deadlock when the GC is invoked.
// It should be UNLOCKED by naCFunction's when they are about to do
// any long term non-nasal processing and/or blocking I/O.
void naModLock();
void naModUnlock();
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif #endif
#endif // _NASAL_H #endif // _NASAL_H
 End of changes. 11 change blocks. 
4 lines changed or deleted 33 lines changed or added


 placement.hxx   placement.hxx 
skipping to change at line 13 skipping to change at line 13
// //
// This file is in the Public Domain, and comes with no warranty. // This file is in the Public Domain, and comes with no warranty.
#ifndef _SG_PLACEMENT_HXX #ifndef _SG_PLACEMENT_HXX
#define _SG_PLACEMENT_HXX 1 #define _SG_PLACEMENT_HXX 1
#ifndef __cplusplus #ifndef __cplusplus
# error This library requires C++ # error This library requires C++
#endif #endif
#include <vector>
SG_USING_STD(vector);
#include <plib/sg.h> #include <plib/sg.h>
#include <plib/ssg.h> #include <plib/ssg.h>
#include <simgear/math/point3d.hxx> #include <simgear/math/point3d.hxx>
#include <simgear/props/props.hxx> #include <simgear/props/props.hxx>
// Don't pull in the headers, since we don't need them here. // Don't pull in the headers, since we don't need them here.
class SGLocation; class SGLocation;
class ssgPlacementTransform;
// Has anyone done anything *really* stupid, like making min and max macros ? // Has anyone done anything *really* stupid, like making min and max macros ?
#ifdef min #ifdef min
#undef min #undef min
#endif #endif
#ifdef max #ifdef max
#undef max #undef max
#endif #endif
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
skipping to change at line 48 skipping to change at line 45
/** /**
* A wrapper for a model with a definite placement. * A wrapper for a model with a definite placement.
*/ */
class SGModelPlacement class SGModelPlacement
{ {
public: public:
SGModelPlacement (); SGModelPlacement ();
virtual ~SGModelPlacement (); virtual ~SGModelPlacement ();
virtual void SGModelPlacement::init( ssgBranch * model ); virtual void SGModelPlacement::init( ssgBranch * model );
/* virtual void init( const string &fg_root,
const string &path, virtual void update();
SGPropertyNode *prop_root,
double sim_time_sec, int dummy ); */
virtual void update( const Point3D scenery_center );
virtual ssgEntity * getSceneGraph () { return (ssgEntity *)_selector; } virtual ssgEntity * getSceneGraph () { return (ssgEntity *)_selector; }
virtual SGLocation * getSGLocation () { return _location; } virtual SGLocation * getSGLocation () { return _location; }
virtual bool getVisible () const; virtual bool getVisible () const;
virtual void setVisible (bool visible); virtual void setVisible (bool visible);
virtual double getLongitudeDeg () const { return _lon_deg; } virtual double getLongitudeDeg () const { return _lon_deg; }
virtual double getLatitudeDeg () const { return _lat_deg; } virtual double getLatitudeDeg () const { return _lat_deg; }
skipping to change at line 81 skipping to change at line 75
virtual double getRollDeg () const { return _roll_deg; } virtual double getRollDeg () const { return _roll_deg; }
virtual double getPitchDeg () const { return _pitch_deg; } virtual double getPitchDeg () const { return _pitch_deg; }
virtual double getHeadingDeg () const { return _heading_deg; } virtual double getHeadingDeg () const { return _heading_deg; }
virtual void setRollDeg (double roll_deg); virtual void setRollDeg (double roll_deg);
virtual void setPitchDeg (double pitch_deg); virtual void setPitchDeg (double pitch_deg);
virtual void setHeadingDeg (double heading_deg); virtual void setHeadingDeg (double heading_deg);
virtual void setOrientation (double roll_deg, double pitch_deg, virtual void setOrientation (double roll_deg, double pitch_deg,
double heading_deg); double heading_deg);
// Addition by Diarmuid Tyson for Multiplayer Support ssgPlacementTransform * getTransform(void)
// Allows multiplayer to get players position transform { return _position; }
virtual const sgVec4 *get_POS() { return POS; }
private: private:
// Geodetic position // Geodetic position
double _lon_deg; double _lon_deg;
double _lat_deg; double _lat_deg;
double _elev_ft; double _elev_ft;
// Orientation // Orientation
double _roll_deg; double _roll_deg;
double _pitch_deg; double _pitch_deg;
double _heading_deg; double _heading_deg;
ssgSelector * _selector; ssgSelector * _selector;
ssgTransform * _position; ssgPlacementTransform * _position;
// Location // Location
SGLocation * _location; SGLocation * _location;
// Addition by Diarmuid Tyson for Multiplayer Support
// Moved from update method
// POS for transformation Matrix
sgMat4 POS;
}; };
#endif // _SG_PLACEMENT_HXX #endif // _SG_PLACEMENT_HXX
 End of changes. 6 change blocks. 
20 lines changed or deleted 7 lines changed or added


 point3d.hxx   point3d.hxx 
skipping to change at line 28 skipping to change at line 28
// This library is distributed in the hope that it will be useful, // This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details. // Library General Public License for more details.
// //
// You should have received a copy of the GNU Library General Public // You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the // License along with this library; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA. // Boston, MA 02111-1307, USA.
// //
// $Id: point3d.hxx,v 1.3 2004/11/19 21:47:05 curt Exp $ // $Id: point3d.hxx,v 1.4 2005/10/25 13:48:58 ehofman Exp $
#ifndef _POINT3D_HXX #ifndef _POINT3D_HXX
#define _POINT3D_HXX #define _POINT3D_HXX
#ifndef __cplusplus #ifndef __cplusplus
# error This library requires C++ # error This library requires C++
#endif #endif
#include <simgear/compiler.h> #include <simgear/compiler.h>
skipping to change at line 183 skipping to change at line 183
} }
/////////////////////////// ///////////////////////////
// //
// Point3D Member functions // Point3D Member functions
// //
/////////////////////////// ///////////////////////////
// CONSTRUCTORS // CONSTRUCTORS
inline Point3D::Point3D() {} inline Point3D::Point3D()
{
n[PX] = n[PY] = 0.0;
n[PZ] = -9999.0;
}
inline Point3D::Point3D(const double x, const double y, const double z) inline Point3D::Point3D(const double x, const double y, const double z)
{ {
n[PX] = x; n[PY] = y; n[PZ] = z; n[PX] = x; n[PY] = y; n[PZ] = z;
} }
inline Point3D::Point3D(const double d) inline Point3D::Point3D(const double d)
{ {
n[PX] = n[PY] = n[PZ] = d; n[PX] = n[PY] = n[PZ] = d;
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 6 lines changed or added


 polar3d.hxx   polar3d.hxx 
skipping to change at line 25 skipping to change at line 25
// This library is distributed in the hope that it will be useful, // This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details. // Library General Public License for more details.
// //
// You should have received a copy of the GNU Library General Public // You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the // License along with this library; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA. // Boston, MA 02111-1307, USA.
// //
// $Id: polar3d.hxx,v 1.2 2004/11/19 21:47:05 curt Exp $ // $Id: polar3d.hxx,v 1.3 2005/10/25 13:48:58 ehofman Exp $
#ifndef _POLAR3D_HXX #ifndef _POLAR3D_HXX
#define _POLAR3D_HXX #define _POLAR3D_HXX
#ifndef __cplusplus #ifndef __cplusplus
# error This library requires C++ # error This library requires C++
#endif #endif
#include <math.h> #include <math.h>
skipping to change at line 55 skipping to change at line 55
*/ */
double sgGeodAltFromCart(const Point3D& cp); double sgGeodAltFromCart(const Point3D& cp);
/** /**
* Convert a polar coordinate to a cartesian coordinate. Lon and Lat * Convert a polar coordinate to a cartesian coordinate. Lon and Lat
* must be specified in radians. The SG convention is for distances * must be specified in radians. The SG convention is for distances
* to be specified in meters * to be specified in meters
* @param p point specified in polar coordinates * @param p point specified in polar coordinates
* @return the same point in cartesian coordinates * @return the same point in cartesian coordinates
*/ */
inline Point3D sgPolarToCart3d(const Point3D& p) { Point3D sgPolarToCart3d(const Point3D& p);
double tmp = cos( p.lat() ) * p.radius();
return Point3D( cos( p.lon() ) * tmp,
sin( p.lon() ) * tmp,
sin( p.lat() ) * p.radius() );
}
/** /**
* Convert a cartesian coordinate to polar coordinates (lon/lat * Convert a cartesian coordinate to polar coordinates (lon/lat
* specified in radians. Distances are specified in meters. * specified in radians. Distances are specified in meters.
* @param cp point specified in cartesian coordinates * @param cp point specified in cartesian coordinates
* @return the same point in polar coordinates * @return the same point in polar coordinates
*/ */
inline Point3D sgCartToPolar3d(const Point3D& cp) { Point3D sgCartToPolar3d(const Point3D& cp);
return Point3D( atan2( cp.y(), cp.x() ),
SGD_PI_2 -
atan2( sqrt(cp.x()*cp.x() + cp.y()*cp.y()), cp.z() ),
sqrt(cp.x()*cp.x() + cp.y()*cp.y() + cp.z()*cp.z()) );
}
/** /**
* Calculate new lon/lat given starting lon/lat, and offset radial, and * Calculate new lon/lat given starting lon/lat, and offset radial, and
* distance. NOTE: starting point is specifed in radians, distance is * distance. NOTE: starting point is specifed in radians, distance is
* specified in meters (and converted internally to radians) * specified in meters (and converted internally to radians)
* ... assumes a spherical world. * ... assumes a spherical world.
* @param orig specified in polar coordinates * @param orig specified in polar coordinates
* @param course offset radial * @param course offset radial
* @param dist offset distance * @param dist offset distance
* @return destination point in polar coordinates * @return destination point in polar coordinates
*/ */
inline Point3D calc_gc_lon_lat( const Point3D& orig, double course, Point3D calc_gc_lon_lat( const Point3D& orig, double course, double dist );
double dist ) {
Point3D result;
// lat=asin(sin(lat1)*cos(d)+cos(lat1)*sin(d)*cos(tc))
// IF (cos(lat)=0)
// lon=lon1 // endpoint a pole
// ELSE
// lon=mod(lon1-asin(sin(tc)*sin(d)/cos(lat))+pi,2*pi)-pi
// ENDIF
// printf("calc_lon_lat() offset.theta = %.2f offset.dist = %.2f\n",
// offset.theta, offset.dist);
dist *= SG_METER_TO_NM * SG_NM_TO_RAD;
result.sety( asin( sin(orig.y()) * cos(dist) +
cos(orig.y()) * sin(dist) * cos(course) ) );
if ( cos(result.y()) < SG_EPSILON ) {
result.setx( orig.x() ); // endpoint a pole
} else {
result.setx(
fmod(orig.x() - asin( sin(course) * sin(dist) /
cos(result.y()) )
+ SGD_PI, SGD_2PI) - SGD_PI );
}
return result;
}
/** /**
* Calculate course/dist given two spherical points. * Calculate course/dist given two spherical points.
* @param start starting point * @param start starting point
* @param dest ending point * @param dest ending point
* @param course resulting course * @param course resulting course
* @param dist resulting distance * @param dist resulting distance
*/ */
inline void calc_gc_course_dist( const Point3D& start, const Point3D& dest, void calc_gc_course_dist( const Point3D& start, const Point3D& dest,
double *course, double *dist ) double *course, double *dist );
{
// d = 2*asin(sqrt((sin((lat1-lat2)/2))^2 +
// cos(lat1)*cos(lat2)*(sin((lon1-lon2)/2))^2))
double cos_start_y = cos( start.y() );
volatile double tmp1 = sin( (start.y() - dest.y()) * 0.5 );
volatile double tmp2 = sin( (start.x() - dest.x()) * 0.5 );
double d = 2.0 * asin( sqrt( tmp1 * tmp1 +
cos_start_y * cos(dest.y()) * tmp2 * tmp2)
);
*dist = d * SG_RAD_TO_NM * SG_NM_TO_METER;
// We obtain the initial course, tc1, (at point 1) from point 1 to
// point 2 by the following. The formula fails if the initial
// point is a pole. We can special case this with:
//
// IF (cos(lat1) < EPS) // EPS a small number ~ machine precision
// IF (lat1 > 0)
// tc1= pi // starting from N pole
// ELSE
// tc1= 0 // starting from S pole
// ENDIF
// ENDIF
//
// For starting points other than the poles:
//
// IF sin(lon2-lon1)<0
// tc1=acos((sin(lat2)-sin(lat1)*cos(d))/(sin(d)*cos(lat1)))
// ELSE
// tc1=2*pi-acos((sin(lat2)-sin(lat1)*cos(d))/(sin(d)*cos(lat1)))
// ENDIF
// if ( cos(start.y()) < SG_EPSILON ) {
// doing it this way saves a transcendental call
double sin_start_y = sin( start.y() );
if ( fabs(1.0-sin_start_y) < SG_EPSILON ) {
// EPS a small number ~ machine precision
if ( start.y() > 0 ) {
*course = SGD_PI; // starting from N pole
} else {
*course = 0; // starting from S pole
}
} else {
// For starting points other than the poles:
// double tmp3 = sin(d)*cos_start_y);
// double tmp4 = sin(dest.y())-sin(start.y())*cos(d);
// double tmp5 = acos(tmp4/tmp3);
// Doing this way gaurentees that the temps are
// not stored into memory
double tmp5 = acos( (sin(dest.y()) - sin_start_y * cos(d)) /
(sin(d) * cos_start_y) );
// if ( sin( dest.x() - start.x() ) < 0 ) {
// the sin of the negative angle is just the opposite sign
// of the sin of the angle so tmp2 will have the opposite
// sign of sin( dest.x() - start.x() )
if ( tmp2 >= 0 ) {
*course = tmp5;
} else {
*course = 2 * SGD_PI - tmp5;
}
}
}
#if 0 #if 0
/** /**
* Calculate course/dist given two spherical points. * Calculate course/dist given two spherical points.
* @param start starting point * @param start starting point
* @param dest ending point * @param dest ending point
* @param course resulting course * @param course resulting course
* @param dist resulting distance * @param dist resulting distance
*/ */
inline void calc_gc_course_dist( const Point3D& start, const Point3D& dest, void calc_gc_course_dist( const Point3D& start, const Point3D& dest,
double *course, double *dist ) { double *course, double *dist );
// d = 2*asin(sqrt((sin((lat1-lat2)/2))^2 +
// cos(lat1)*cos(lat2)*(sin((lon1-lon2)/2))^2))
double tmp1 = sin( (start.y() - dest.y()) / 2 );
double tmp2 = sin( (start.x() - dest.x()) / 2 );
double d = 2.0 * asin( sqrt( tmp1 * tmp1 +
cos(start.y()) * cos(dest.y()) * tmp2 * tmp
2));
// We obtain the initial course, tc1, (at point 1) from point 1 to
// point 2 by the following. The formula fails if the initial
// point is a pole. We can special case this with:
//
// IF (cos(lat1) < EPS) // EPS a small number ~ machine precision
// IF (lat1 > 0)
// tc1= pi // starting from N pole
// ELSE
// tc1= 0 // starting from S pole
// ENDIF
// ENDIF
//
// For starting points other than the poles:
//
// IF sin(lon2-lon1)<0
// tc1=acos((sin(lat2)-sin(lat1)*cos(d))/(sin(d)*cos(lat1)))
// ELSE
// tc1=2*pi-acos((sin(lat2)-sin(lat1)*cos(d))/(sin(d)*cos(lat1)))
// ENDIF
double tc1;
if ( cos(start.y()) < SG_EPSILON ) {
// EPS a small number ~ machine precision
if ( start.y() > 0 ) {
tc1 = SGD_PI; // starting from N pole
} else {
tc1 = 0; // starting from S pole
}
}
// For starting points other than the poles:
double tmp3 = sin(d)*cos(start.y());
double tmp4 = sin(dest.y())-sin(start.y())*cos(d);
double tmp5 = acos(tmp4/tmp3);
if ( sin( dest.x() - start.x() ) < 0 ) {
tc1 = tmp5;
} else {
tc1 = 2 * SGD_PI - tmp5;
}
*course = tc1;
*dist = d * SG_RAD_TO_NM * SG_NM_TO_METER;
}
#endif // 0 #endif // 0
#endif // _POLAR3D_HXX #endif // _POLAR3D_HXX
 End of changes. 6 change blocks. 
165 lines changed or deleted 8 lines changed or added


 props.hxx   props.hxx 
/** /**
* \file props.hxx * \file props.hxx
* Interface definition for a property list. * Interface definition for a property list.
* Started Fall 2000 by David Megginson, david@megginson.com * Started Fall 2000 by David Megginson, david@megginson.com
* This code is released into the Public Domain. * This code is released into the Public Domain.
* *
* See props.html for documentation [replace with URL when available]. * See props.html for documentation [replace with URL when available].
* *
* $Id: props.hxx,v 1.6 2004/12/23 13:32:01 ehofman Exp $ * $Id: props.hxx,v 1.14 2005/10/23 11:55:48 ehofman Exp $
*/ */
#ifndef __PROPS_HXX #ifndef __PROPS_HXX
#define __PROPS_HXX #define __PROPS_HXX
#ifndef PROPS_STANDALONE #ifndef PROPS_STANDALONE
#define PROPS_STANDALONE 0 #define PROPS_STANDALONE 0
#endif #endif
#include <vector> #include <vector>
skipping to change at line 666 skipping to change at line 666
* Get a const child node by name and index. * Get a const child node by name and index.
*/ */
const SGPropertyNode * getChild (const char * name, int index = 0) const; const SGPropertyNode * getChild (const char * name, int index = 0) const;
/** /**
* Get a vector of all children with the specified name. * Get a vector of all children with the specified name.
*/ */
vector<SGPropertyNode_ptr> getChildren (const char * name) const; vector<SGPropertyNode_ptr> getChildren (const char * name) const;
/** /**
* Remove child by position.
*/
SGPropertyNode_ptr removeChild (int pos, bool keep = true);
/**
* Remove a child node * Remove a child node
*/ */
SGPropertyNode_ptr removeChild (const char * name, int index = 0, SGPropertyNode_ptr removeChild (const char * name, int index = 0,
bool keep = true); bool keep = true);
/**
* Remove all children with the specified name.
*/
vector<SGPropertyNode_ptr> removeChildren (const char * name,
bool keep = true);
// //
// Alias support. // Alias support.
// //
/** /**
* Alias this node's leaf value to another's. * Alias this node's leaf value to another's.
*/ */
bool alias (SGPropertyNode * target); bool alias (SGPropertyNode * target);
/** /**
skipping to change at line 1057 skipping to change at line 1068
/** /**
* Fire a child-added event to all listeners. * Fire a child-added event to all listeners.
*/ */
void fireChildAdded (SGPropertyNode * child); void fireChildAdded (SGPropertyNode * child);
/** /**
* Fire a child-removed event to all listeners. * Fire a child-removed event to all listeners.
*/ */
void fireChildRemoved (SGPropertyNode * child); void fireChildRemoved (SGPropertyNode * child);
/**
* Clear any existing value and set the type to NONE.
*/
void clearValue ();
protected: protected:
void fireValueChanged (SGPropertyNode * node); void fireValueChanged (SGPropertyNode * node);
void fireChildAdded (SGPropertyNode * parent, SGPropertyNode * child); void fireChildAdded (SGPropertyNode * parent, SGPropertyNode * child);
void fireChildRemoved (SGPropertyNode * parent, SGPropertyNode * child); void fireChildRemoved (SGPropertyNode * parent, SGPropertyNode * child);
/** /**
* Protected constructor for making new nodes on demand. * Protected constructor for making new nodes on demand.
*/ */
SGPropertyNode (const char * name, int index, SGPropertyNode * parent); SGPropertyNode (const char * name, int index, SGPropertyNode * parent);
skipping to change at line 1087 skipping to change at line 1103
// Set the raw value // Set the raw value
bool set_bool (bool value); bool set_bool (bool value);
bool set_int (int value); bool set_int (int value);
bool set_long (long value); bool set_long (long value);
bool set_float (float value); bool set_float (float value);
bool set_double (double value); bool set_double (double value);
bool set_string (const char * value); bool set_string (const char * value);
/** /**
* Clear any existing value and set the type to NONE.
*/
void clear_value ();
/**
* Get the value as a string. * Get the value as a string.
*/ */
const char * make_string () const; const char * make_string () const;
/** /**
* Trace a read access. * Trace a read access.
*/ */
void trace_read () const; void trace_read () const;
/** /**
skipping to change at line 1168 skipping to change at line 1179
*/ */
class hash_table { class hash_table {
public: public:
/** /**
* An entry in a bucket in a hash table. * An entry in a bucket in a hash table.
*/ */
class entry { class entry {
public: public:
entry (); entry ();
virtual ~entry (); ~entry ();
virtual const char * get_key () { return _key; } const char * get_key () { return _key; }
virtual void set_key (const char * key); void set_key (const char * key);
virtual SGPropertyNode * get_value () { return _value; } SGPropertyNode * get_value () { return _value; }
virtual void set_value (SGPropertyNode * value); void set_value (SGPropertyNode * value);
private: private:
char * _key; char * _key;
SGPropertyNode * _value; SGPropertyNode * _value;
}; };
/** /**
* A bucket in a hash table. * A bucket in a hash table.
*/ */
class bucket { class bucket {
public: public:
bucket (); bucket ();
virtual ~bucket (); ~bucket ();
virtual entry * get_entry (const char * key, bool create = false); entry * get_entry (const char * key, bool create = false);
void erase(const char * key);
private: private:
int _length; int _length;
entry ** _entries; entry ** _entries;
}; };
friend class bucket; friend class bucket;
hash_table (); hash_table ();
virtual ~hash_table (); ~hash_table ();
virtual SGPropertyNode * get (const char * key); SGPropertyNode * get (const char * key);
virtual void put (const char * key, SGPropertyNode * value); void put (const char * key, SGPropertyNode * value);
void erase(const char * key);
private: private:
unsigned int hashcode (const char * key); unsigned int hashcode (const char * key);
unsigned int _data_length; unsigned int _data_length;
bucket ** _data; bucket ** _data;
}; };
}; };
#endif // __PROPS_HXX #endif // __PROPS_HXX
 End of changes. 8 change blocks. 
16 lines changed or deleted 29 lines changed or added


 sample_openal.hxx   sample_openal.hxx 
skipping to change at line 21 skipping to change at line 21
// //
// This program is distributed in the hope that it will be useful, but // This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of // WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details. // General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// $Id: sample_openal.hxx,v 1.11 2004/11/19 21:44:17 curt Exp $ // $Id: sample_openal.hxx,v 1.15 2005/11/12 12:22:23 ehofman Exp $
/** /**
* \file sample.hxx * \file sample.hxx
* Provides a sound sample encapsulation * Provides a sound sample encapsulation
*/ */
#ifndef _SG_SAMPLE_HXX #ifndef _SG_SAMPLE_HXX
#define _SG_SAMPLE_HXX 1 #define _SG_SAMPLE_HXX 1
#ifndef __cplusplus #ifndef __cplusplus
skipping to change at line 87 skipping to change at line 87
// The orientation of the sound (direction and cut-off angles) // The orientation of the sound (direction and cut-off angles)
ALfloat direction[3]; ALfloat direction[3];
ALfloat inner, outer, outergain; ALfloat inner, outer, outergain;
// Velocity of the source sound. // Velocity of the source sound.
ALfloat source_vel[3]; ALfloat source_vel[3];
// configuration values // configuration values
ALenum format; ALenum format;
ALsizei size; ALsizei size;
ALvoid* data;
ALsizei freq; ALsizei freq;
double pitch; double pitch;
double volume; double volume;
double reference_dist; double reference_dist;
double max_dist; double max_dist;
ALboolean loop; ALboolean loop;
bool playing;
bool bind_source();
public: public:
/**
* Empty constructor, can be used to read data to the systems
* memory and not to the driver.
*/
SGSoundSample();
/** /**
* Constructor * Constructor
* @param path Path name to sound * @param path Path name to sound
* @param file File name of sound * @param file File name of sound
* @param cleanup Request clean up the intermediate data (this
should usually be true unless you want to manipulate the data should usually be true unless you want to manipulate the data
later.) later.)
*/ */
SGSoundSample( const char *path, const char *file, bool cleanup ); SGSoundSample( const char *path, const char *file );
/** /**
* Constructor. * Constructor.
* @param _data Pointer to a memory buffer containing the sample data * @param _data Pointer to a memory buffer containing the sample data
the application is responsible for freeing the buffer data.
* @param len Byte length of array * @param len Byte length of array
* @param _freq Frequency of the provided data (bytes per second) * @param _freq Frequency of the provided data (bytes per second)
* @param cleanup Request clean up the intermediate data (this
should usually be true unless you want to manipulate the data should usually be true unless you want to manipulate the data
later.) later.)
*/ */
SGSoundSample( unsigned char *_data, int len, int _freq, bool cleanup ) ; SGSoundSample( unsigned char *_data, int len, int _freq );
~SGSoundSample(); ~SGSoundSample();
/** /**
* Start playing this sample. * Start playing this sample.
* *
* @param _loop Define wether the sound should be played in a loop. * @param _loop Define wether the sound should be played in a loop.
*/ */
void play( bool _loop ); void play( bool _loop );
skipping to change at line 151 skipping to change at line 158
/** /**
* Play this sample looped. * Play this sample looped.
* @see #play * @see #play
*/ */
inline void play_looped() { play(true); } inline void play_looped() { play(true); }
/** /**
* Test if a sample is curretnly playing. * Test if a sample is curretnly playing.
* @return true if is is playing, false otherwise. * @return true if is is playing, false otherwise.
*/ */
inline bool is_playing( ) { bool is_playing( );
ALint result;
alGetSourcei( source, AL_SOURCE_STATE, &result );
if ( alGetError() != AL_NO_ERROR) {
SG_LOG( SG_GENERAL, SG_ALERT,
"Oops AL error in sample is_playing(): " << sample_name
);
}
return (result == AL_PLAYING) ;
}
/** /**
* Get the current pitch setting of this sample. * Get the current pitch setting of this sample.
*/ */
inline double get_pitch() const { return pitch; } inline double get_pitch() const { return pitch; }
/** /**
* Set the pitch of this sample. * Set the pitch of this sample.
*/ */
inline void set_pitch( double p ) { void set_pitch( double p );
// clamp in the range of 0.01 to 2.0
if ( p < 0.01 ) { p = 0.01; }
if ( p > 2.0 ) { p = 2.0; }
pitch = p;
alSourcef( source, AL_PITCH, pitch );
if ( alGetError() != AL_NO_ERROR) {
SG_LOG( SG_GENERAL, SG_ALERT,
"Oops AL error in sample set_pitch()! " << p
<< " for " << sample_name );
}
}
/** /**
* Get the current volume setting of this sample. * Get the current volume setting of this sample.
*/ */
inline double get_volume() const { return volume; } inline double get_volume() const { return volume; }
/** /**
* Set the volume of this sample. * Set the volume of this sample.
*/ */
inline void set_volume( double v ) { void set_volume( double v );
volume = v;
alSourcef( source, AL_GAIN, volume );
if ( alGetError() != AL_NO_ERROR) {
SG_LOG( SG_GENERAL, SG_ALERT,
"Oops AL error in sample set_volume()! " << v
<< " for " << sample_name );
}
}
/** /**
* Returns the size of the sounds sample * Returns the size of the sounds sample
*/ */
inline int get_size() { inline int get_size() {
return size; return size;
} }
/** /**
* Return a pointer to the raw data
*/
inline char *get_data() {
return (char *)data;
}
/**
* Set position of sound source (uses same coordinate system as opengl) * Set position of sound source (uses same coordinate system as opengl)
*/ */
inline void set_source_pos( ALfloat *pos ) { void set_source_pos( ALfloat *pos );
source_pos[0] = pos[0];
source_pos[1] = pos[1];
source_pos[2] = pos[2];
sgVec3 final_pos;
sgAddVec3( final_pos, source_pos, offset_pos );
alSourcefv( source, AL_POSITION, final_pos );
}
/** /**
* Set "constant" offset position of sound source (uses same * Set "constant" offset position of sound source (uses same
* coordinate system as opengl) * coordinate system as opengl)
*/ */
inline void set_offset_pos( ALfloat *pos ) { void set_offset_pos( ALfloat *pos );
offset_pos[0] = pos[0];
offset_pos[1] = pos[1];
offset_pos[2] = pos[2];
sgVec3 final_pos;
sgAddVec3( final_pos, source_pos, offset_pos );
alSourcefv( source, AL_POSITION, final_pos );
}
/** /**
* Set the orientation of the sound source, both for direction * Set the orientation of the sound source, both for direction
* and audio cut-off angles. * and audio cut-off angles.
*/ */
inline void set_orientation( ALfloat *dir, ALfloat inner_angle=360.0, void set_orientation( ALfloat *dir, ALfloat inner_angle=360.0,
ALfloat outer_angle=360.0, ALfloat outer_angle=360.0,
ALfloat outer_gain=0.0) ALfloat outer_gain=0.0);
{
inner = inner_angle;
outer = outer_angle;
outergain = outer_gain;
alSourcefv( source, AL_DIRECTION, dir);
alSourcef( source, AL_CONE_INNER_ANGLE, inner );
alSourcef( source, AL_CONE_OUTER_ANGLE, outer );
alSourcef( source, AL_CONE_OUTER_GAIN, outergain );
}
/** /**
* Set velocity of sound source (uses same coordinate system as opengl) * Set velocity of sound source (uses same coordinate system as opengl)
*/ */
inline void set_source_vel( ALfloat *vel ) { void set_source_vel( ALfloat *vel );
source_vel[0] = vel[0];
source_vel[1] = vel[1];
source_vel[2] = vel[2];
alSourcefv( source, AL_VELOCITY, source_vel );
}
/** /**
* Set reference distance of sound (the distance where the gain * Set reference distance of sound (the distance where the gain
* will be half.) * will be half.)
*/ */
inline void set_reference_dist( ALfloat dist ) { void set_reference_dist( ALfloat dist );
reference_dist = dist;
alSourcef( source, AL_REFERENCE_DISTANCE, reference_dist );
}
/** /**
* Set maximume distance of sound (the distance where the sound is * Set maximume distance of sound (the distance where the sound is
* no longer audible. * no longer audible.
*/ */
inline void set_max_dist( ALfloat dist ) { void set_max_dist( ALfloat dist );
max_dist = dist;
alSourcef( source, AL_MAX_DISTANCE, max_dist ); /**
} * Load a sound file into a memory buffer only.
*/
ALvoid* load_file(const char *path, const char *file);
}; };
#endif // _SG_SAMPLE_HXX #endif // _SG_SAMPLE_HXX
 End of changes. 20 change blocks. 
89 lines changed or deleted 28 lines changed or added


 sg_file.hxx   sg_file.hxx 
skipping to change at line 23 skipping to change at line 23
// //
// This program is distributed in the hope that it will be useful, but // This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of // WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details. // General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// $Id: sg_file.hxx,v 1.2 2004/11/19 21:44:16 curt Exp $ // $Id: sg_file.hxx,v 1.3 2005/09/23 20:13:43 curt Exp $
#ifndef _SG_FILE_HXX #ifndef _SG_FILE_HXX
#define _SG_FILE_HXX #define _SG_FILE_HXX
#ifndef __cplusplus #ifndef __cplusplus
# error This library requires C++ # error This library requires C++
#endif #endif
#include <simgear/compiler.h> #include <simgear/compiler.h>
skipping to change at line 54 skipping to change at line 54
SG_USING_STD(string); SG_USING_STD(string);
/** /**
* A file I/O class based on SGIOChannel. * A file I/O class based on SGIOChannel.
*/ */
class SGFile : public SGIOChannel { class SGFile : public SGIOChannel {
string file_name; string file_name;
int fp; int fp;
bool eof_flag;
public: public:
/** /**
* Create an instance of SGFile. * Create an instance of SGFile.
* When calling the constructor you need to provide a file * When calling the constructor you need to provide a file
* name. This file is not opened immediately, but instead will be * name. This file is not opened immediately, but instead will be
* opened when the open() method is called. * opened when the open() method is called.
* @param file name of file to open * @param file name of file to open
*/ */
skipping to change at line 89 skipping to change at line 90
int write( const char *buf, const int length ); int write( const char *buf, const int length );
// write null terminated string to a file // write null terminated string to a file
int writestring( const char *str ); int writestring( const char *str );
// close file // close file
bool close(); bool close();
/** @return the name of the file being manipulated. */ /** @return the name of the file being manipulated. */
inline string get_file_name() const { return file_name; } inline string get_file_name() const { return file_name; }
/** @return true of eof conditions exists */
inline bool eof() const { return eof_flag; };
}; };
#endif // _SG_FILE_HXX #endif // _SG_FILE_HXX
 End of changes. 3 change blocks. 
1 lines changed or deleted 5 lines changed or added


 sg_random.h   sg_random.h 
skipping to change at line 25 skipping to change at line 25
// This library is distributed in the hope that it will be useful, // This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details. // Library General Public License for more details.
// //
// You should have received a copy of the GNU Library General Public // You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the // License along with this library; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA. // Boston, MA 02111-1307, USA.
// //
// $Id: sg_random.h,v 1.2 2004/11/19 21:47:05 curt Exp $ // $Id: sg_random.h,v 1.3 2005/04/30 09:59:12 ehofman Exp $
#ifndef _SG_RANDOM_H #ifndef _SG_RANDOM_H
#define _SG_RANDOM_H #define _SG_RANDOM_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** /**
* Seed the random number generater with time() so we don't see the * Seed the random number generater with time() so we don't see the
* same sequence every time. * same sequence every time.
*/ */
void sg_srandom_time(); void sg_srandom_time();
/** /**
* Seed the random number generater with time() in 10 minute intervals
* so we get the same sequence within 10 minutes interval.
* This is useful for synchronizing two display systems.
*/
void sg_srandom_time_10();
/**
* Seed the random number generater with your own seed so can set up * Seed the random number generater with your own seed so can set up
* repeatable randomization. * repeatable randomization.
* @param seed random number generator seed * @param seed random number generator seed
*/ */
void sg_srandom( unsigned int seed ); void sg_srandom( unsigned int seed );
/** /**
* Return a random number between [0.0, 1.0) * Return a random number between [0.0, 1.0)
* @return next "random" number in the "random" sequence * @return next "random" number in the "random" sequence
*/ */
 End of changes. 2 change blocks. 
1 lines changed or deleted 8 lines changed or added


 sg_time.hxx   sg_time.hxx 
skipping to change at line 25 skipping to change at line 25
// This library is distributed in the hope that it will be useful, // This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details. // Library General Public License for more details.
// //
// You should have received a copy of the GNU Library General Public // You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the // License along with this library; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA. // Boston, MA 02111-1307, USA.
// //
// $Id: sg_time.hxx,v 1.5 2004/11/19 21:44:17 curt Exp $ // $Id: sg_time.hxx,v 1.7 2005/11/17 15:30:07 curt Exp $
#ifndef _SG_TIME_HXX #ifndef _SG_TIME_HXX
#define _SG_TIME_HXX #define _SG_TIME_HXX
#ifndef __cplusplus #ifndef __cplusplus
# error This library requires C++ # error This library requires C++
#endif #endif
#include <simgear/compiler.h> #include <simgear/compiler.h>
skipping to change at line 191 skipping to change at line 191
inline double getJD() const { return jd; }; inline double getJD() const { return jd; };
/** @return modified julian date */ /** @return modified julian date */
inline double getMjd() const { return mjd; }; inline double getMjd() const { return mjd; };
/** @return local side real time */ /** @return local side real time */
inline double getLst() const { return lst; }; inline double getLst() const { return lst; };
/** @return grenich side real time (lst when longitude == 0) */ /** @return grenich side real time (lst when longitude == 0) */
inline double getGst() const { return gst; }; inline double getGst() const { return gst; };
/** @return offset in seconds to local timezone time */
inline time_t get_local_offset() const { return local_offset; };
}; };
// Some useful utility functions that don't make sense to be part of // Some useful utility functions that don't make sense to be part of
// the SGTime class // the SGTime class
/** /**
* \relates SGTime * \relates SGTime
* Return unix time in seconds for the given data (relative to GMT) * Return unix time in seconds for the given date (relative to GMT)
* @param year current GMT year * @param year current GMT year
* @param month current GMT month * @param month current GMT month
* @param day current GMT day * @param day current GMT day
* @param hour current GMT hour * @param hour current GMT hour
* @param minute current minute * @param minute current minute
* @param second current second * @param second current second
* @return unix/system time in seconds * @return unix/system time in seconds
*/ */
time_t sgTimeGetGMT(int year, int month, int day, time_t sgTimeGetGMT(int year, int month, int day,
int hour, int minute, int second); int hour, int minute, int second);
 End of changes. 3 change blocks. 
2 lines changed or deleted 5 lines changed or added


 soundmgr_openal.hxx   soundmgr_openal.hxx 
skipping to change at line 24 skipping to change at line 24
// //
// This program is distributed in the hope that it will be useful, but // This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of // WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details. // General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// $Id: soundmgr_openal.hxx,v 1.5 2004/11/19 21:44:17 curt Exp $ // $Id: soundmgr_openal.hxx,v 1.6 2005/01/24 15:51:37 ehofman Exp $
/** /**
* \file soundmgr.hxx * \file soundmgr.hxx
* Provides a sound manager class to keep track of * Provides a sound manager class to keep track of
* multiple sounds and manage playing them with different effects and * multiple sounds and manage playing them with different effects and
* timings. * timings.
*/ */
#ifndef _SG_SOUNDMGR_OPENAL_HXX #ifndef _SG_SOUNDMGR_OPENAL_HXX
#define _SG_SOUNDMGR_OPENAL_HXX 1 #define _SG_SOUNDMGR_OPENAL_HXX 1
skipping to change at line 47 skipping to change at line 47
# error This library requires C++ # error This library requires C++
#endif #endif
#include <simgear/compiler.h> #include <simgear/compiler.h>
#include STL_STRING #include STL_STRING
#include <map> #include <map>
#if defined( __APPLE__ ) #if defined( __APPLE__ )
# include <OpenAL/al.h> # include <OpenAL/al.h>
# include <OpenAL/alc.h>
#else #else
# include <AL/al.h> # include <AL/al.h>
# include <AL/alc.h>
#endif #endif
#include "sample_openal.hxx" #include "sample_openal.hxx"
SG_USING_STD(map); SG_USING_STD(map);
SG_USING_STD(string); SG_USING_STD(string);
typedef map < string, SGSoundSample * > sample_map; typedef map < string, SGSoundSample * > sample_map;
typedef sample_map::iterator sample_map_iterator; typedef sample_map::iterator sample_map_iterator;
typedef sample_map::const_iterator const_sample_map_iterator; typedef sample_map::const_iterator const_sample_map_iterator;
/** /**
* Manage a collection of SGSoundSample instances * Manage a collection of SGSoundSample instances
*/ */
class SGSoundMgr class SGSoundMgr
{ {
ALCdevice *dev;
ALCcontext *context;
// Position of the listener. // Position of the listener.
ALfloat listener_pos[3]; ALfloat listener_pos[3];
// Velocity of the listener. // Velocity of the listener.
ALfloat listener_vel[3]; ALfloat listener_vel[3];
// Orientation of the listener. (first 3 elements are "at", second // Orientation of the listener. (first 3 elements are "at", second
// 3 are "up") // 3 are "up")
ALfloat listener_ori[6]; ALfloat listener_ori[6];
 End of changes. 4 change blocks. 
1 lines changed or deleted 6 lines changed or added


 star.hxx   star.hxx 
skipping to change at line 23 skipping to change at line 23
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details. * Library General Public License for more details.
* *
* You should have received a copy of the GNU Library General Public * You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the * License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
* *
* $Id: star.hxx,v 1.1.1.1 2002/09/07 02:58:20 curt Exp $ * $Id: star.hxx,v 1.2 2005/11/11 13:19:59 ehofman Exp $
************************************************************************** / ************************************************************************** /
#ifndef _STAR_HXX_ #ifndef _STAR_HXX_
#define _STAR_HXX_ #define _STAR_HXX_
#include <simgear/ephemeris/celestialBody.hxx> #include <simgear/ephemeris/celestialBody.hxx>
class Star : public CelestialBody class Star : public CelestialBody
{ {
private: private:
double xs, ys; // the sun's rectangular geocentric coordinates double xs, ys; // the sun's rectangular geocentric coordinates
double ye, ze; // the sun's rectangularequatorial rectangular geoce ntric coordinates
double distance; // the sun's distance to the earth double distance; // the sun's distance to the earth
public: public:
Star (double mjd); Star (double mjd);
Star (); Star ();
~Star(); ~Star();
void updatePosition(double mjd); void updatePosition(double mjd);
double getM(); double getM();
double getw(); double getw();
double getxs(); double getxs();
double getys(); double getys();
double getye();
double getze();
double getDistance(); double getDistance();
}; };
inline double Star::getM() inline double Star::getM()
{ {
return M; return M;
} }
inline double Star::getw() inline double Star::getw()
{ {
skipping to change at line 71 skipping to change at line 74
inline double Star::getxs() inline double Star::getxs()
{ {
return xs; return xs;
} }
inline double Star::getys() inline double Star::getys()
{ {
return ys; return ys;
} }
inline double Star::getye()
{
return ye;
}
inline double Star::getze()
{
return ze;
}
inline double Star::getDistance() inline double Star::getDistance()
{ {
return distance; return distance;
} }
#endif // _STAR_HXX_ #endif // _STAR_HXX_
 End of changes. 4 change blocks. 
1 lines changed or deleted 14 lines changed or added


 subsystem_mgr.hxx   subsystem_mgr.hxx 
skipping to change at line 19 skipping to change at line 19
// //
// This program is distributed in the hope that it will be useful, but // This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of // WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details. // General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// $Id: subsystem_mgr.hxx,v 1.1 2003/09/24 17:19:23 ehofman Exp $ // $Id: subsystem_mgr.hxx,v 1.2 2005/06/11 08:39:26 ehofman Exp $
#ifndef __SUBSYSTEM_MGR_HXX #ifndef __SUBSYSTEM_MGR_HXX
#define __SUBSYSTEM_MGR_HXX 1 #define __SUBSYSTEM_MGR_HXX 1
#include <simgear/compiler.h> #include <simgear/compiler.h>
#if 0 #if 0
#ifdef HAVE_WINDOWS_H #ifdef HAVE_WINDOWS_H
# include <windows.h> # include <windows.h>
# include <float.h> # include <float.h>
skipping to change at line 137 skipping to change at line 137
* *
* <p>This method should set up the state of the subsystem, but * <p>This method should set up the state of the subsystem, but
* should not bind any properties. Note that any dependencies on * should not bind any properties. Note that any dependencies on
* the state of other subsystems should be placed here rather than * the state of other subsystems should be placed here rather than
* in the constructor, so that FlightGear can control the * in the constructor, so that FlightGear can control the
* initialization order.</p> * initialization order.</p>
*/ */
virtual void init (); virtual void init ();
/** /**
* Initialize parts that depend on other subsystems having been initializ
ed.
*
* <p>This method should set up all parts that depend on other
* subsystems. One example is the scripting/Nasal subsystem, which
* is initialized last. So, if a subsystem wants to execute Nasal
* code in subsystem-specific configuration files, it has to do that
* in its postinit() method.</p>
*/
virtual void postinit ();
/**
* Reinitialize the subsystem. * Reinitialize the subsystem.
* *
* <p>This method should cause the subsystem to reinitialize itself, * <p>This method should cause the subsystem to reinitialize itself,
* and (normally) to reload any configuration files.</p> * and (normally) to reload any configuration files.</p>
*/ */
virtual void reinit (); virtual void reinit ();
/** /**
* Acquire the subsystem's property bindings. * Acquire the subsystem's property bindings.
* *
skipping to change at line 228 skipping to change at line 239
* A group of FlightGear subsystems. * A group of FlightGear subsystems.
*/ */
class SGSubsystemGroup : public SGSubsystem class SGSubsystemGroup : public SGSubsystem
{ {
public: public:
SGSubsystemGroup (); SGSubsystemGroup ();
virtual ~SGSubsystemGroup (); virtual ~SGSubsystemGroup ();
virtual void init (); virtual void init ();
virtual void postinit ();
virtual void reinit (); virtual void reinit ();
virtual void bind (); virtual void bind ();
virtual void unbind (); virtual void unbind ();
virtual void update (double delta_time_sec); virtual void update (double delta_time_sec);
virtual void suspend (); virtual void suspend ();
virtual void resume (); virtual void resume ();
virtual bool is_suspended () const; virtual bool is_suspended () const;
virtual void set_subsystem (const string &name, virtual void set_subsystem (const string &name,
SGSubsystem * subsystem, SGSubsystem * subsystem,
skipping to change at line 297 skipping to change at line 309
enum GroupType { enum GroupType {
INIT = 0, INIT = 0,
GENERAL, GENERAL,
MAX_GROUPS MAX_GROUPS
}; };
SGSubsystemMgr (); SGSubsystemMgr ();
virtual ~SGSubsystemMgr (); virtual ~SGSubsystemMgr ();
virtual void init (); virtual void init ();
virtual void postinit ();
virtual void reinit (); virtual void reinit ();
virtual void bind (); virtual void bind ();
virtual void unbind (); virtual void unbind ();
virtual void update (double delta_time_sec); virtual void update (double delta_time_sec);
virtual void suspend (); virtual void suspend ();
virtual void resume (); virtual void resume ();
virtual bool is_suspended () const; virtual bool is_suspended () const;
virtual void add (const char * name, virtual void add (const char * name,
SGSubsystem * subsystem, SGSubsystem * subsystem,
 End of changes. 4 change blocks. 
1 lines changed or deleted 15 lines changed or added


 texture.hxx   texture.hxx 
skipping to change at line 45 skipping to change at line 45
GLsizei num_colors; GLsizei num_colors;
void resize(unsigned int width = 256, unsigned int height = 256); void resize(unsigned int width = 256, unsigned int height = 256);
const char *errstr; const char *errstr;
protected: protected:
FILE *file; FILE *file;
typedef struct _ImageRec { typedef struct _ImageRec {
_ImageRec(void) : tmp(0), rowStart(0), rowSize(0) {}
unsigned short imagic; unsigned short imagic;
unsigned short type; unsigned short type;
unsigned short dim; unsigned short dim;
unsigned short xsize, ysize, zsize; unsigned short xsize, ysize, zsize;
unsigned int min, max; unsigned int min, max;
unsigned int wasteBytes; unsigned int wasteBytes;
char name[80]; char name[80];
unsigned long colorMap; unsigned long colorMap;
gzFile file; gzFile file;
GLubyte *tmp; GLubyte *tmp;
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 version.h   version.h 
skipping to change at line 27 skipping to change at line 27
// You should have received a copy of the GNU Library General Public // You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the // License along with this library; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA. // Boston, MA 02111-1307, USA.
// //
// $Id: version.h.in,v 1.2 2004/11/19 21:44:16 curt Exp $ // $Id: version.h.in,v 1.2 2004/11/19 21:44:16 curt Exp $
#ifndef _SIMGEAR_VERSION_H #ifndef _SIMGEAR_VERSION_H
#define _SIMGEAR_VERSION_H #define _SIMGEAR_VERSION_H
#define SIMGEAR_VERSION 0.3.8 #define SIMGEAR_VERSION 0.3.9
#endif // _SIMGEAR_VERSION_H #endif // _SIMGEAR_VERSION_H
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 waypoint.hxx   waypoint.hxx 
skipping to change at line 24 skipping to change at line 24
// //
// This program is distributed in the hope that it will be useful, but // This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of // WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details. // General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// $Id: waypoint.hxx,v 1.3 2004/10/16 12:23:53 ehofman Exp $ // $Id: waypoint.hxx,v 1.4 2005/10/25 13:48:58 ehofman Exp $
#ifndef _WAYPOINT_HXX #ifndef _WAYPOINT_HXX
#define _WAYPOINT_HXX #define _WAYPOINT_HXX
#ifndef __cplusplus #ifndef __cplusplus
# error This library requires C++ # error This library requires C++
#endif #endif
#include <simgear/compiler.h> #include <simgear/compiler.h>
skipping to change at line 152 skipping to change at line 152
*/ */
inline double get_distance() const { return distance; } inline double get_distance() const { return distance; }
/** /**
* Set the waypoint distance value to a value of our choice. * Set the waypoint distance value to a value of our choice.
* @param d distance * @param d distance
*/ */
inline void set_distance( double d ) { distance = d; } inline void set_distance( double d ) { distance = d; }
/** @return waypoint id */ /** @return waypoint id */
inline string get_id() const { return id; } inline const string& get_id() const { return id; }
/** @return waypoint name */ /** @return waypoint name */
inline string get_name() const { return name; } inline const string& get_name() const { return name; }
}; };
#endif // _WAYPOINT_HXX #endif // _WAYPOINT_HXX
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/