| RenderTexture.h | | RenderTexture.h | |
| | | | |
| skipping to change at line 30 | | skipping to change at line 30 | |
| // must not be misrepresented as being the original software. | | // must not be misrepresented as being the original software. | |
| // | | // | |
| // 3. This notice may not be removed or altered from any source | | // 3. This notice may not be removed or altered from any source | |
| // distribution. | | // distribution. | |
| // | | // | |
| // ------------------------------------------------------------------------
----- | | // ------------------------------------------------------------------------
----- | |
| // Credits: | | // Credits: | |
| // Original RenderTexture code: Mark J. Harris | | // Original RenderTexture code: Mark J. Harris | |
| // Original Render-to-depth-texture support: Thorsten Scheuermann | | // Original Render-to-depth-texture support: Thorsten Scheuermann | |
| // Linux Copy-to-texture: Eric Werness | | // Linux Copy-to-texture: Eric Werness | |
|
| | | // OS X: Alexander Powell (someone please help) | |
| // Various Bug Fixes: Daniel (Redge) Sperl | | // Various Bug Fixes: Daniel (Redge) Sperl | |
| // Bill Baxter | | // Bill Baxter | |
| // | | // | |
| // ------------------------------------------------------------------------
----- | | // ------------------------------------------------------------------------
----- | |
| /** | | /** | |
| * @file RenderTexture.h | | * @file RenderTexture.h | |
| * | | * | |
| * Interface definition for class RenderTexture. A multi-format render to | | * Interface definition for class RenderTexture. A multi-format render to | |
| * texture wrapper. | | * texture wrapper. | |
| */ | | */ | |
| #ifndef __RENDERTEXTURE2_HPP__ | | #ifndef __RENDERTEXTURE2_HPP__ | |
| #define __RENDERTEXTURE2_HPP__ | | #define __RENDERTEXTURE2_HPP__ | |
| | | | |
| /* | | /* | |
| * Changelog: | | * Changelog: | |
| * | | * | |
| * Jan. 2005, Removed GLEW dependencies, Erik Hofman | | * Jan. 2005, Removed GLEW dependencies, Erik Hofman | |
|
| * Added MacOS X support | | * Mar. 2006, Added MAC OS X support, Alexander Powell | |
| */ | | */ | |
| #include <simgear/compiler.h> | | #include <simgear/compiler.h> | |
| | | | |
|
| #if !defined( _WIN32 ) && !defined( __APPLE__ ) | | #if !defined( _WIN32 ) && !defined( __MACH__ ) | |
| # include <X11/Xlib.h> | | # include <X11/Xlib.h> | |
| #endif | | #endif | |
| #include SG_GL_H | | #include SG_GL_H | |
| #ifndef _WIN32 | | #ifndef _WIN32 | |
| # include SG_GLX_H | | # include SG_GLX_H | |
| #endif | | #endif | |
|
| #ifdef __APPLE__ | | | |
| # ifndef None | | | |
| # define None false | | | |
| # endif | | | |
| # ifndef True | | | |
| # define True true | | | |
| # endif | | | |
| #endif | | | |
| | | | |
| #include <string> | | #include <string> | |
| #include <vector> | | #include <vector> | |
| | | | |
| /* The pixel format for the pbuffer is controlled by the mode string passed | | /* The pixel format for the pbuffer is controlled by the mode string passed | |
| * into the PBuffer constructor. This string can have the following attribut
es: | | * into the PBuffer constructor. This string can have the following attribut
es: | |
| * | | * | |
| * To specify the pixel format, use the following syntax. | | * To specify the pixel format, use the following syntax. | |
| * <channels>=<bits> | | * <channels>=<bits> | |
| * <channels> must match one of the following. | | * <channels> must match one of the following. | |
| | | | |
| skipping to change at line 344 | | skipping to change at line 337 | |
| bool _bShareObjects; | | bool _bShareObjects; | |
| bool _bCopyContext; | | bool _bCopyContext; | |
| | | | |
| #ifdef _WIN32 | | #ifdef _WIN32 | |
| HDC _hDC; // Handle to a device context. | | HDC _hDC; // Handle to a device context. | |
| HGLRC _hGLContext; // Handle to a GL context. | | HGLRC _hGLContext; // Handle to a GL context. | |
| HPBUFFERARB _hPBuffer; // Handle to a pbuffer. | | HPBUFFERARB _hPBuffer; // Handle to a pbuffer. | |
| | | | |
| HDC _hPreviousDC; | | HDC _hPreviousDC; | |
| HGLRC _hPreviousContext; | | HGLRC _hPreviousContext; | |
|
| #elif defined( __APPLE__ ) | | #elif defined( __MACH__ ) | |
| | | CGLContextObj _hGLContext; | |
| | | CGLPBufferObj _hPBuffer; | |
| | | | |
|
| | | CGLContextObj _hPreviousContext; | |
| #else | | #else | |
| Display *_pDisplay; | | Display *_pDisplay; | |
| GLXContext _hGLContext; | | GLXContext _hGLContext; | |
| GLXPbuffer _hPBuffer; | | GLXPbuffer _hPBuffer; | |
| | | | |
| GLXDrawable _hPreviousDrawable; | | GLXDrawable _hPreviousDrawable; | |
| GLXContext _hPreviousContext; | | GLXContext _hPreviousContext; | |
| #endif | | #endif | |
| | | | |
| // Texture stuff | | // Texture stuff | |
| | | | |
End of changes. 6 change blocks. |
| 11 lines changed or deleted | | 7 lines changed or added | |
|
| SGThread.hxx | | SGThread.hxx | |
| | | | |
| skipping to change at line 19 | | skipping to change at line 19 | |
| // published by the Free Software Foundation; either version 2 of the | | // published by the Free Software Foundation; either version 2 of the | |
| // License, or (at your option) any later version. | | // License, or (at your option) any later version. | |
| // | | // | |
| // 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA. | |
| // | | // | |
|
| // $Id: SGThread.hxx,v 1.6 2005/11/14 18:25:17 ehofman Exp $ | | // $Id: SGThread.hxx,v 1.7 2006-03-08 18:16:10 mfranz 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. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| apt_signs.hxx | | apt_signs.hxx | |
| | | | |
| skipping to change at line 19 | | skipping to change at line 19 | |
| // published by the Free Software Foundation; either version 2 of the | | // published by the Free Software Foundation; either version 2 of the | |
| // License, or (at your option) any later version. | | // License, or (at your option) any later version. | |
| // | | // | |
| // 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA. | |
| // | | // | |
|
| // $Id: apt_signs.hxx,v 1.3 2004/11/19 21:44:17 curt Exp $ | | // $Id: apt_signs.hxx,v 1.5 2006-03-08 18:16:09 mfranz Exp $ | |
| | | | |
| #ifndef _SG_APT_SIGNS_HXX | | #ifndef _SG_APT_SIGNS_HXX | |
| #define _SG_APT_SIGNS_HXX | | #define _SG_APT_SIGNS_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> | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| celestialBody.hxx | | celestialBody.hxx | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| * This library is free software; you can redistribute it and/or | | * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public | | * modify it under the terms of the GNU Library General Public | |
| * License as published by the Free Software Foundation; either | | * License as published by the Free Software Foundation; either | |
| * version 2 of the License, or (at your option) any later version. | | * version 2 of the License, or (at your option) any later version. | |
| * | | * | |
| * 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 General Public License | |
| * License along with this library; if not, write to the | | * along with this program; if not, write to the Free Software | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| * Boston, MA 02111-1307, USA. | | 1, USA. | |
| * | | * | |
|
| * $Id: celestialBody.hxx,v 1.1.1.1 2002/09/07 02:58:20 curt Exp $ | | * $Id: celestialBody.hxx,v 1.4 2006-03-08 18:16:08 mfranz Exp $ | |
| **************************************************************************
/ | | **************************************************************************
/ | |
| | | | |
| #ifndef _CELESTIALBODY_H_ | | #ifndef _CELESTIALBODY_H_ | |
| #define _CELESTIALBODY_H_ | | #define _CELESTIALBODY_H_ | |
| | | | |
| #ifndef __cplusplus | | #ifndef __cplusplus | |
| # error This library requires C++ | | # error This library requires C++ | |
| #endif | | #endif | |
| | | | |
| #include <simgear/constants.h> | | #include <simgear/constants.h> | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| cloud.hxx | | cloud.hxx | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: cloud.hxx,v 1.15 2005/05/15 09:27:00 ehofman Exp $ | | // $Id: cloud.hxx,v 1.16 2006-03-08 18:16:09 mfranz 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); | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| compiler.h | | compiler.h | |
| | | | |
| skipping to change at line 14 | | skipping to change at line 14 | |
| * This library is free software; you can redistribute it and/or | | * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public | | * modify it under the terms of the GNU Library General Public | |
| * License as published by the Free Software Foundation; either | | * License as published by the Free Software Foundation; either | |
| * version 2 of the License, or (at your option) any later version. | | * version 2 of the License, or (at your option) any later version. | |
| * | | * | |
| * 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 General Public License | |
| * License along with this library; if not, write to the | | * along with this program; if not, write to the Free Software | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| * Boston, MA 02111-1307, USA. | | 1, USA. | |
| * | | * | |
|
| * $Id: compiler.h,v 1.21 2005/10/06 11:06:27 ehofman Exp $ | | * $Id: compiler.h,v 1.24 2006-03-08 18:16:08 mfranz 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 | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| condition.hxx | | condition.hxx | |
| | | | |
| skipping to change at line 50 | | skipping to change at line 50 | |
| * true value. | | * true value. | |
| */ | | */ | |
| class SGPropertyCondition : public SGCondition | | class SGPropertyCondition : public SGCondition | |
| { | | { | |
| public: | | public: | |
| SGPropertyCondition ( SGPropertyNode *prop_root, | | SGPropertyCondition ( SGPropertyNode *prop_root, | |
| const char * propname ); | | const char * propname ); | |
| virtual ~SGPropertyCondition (); | | virtual ~SGPropertyCondition (); | |
| virtual bool test () const { return _node->getBoolValue(); } | | virtual bool test () const { return _node->getBoolValue(); } | |
| private: | | private: | |
|
| const SGPropertyNode * _node; | | SGConstPropertyNode_ptr _node; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Condition for a 'not' operator. | | * Condition for a 'not' operator. | |
| * | | * | |
| * This condition is true only if the child condition is false. | | * This condition is true only if the child condition is false. | |
| */ | | */ | |
| class SGNotCondition : public SGCondition | | class SGNotCondition : public SGCondition | |
| { | | { | |
| public: | | public: | |
| | | | |
| skipping to change at line 128 | | skipping to change at line 128 | |
| virtual bool test () const; | | virtual bool test () const; | |
| virtual void setLeftProperty( SGPropertyNode *prop_root, | | virtual void setLeftProperty( SGPropertyNode *prop_root, | |
| const char * propname ); | | const char * propname ); | |
| virtual void setRightProperty( SGPropertyNode *prop_root, | | virtual void setRightProperty( SGPropertyNode *prop_root, | |
| const char * propname ); | | const char * propname ); | |
| // will make a local copy | | // will make a local copy | |
| virtual void setRightValue (const SGPropertyNode * value); | | virtual void setRightValue (const SGPropertyNode * value); | |
| private: | | private: | |
| Type _type; | | Type _type; | |
| bool _reverse; | | bool _reverse; | |
|
| const SGPropertyNode * _left_property; | | SGConstPropertyNode_ptr _left_property; | |
| const SGPropertyNode * _right_property; | | SGConstPropertyNode_ptr _right_property; | |
| const SGPropertyNode * _right_value; | | SGConstPropertyNode_ptr _right_value; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Base class for a conditional components. | | * Base class for a conditional components. | |
| * | | * | |
| * This class manages the conditions and tests; the component should | | * This class manages the conditions and tests; the component should | |
| * invoke the test() method whenever it needs to decide whether to | | * invoke the test() method whenever it needs to decide whether to | |
| * active itself, draw itself, and so on. | | * active itself, draw itself, and so on. | |
| */ | | */ | |
| class SGConditional | | class SGConditional | |
| | | | |
End of changes. 2 change blocks. |
| 4 lines changed or deleted | | 4 lines changed or added | |
|
| constants.h | | constants.h | |
| | | | |
| skipping to change at line 17 | | skipping to change at line 17 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: constants.h,v 1.5 2005/10/27 08:21:00 ehofman Exp $ | | // $Id: constants.h,v 1.9 2006-03-08 18:16:08 mfranz 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. 3 change blocks. |
| 8 lines changed or deleted | | 5 lines changed or added | |
|
| dome.hxx | | dome.hxx | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: dome.hxx,v 1.5 2005/10/23 11:46:41 ehofman Exp $ | | // $Id: dome.hxx,v 1.6 2006-03-08 18:16:09 mfranz 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 | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| ephemeris.hxx | | ephemeris.hxx | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: ephemeris.hxx,v 1.2 2004/11/19 21:44:16 curt Exp $ | | // $Id: ephemeris.hxx,v 1.5 2006-03-08 18:16:08 mfranz Exp $ | |
| | | | |
| #ifndef _EPHEMERIS_HXX | | #ifndef _EPHEMERIS_HXX | |
| #define _EPHEMERIS_HXX | | #define _EPHEMERIS_HXX | |
| | | | |
| #include <plib/sg.h> | | #include <plib/sg.h> | |
| | | | |
| #include <simgear/ephemeris/star.hxx> | | #include <simgear/ephemeris/star.hxx> | |
| #include <simgear/ephemeris/moonpos.hxx> | | #include <simgear/ephemeris/moonpos.hxx> | |
| #include <simgear/ephemeris/mercury.hxx> | | #include <simgear/ephemeris/mercury.hxx> | |
| #include <simgear/ephemeris/venus.hxx> | | #include <simgear/ephemeris/venus.hxx> | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| extensions.hxx | | extensions.hxx | |
| | | | |
| skipping to change at line 465 | | skipping to change at line 465 | |
| | | | |
| #ifndef GL_NV_texture_rectangle | | #ifndef GL_NV_texture_rectangle | |
| #define GL_NV_texture_rectangle 1 | | #define GL_NV_texture_rectangle 1 | |
| #define GL_TEXTURE_RECTANGLE_NV 0x84
F5 | | #define GL_TEXTURE_RECTANGLE_NV 0x84
F5 | |
| #define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84
F6 | | #define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84
F6 | |
| #define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 | | #define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 | |
| #define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 | | #define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
|
| | | * NV_texture_rectangle | |
| | | */ | |
| | | | |
| | | #ifndef GL_EXT_texture_rectangle | |
| | | #define GL_EXT_texture_rectangle 1 | |
| | | #define GL_TEXTURE_RECTANGLE_EXT 0x84F5 | |
| | | #define GL_TEXTURE_BINDING_RECTANGLE_EXT 0x84F6 | |
| | | #define GL_PROXY_TEXTURE_RECTANGLE_EXT 0x84F7 | |
| | | #define GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT 0x84F8 | |
| | | #endif | |
| | | | |
| | | /* | |
| * WGL_NV_texture_rectangle | | * WGL_NV_texture_rectangle | |
| */ | | */ | |
| | | | |
| #ifndef WGL_NV_texture_rectangle | | #ifndef WGL_NV_texture_rectangle | |
| #define WGL_NV_texture_rectangle 1 | | #define WGL_NV_texture_rectangle 1 | |
| #define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 | | #define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 | |
| #define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 | | #define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 | |
| #define WGL_TEXTURE_RECTANGLE_NV 0x20A2 | | #define WGL_TEXTURE_RECTANGLE_NV 0x20A2 | |
| #endif | | #endif | |
| | | | |
| | | | |
| skipping to change at line 567 | | skipping to change at line 579 | |
| #define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 | | #define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 | |
| #define GL_RGBA_FLOAT16_ATI 0x881A | | #define GL_RGBA_FLOAT16_ATI 0x881A | |
| #define GL_RGB_FLOAT16_ATI 0x881B | | #define GL_RGB_FLOAT16_ATI 0x881B | |
| #define GL_ALPHA_FLOAT16_ATI 0x881C | | #define GL_ALPHA_FLOAT16_ATI 0x881C | |
| #define GL_INTENSITY_FLOAT16_ATI 0x881D | | #define GL_INTENSITY_FLOAT16_ATI 0x881D | |
| #define GL_LUMINANCE_FLOAT16_ATI 0x881E | | #define GL_LUMINANCE_FLOAT16_ATI 0x881E | |
| #define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F | | #define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
|
| | | * ARB point sprite | |
| | | */ | |
| | | #ifndef GL_ARB_point_sprite | |
| | | #define GL_ARB_point_sprite 1 | |
| | | #define GL_POINT_SPRITE_ARB 0x8861 | |
| | | #define GL_COORD_REPLACE_ARB 0x8862 | |
| | | #endif | |
| | | | |
| | | #ifndef GL_NV_point_sprite | |
| | | #define GL_NV_point_sprite 1 | |
| | | #define GL_POINT_SPRITE_NV 0x8861 | |
| | | #define GL_COORD_REPLACE_NV 0x8862 | |
| | | #define GL_POINT_SPRITE_R_MODE_NV 0x8863 | |
| | | #endif | |
| | | | |
| | | #ifndef GL_VERSION_2_0 | |
| | | #define GL_POINT_SPRITE 0x8861 | |
| | | #define GL_COORD_REPLACE 0x8862 | |
| | | #endif | |
| | | | |
| | | /* | |
| * ARB_vertex_program | | * ARB_vertex_program | |
| */ | | */ | |
| #ifndef GL_ARB_vertex_program | | #ifndef GL_ARB_vertex_program | |
| #define GL_ARB_vertex_program 1 | | #define GL_ARB_vertex_program 1 | |
| #define GL_COLOR_SUM_ARB 0x8458 | | #define GL_COLOR_SUM_ARB 0x8458 | |
| #define GL_VERTEX_PROGRAM_ARB 0x8620 | | #define GL_VERTEX_PROGRAM_ARB 0x8620 | |
| #define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 | | #define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 | |
| #define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 | | #define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 | |
| #define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 | | #define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 | |
| #define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 | | #define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 | |
| | | | |
End of changes. 2 change blocks. |
| 0 lines changed or deleted | | 33 lines changed or added | |
|
| fastmath.hxx | | fastmath.hxx | |
| /* | | /* | |
| * \file fastmath.hxx | | * \file fastmath.hxx | |
| * fast mathematics routines. | | * fast mathematics routines. | |
| * | | * | |
|
| * Refferences: | | * References: | |
| * | | * | |
| * A Fast, Compact Approximation of the Exponential Function | | * A Fast, Compact Approximation of the Exponential Function | |
| * Nicol N. Schraudolph | | * Nicol N. Schraudolph | |
| * IDSIA, Lugano, Switzerland | | * IDSIA, Lugano, Switzerland | |
| * http://www.inf.ethz.ch/~schraudo/pubs/exp.pdf | | * http://www.inf.ethz.ch/~schraudo/pubs/exp.pdf | |
| * | | * | |
| * Fast log() Function, by Laurent de Soras: | | * Fast log() Function, by Laurent de Soras: | |
| * http://www.flipcode.com/cgi-bin/msg.cgi?showThread=Tip-Fastlogfunction&f
orum=totd&id=-1 | | * http://www.flipcode.com/cgi-bin/msg.cgi?showThread=Tip-Fastlogfunction&f
orum=totd&id=-1 | |
| * | | * | |
| */ | | */ | |
| | | | |
| /* | | /* | |
|
| * $Id: fastmath.hxx,v 1.4 2004/05/08 12:58:29 ehofman Exp $ | | * $Id: fastmath.hxx,v 1.7 2006-03-08 18:16:08 mfranz Exp $ | |
| */ | | */ | |
| | | | |
| #ifndef _SG_FMATH_HXX | | #ifndef _SG_FMATH_HXX | |
| #define _SG_FMATH_HXX 1 | | #define _SG_FMATH_HXX 1 | |
| | | | |
| #ifndef __cplusplus | | #ifndef __cplusplus | |
| # error This library requires C++ | | # error This library requires C++ | |
| #endif | | #endif | |
| | | | |
|
| #ifdef _MSC_VER | | | |
| #define _USE_MATH_DEFINES | | | |
| #endif | | | |
| #include <math.h> | | #include <math.h> | |
| | | | |
| double fast_exp(double val); | | double fast_exp(double val); | |
| double fast_exp2(const double val); | | double fast_exp2(const double val); | |
| | | | |
| float fast_pow(const float val1, const float val2); | | float fast_pow(const float val1, const float val2); | |
| float fast_log2(const float cal); | | float fast_log2(const float cal); | |
| float fast_root(const float f, const int n); | | float fast_root(const float f, const int n); | |
| | | | |
| float _fast_pow2(const float cal); | | float _fast_pow2(const float cal); | |
| | | | |
| skipping to change at line 55 | | skipping to change at line 52 | |
| float fast_tan(const float val); | | float fast_tan(const float val); | |
| float fast_asin(const float val); | | float fast_asin(const float val); | |
| float fast_acos(const float val); | | float fast_acos(const float val); | |
| float fast_atan(const float val); | | float fast_atan(const float val); | |
| | | | |
| void fast_BSL(float &x, register unsigned long shiftAmount); | | void fast_BSL(float &x, register unsigned long shiftAmount); | |
| void fast_BSR(float &x, register unsigned long shiftAmount); | | void fast_BSR(float &x, register unsigned long shiftAmount); | |
| | | | |
| inline float fast_log2 (float val) | | inline float fast_log2 (float val) | |
| { | | { | |
|
| int * const exp_ptr = reinterpret_cast <int *> (&val); | | union { | |
| int x = *exp_ptr; | | float f; | |
| const int log_2 = ((x >> 23) & 255) - 128; | | int i; | |
| x &= ~(255 << 23); | | } v; | |
| x += 127 << 23; | | v.f = val; | |
| *exp_ptr = x; | | const int log_2 = ((v.i >> 23) & 255) - 128; | |
| | | v.i &= ~(255 << 23); | |
| | | v.i += 127 << 23; | |
| | | | |
|
| val = ((-1.0f/3) * val + 2) * val - 2.0f/3; // (1) | | v.f = ((-1.0f/3) * v.f + 2) * v.f - 2.0f/3; // (1) | |
| | | | |
|
| return (val + log_2); | | return (v.f + log_2); | |
| } | | } | |
| | | | |
| /** | | /** | |
| * This function is about 3 times faster than the system log() function | | * This function is about 3 times faster than the system log() function | |
| * and has an error of about 0.01% | | * and has an error of about 0.01% | |
| */ | | */ | |
| inline float fast_log (const float &val) | | inline float fast_log (const float &val) | |
| { | | { | |
| return (fast_log2 (val) * 0.69314718f); | | return (fast_log2 (val) * 0.69314718f); | |
| } | | } | |
| | | | |
End of changes. 6 change blocks. |
| 13 lines changed or deleted | | 12 lines changed or added | |
|
| geocoord.h | | geocoord.h | |
| | | | |
| skipping to change at line 15 | | skipping to change at line 15 | |
| * This library is free software; you can redistribute it and/or | | * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public | | * modify it under the terms of the GNU Library General Public | |
| * License as published by the Free Software Foundation; either | | * License as published by the Free Software Foundation; either | |
| * version 2 of the License, or (at your option) any later version. | | * version 2 of the License, or (at your option) any later version. | |
| * | | * | |
| * 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 General Public License | |
| * License along with this library; if not, write to the | | * along with this program; if not, write to the Free Software | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| * Boston, MA 02111-1307, USA. | | 1, USA. | |
| * | | * | |
| **************************************************************************
/ | | **************************************************************************
/ | |
| | | | |
| /************************************************************************* | | /************************************************************************* | |
| * | | * | |
| * This file defines a small and simple class to store geocentric | | * This file defines a small and simple class to store geocentric | |
| * coordinates. Basically, class GeoCoord is intended as a base class for | | * coordinates. Basically, class GeoCoord is intended as a base class for | |
| * any kind of of object, that can be categorized according to its | | * any kind of of object, that can be categorized according to its | |
| * location on earth, be it navaids, or aircraft. This class for originally | | * location on earth, be it navaids, or aircraft. This class for originally | |
| * written for FlightGear, in order to store Timezone control points. | | * written for FlightGear, in order to store Timezone control points. | |
| | | | |
End of changes. 1 change blocks. |
| 4 lines changed or deleted | | 4 lines changed or added | |
|
| interpolater.hxx | | interpolater.hxx | |
| | | | |
| skipping to change at line 21 | | skipping to change at line 21 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: interpolater.hxx,v 1.2 2004/11/19 21:47:05 curt Exp $ | | // $Id: interpolater.hxx,v 1.4 2006-03-08 18:16:08 mfranz Exp $ | |
| | | | |
| #ifndef _INTERPOLATER_H | | #ifndef _INTERPOLATER_H | |
| #define _INTERPOLATER_H | | #define _INTERPOLATER_H | |
| | | | |
| #ifndef __cplusplus | | #ifndef __cplusplus | |
| # error This library requires C++ | | # error This library requires C++ | |
| #endif | | #endif | |
| | | | |
| #include <simgear/compiler.h> | | #include <simgear/compiler.h> | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| interpolator.hxx | | interpolator.hxx | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| | | | |
| #include <simgear/props/props.hxx> | | #include <simgear/props/props.hxx> | |
| #include <simgear/structure/subsystem_mgr.hxx> | | #include <simgear/structure/subsystem_mgr.hxx> | |
| | | | |
| // TODO: support a callback upon interpolation completion so that user | | // TODO: support a callback upon interpolation completion so that user | |
| // code can register another one immediately without worrying about | | // code can register another one immediately without worrying about | |
| // timer aliasing. | | // timer aliasing. | |
| | | | |
| class SGInterpolator : public SGSubsystem { | | class SGInterpolator : public SGSubsystem { | |
| public: | | public: | |
| | | | |
End of changes. 1 change blocks. |
| 4 lines changed or deleted | | 4 lines changed or added | |
|
| jupiter.hxx | | jupiter.hxx | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| * This library is free software; you can redistribute it and/or | | * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public | | * modify it under the terms of the GNU Library General Public | |
| * License as published by the Free Software Foundation; either | | * License as published by the Free Software Foundation; either | |
| * version 2 of the License, or (at your option) any later version. | | * version 2 of the License, or (at your option) any later version. | |
| * | | * | |
| * 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 General Public License | |
| * License along with this library; if not, write to the | | * along with this program; if not, write to the Free Software | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| * Boston, MA 02111-1307, USA. | | 1, USA. | |
| * | | * | |
|
| * $Id: jupiter.hxx,v 1.1.1.1 2002/09/07 02:58:20 curt Exp $ | | * $Id: jupiter.hxx,v 1.4 2006-03-08 18:16:08 mfranz Exp $ | |
| **************************************************************************
/ | | **************************************************************************
/ | |
| #ifndef _JUPITER_HXX_ | | #ifndef _JUPITER_HXX_ | |
| #define _JUPITER_HXX_ | | #define _JUPITER_HXX_ | |
| | | | |
| #include <simgear/ephemeris/celestialBody.hxx> | | #include <simgear/ephemeris/celestialBody.hxx> | |
| #include <simgear/ephemeris/star.hxx> | | #include <simgear/ephemeris/star.hxx> | |
| | | | |
| class Jupiter : public CelestialBody | | class Jupiter : public CelestialBody | |
| { | | { | |
| public: | | public: | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| leastsqs.hxx | | leastsqs.hxx | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: leastsqs.hxx,v 1.2 2004/11/19 21:47:05 curt Exp $ | | // $Id: leastsqs.hxx,v 1.4 2006-03-08 18:16:08 mfranz Exp $ | |
| | | | |
| #ifndef _LEASTSQS_H | | #ifndef _LEASTSQS_H | |
| #define _LEASTSQS_H | | #define _LEASTSQS_H | |
| | | | |
| #ifndef __cplusplus | | #ifndef __cplusplus | |
| # error This library requires C++ | | # error This library requires C++ | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| Classical least squares fit: | | Classical least squares fit: | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| location.hxx | | location.hxx | |
| | | | |
| skipping to change at line 19 | | skipping to change at line 19 | |
| // published by the Free Software Foundation; either version 2 of the | | // published by the Free Software Foundation; either version 2 of the | |
| // License, or (at your option) any later version. | | // License, or (at your option) any later version. | |
| // | | // | |
| // 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA. | |
| // | | // | |
|
| // $Id: location.hxx,v 1.5 2005/09/05 13:23:55 ehofman Exp $ | | // $Id: location.hxx,v 1.6 2006-03-08 18:16:09 mfranz 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> | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| logstream.hxx | | logstream.hxx | |
| | | | |
| skipping to change at line 19 | | skipping to change at line 19 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: logstream.hxx,v 1.5 2005/11/10 09:57:58 ehofman Exp $ | | // $Id: logstream.hxx,v 1.9 2006-03-08 18:16:08 mfranz 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 192 | | skipping to change at line 191 | |
| #ifdef _MSC_VER | | #ifdef _MSC_VER | |
| static bool 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); | | return sbuf->sputc(c); | |
| } | | } | |
| else | | else | |
| return EOF == 0 ? 1: 0; | | return EOF == 0 ? 1: 0; | |
| #else | | #else | |
| return logging_enabled ? sbuf->sputc(c) : (EOF == 0 ? 1: 0); | | return logging_enabled ? sbuf->sputc(c) : (EOF == 0 ? 1: 0); | |
| #endif | | #endif | |
| } | | } | |
| | | | |
| /** | | /** | |
| * logstream manipulator for setting the log level of a message. | | * logstream manipulator for setting the log level of a message. | |
| | | | |
End of changes. 3 change blocks. |
| 6 lines changed or deleted | | 6 lines changed or added | |
|
| lowleveltime.h | | lowleveltime.h | |
| | | | |
| skipping to change at line 16 | | skipping to change at line 16 | |
| * This library is free software; you can redistribute it and/or | | * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public | | * modify it under the terms of the GNU Library General Public | |
| * License as published by the Free Software Foundation; either | | * License as published by the Free Software Foundation; either | |
| * version 2 of the License, or (at your option) any later version. | | * version 2 of the License, or (at your option) any later version. | |
| * | | * | |
| * 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 General Public License | |
| * License along with this library; if not, write to the | | * along with this program; if not, write to the Free Software | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| * Boston, MA 02111-1307, USA. | | 1, USA. | |
| * | | * | |
| **************************************************************************
/ | | **************************************************************************
/ | |
| | | | |
| /******************************************************************** | | /******************************************************************** | |
| * This file redefines some low-level Unix-like time functions for * | | * This file redefines some low-level Unix-like time functions for * | |
| * use with FlightGear. Most notably, localtime() is adapted to use * | | * use with FlightGear. Most notably, localtime() is adapted to use * | |
| * a custom timezone, in order to get the 'local' time for a given * | | * a custom timezone, in order to get the 'local' time for a given * | |
| * aircraft's position, and not only for the current location of the* | | * aircraft's position, and not only for the current location of the* | |
| * computer running the sim. * | | * computer running the sim. * | |
| * * | | * * | |
| | | | |
End of changes. 1 change blocks. |
| 4 lines changed or deleted | | 4 lines changed or added | |
|
| mars.hxx | | mars.hxx | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| * This library is free software; you can redistribute it and/or | | * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public | | * modify it under the terms of the GNU Library General Public | |
| * License as published by the Free Software Foundation; either | | * License as published by the Free Software Foundation; either | |
| * version 2 of the License, or (at your option) any later version. | | * version 2 of the License, or (at your option) any later version. | |
| * | | * | |
| * 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 General Public License | |
| * License along with this library; if not, write to the | | * along with this program; if not, write to the Free Software | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| * Boston, MA 02111-1307, USA. | | 1, USA. | |
| * | | * | |
|
| * $Id: mars.hxx,v 1.1.1.1 2002/09/07 02:58:20 curt Exp $ | | * $Id: mars.hxx,v 1.4 2006-03-08 18:16:08 mfranz Exp $ | |
| **************************************************************************
/ | | **************************************************************************
/ | |
| #ifndef _MARS_HXX_ | | #ifndef _MARS_HXX_ | |
| #define _MARS_HXX_ | | #define _MARS_HXX_ | |
| | | | |
| #include <simgear/ephemeris/celestialBody.hxx> | | #include <simgear/ephemeris/celestialBody.hxx> | |
| #include <simgear/ephemeris/star.hxx> | | #include <simgear/ephemeris/star.hxx> | |
| | | | |
| class Mars : public CelestialBody | | class Mars : public CelestialBody | |
| { | | { | |
| public: | | public: | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| mat.hxx | | mat.hxx | |
| | | | |
| skipping to change at line 21 | | skipping to change at line 21 | |
| // published by the Free Software Foundation; either version 2 of the | | // published by the Free Software Foundation; either version 2 of the | |
| // License, or (at your option) any later version. | | // License, or (at your option) any later version. | |
| // | | // | |
| // 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA. | |
| // | | // | |
|
| // $Id: mat.hxx,v 1.17 2005/10/23 13:47:46 ehofman Exp $ | | // $Id: mat.hxx,v 1.19 2006-03-08 18:16:09 mfranz 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> | |
| | | | |
| #include STL_STRING // Standard C++ string library | | #include STL_STRING // Standard C++ string library | |
| #include <vector> | | #include <vector> | |
| | | | |
| #include <plib/sg.h> | | #include <plib/sg.h> | |
| #include <plib/ssg.h> | | #include <plib/ssg.h> | |
| | | | |
| #include <simgear/props/props.hxx> | | #include <simgear/props/props.hxx> | |
|
| | | #include <simgear/structure/ssgSharedPtr.hxx> | |
| | | #include <simgear/structure/SGSharedPtr.hxx> | |
| | | | |
| #include "matmodel.hxx" | | #include "matmodel.hxx" | |
| | | | |
| SG_USING_STD(string); | | SG_USING_STD(string); | |
| SG_USING_STD(vector); | | SG_USING_STD(vector); | |
| | | | |
| /** | | /** | |
| * A material in the scene graph. | | * A material in the scene graph. | |
| * | | * | |
| * A material represents information about a single surface type | | * A material represents information about a single surface type | |
| * in the 3D scene graph, including texture, colour, lighting, | | * in the 3D scene graph, including texture, colour, lighting, | |
| * tiling, and so on; most of the materials in FlightGear are | | * tiling, and so on; most of the materials in FlightGear are | |
| * defined in the $FG_ROOT/materials.xml file, and can be changed | | * defined in the $FG_ROOT/materials.xml file, and can be changed | |
| * at runtime. | | * at runtime. | |
| */ | | */ | |
|
| class SGMaterial { | | class SGMaterial : public SGReferenced { | |
| | | | |
| public: | | public: | |
| | | | |
| //////////////////////////////////////////////////////////////////// | | //////////////////////////////////////////////////////////////////// | |
| // Public Constructors. | | // Public Constructors. | |
| //////////////////////////////////////////////////////////////////// | | //////////////////////////////////////////////////////////////////// | |
| | | | |
| /** | | /** | |
| * Construct a material from a set of properties. | | * Construct a material from a set of properties. | |
| * | | * | |
| | | | |
| skipping to change at line 149 | | skipping to change at line 151 | |
| */ | | */ | |
| virtual int get_object_group_count () const { return object_groups.size()
; } | | virtual int get_object_group_count () const { return object_groups.size()
; } | |
| | | | |
| /** | | /** | |
| * Get a randomly-placed object for this material. | | * Get a randomly-placed object for this material. | |
| */ | | */ | |
| virtual SGMatModelGroup * get_object_group (int index) const { | | virtual SGMatModelGroup * get_object_group (int index) const { | |
| return object_groups[index]; | | return object_groups[index]; | |
| } | | } | |
| | | | |
|
| /** | | | |
| * Increment the reference count for this material. | | | |
| * | | | |
| * A material with 0 references may be deleted by the | | | |
| * material library. | | | |
| */ | | | |
| virtual inline void ref () { refcount++; } | | | |
| | | | |
| /** | | | |
| * Decrement the reference count for this material. | | | |
| */ | | | |
| virtual inline void deRef () { refcount--; } | | | |
| | | | |
| /** | | | |
| * Get the reference count for this material. | | | |
| * | | | |
| * @return The number of references (0 if none). | | | |
| */ | | | |
| virtual inline int getRef () const { return refcount; } | | | |
| | | | |
| protected: | | protected: | |
| | | | |
| //////////////////////////////////////////////////////////////////// | | //////////////////////////////////////////////////////////////////// | |
| // Protected methods. | | // Protected methods. | |
| //////////////////////////////////////////////////////////////////// | | //////////////////////////////////////////////////////////////////// | |
| | | | |
| /** | | /** | |
| * Initialization method, invoked by all public constructors. | | * Initialization method, invoked by all public constructors. | |
| */ | | */ | |
| virtual void init(); | | virtual void init(); | |
| | | | |
| protected: | | protected: | |
| | | | |
| struct _internal_state { | | struct _internal_state { | |
| _internal_state( ssgSimpleState *s, const string &t, bool l ) | | _internal_state( ssgSimpleState *s, const string &t, bool l ) | |
| : state(s), texture_path(t), texture_loaded(l) {} | | : state(s), texture_path(t), texture_loaded(l) {} | |
|
| ssgSimpleState *state; | | ssgSharedPtr<ssgSimpleState> state; | |
| string texture_path; | | string texture_path; | |
| bool texture_loaded; | | bool texture_loaded; | |
| }; | | }; | |
| | | | |
| private: | | private: | |
| | | | |
| //////////////////////////////////////////////////////////////////// | | //////////////////////////////////////////////////////////////////// | |
| // Internal state. | | // Internal state. | |
| //////////////////////////////////////////////////////////////////// | | //////////////////////////////////////////////////////////////////// | |
| | | | |
| | | | |
| skipping to change at line 218 | | skipping to change at line 200 | |
| // use mipmapping? | | // use mipmapping? | |
| int mipmap; | | int mipmap; | |
| | | | |
| // coverage of night lighting. | | // coverage of night lighting. | |
| double light_coverage; | | double light_coverage; | |
| | | | |
| // material properties | | // material properties | |
| sgVec4 ambient, diffuse, specular, emission; | | sgVec4 ambient, diffuse, specular, emission; | |
| double shininess; | | double shininess; | |
| | | | |
|
| vector<SGMatModelGroup *> object_groups; | | vector<SGSharedPtr<SGMatModelGroup> > object_groups; | |
| | | | |
| // ref count so we can properly delete if we have multiple | | | |
| // pointers to this record | | | |
| 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,
const char *season ); | | 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 ); | |
| | | | |
| | | | |
End of changes. 7 change blocks. |
| 29 lines changed or deleted | | 7 lines changed or added | |
|
| matlib.hxx | | matlib.hxx | |
| | | | |
| skipping to change at line 19 | | skipping to change at line 19 | |
| // published by the Free Software Foundation; either version 2 of the | | // published by the Free Software Foundation; either version 2 of the | |
| // License, or (at your option) any later version. | | // License, or (at your option) any later version. | |
| // | | // | |
| // 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA. | |
| // | | // | |
|
| // $Id: matlib.hxx,v 1.7 2005/10/23 13:47:46 ehofman Exp $ | | // $Id: matlib.hxx,v 1.9 2006-03-08 18:16:09 mfranz 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> | |
| | | | |
|
| | | #include <simgear/structure/SGSharedPtr.hxx> | |
| | | | |
| #include STL_STRING // Standard C++ string library | | #include STL_STRING // Standard C++ string library | |
| #include <map> // STL associative "array" | | #include <map> // STL associative "array" | |
| #include <vector> // STL "array" | | #include <vector> // STL "array" | |
| | | | |
| #include <plib/ssg.h> // plib include | | #include <plib/ssg.h> // plib include | |
| | | | |
| class SGMaterial; | | class SGMaterial; | |
| | | | |
| SG_USING_STD(string); | | SG_USING_STD(string); | |
| SG_USING_STD(map); | | SG_USING_STD(map); | |
| SG_USING_STD(vector); | | SG_USING_STD(vector); | |
| SG_USING_STD(less); | | SG_USING_STD(less); | |
| | | | |
| // Material management class | | // Material management class | |
| class SGMaterialLib { | | class SGMaterialLib { | |
| | | | |
| private: | | private: | |
| | | | |
| // associative array of materials | | // associative array of materials | |
|
| typedef map < string, SGMaterial *, less<string> > material_map; | | typedef map < string, SGSharedPtr<SGMaterial>, less<string> > material_
map; | |
| typedef material_map::iterator material_map_iterator; | | typedef material_map::iterator material_map_iterator; | |
| 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 ); | |
| | | | |
| | | | |
End of changes. 4 change blocks. |
| 3 lines changed or deleted | | 5 lines changed or added | |
|
| matmodel.hxx | | matmodel.hxx | |
| | | | |
| skipping to change at line 19 | | skipping to change at line 19 | |
| // published by the Free Software Foundation; either version 2 of the | | // published by the Free Software Foundation; either version 2 of the | |
| // License, or (at your option) any later version. | | // License, or (at your option) any later version. | |
| // | | // | |
| // 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA. | |
| // | | // | |
|
| // $Id: matmodel.hxx,v 1.4 2004/11/19 21:44:17 curt Exp $ | | // $Id: matmodel.hxx,v 1.6 2006-03-08 18:16:09 mfranz Exp $ | |
| | | | |
| #ifndef _SG_MAT_MODEL_HXX | | #ifndef _SG_MAT_MODEL_HXX | |
| #define _SG_MAT_MODEL_HXX | | #define _SG_MAT_MODEL_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 STL_STRING // Standard C++ string library | | #include STL_STRING // Standard C++ string library | |
| | | | |
| #include <plib/sg.h> | | #include <plib/sg.h> | |
| #include <plib/ssg.h> | | #include <plib/ssg.h> | |
| | | | |
|
| | | #include <simgear/structure/SGReferenced.hxx> | |
| | | #include <simgear/structure/SGSharedPtr.hxx> | |
| | | #include <simgear/structure/ssgSharedPtr.hxx> | |
| #include <simgear/props/props.hxx> | | #include <simgear/props/props.hxx> | |
| | | | |
| SG_USING_STD(string); | | SG_USING_STD(string); | |
| | | | |
| class SGMatModelGroup; | | class SGMatModelGroup; | |
| class SGModelLib; | | class SGModelLib; | |
| | | | |
| /** | | /** | |
| * A randomly-placeable object. | | * A randomly-placeable object. | |
| * | | * | |
| * SGMaterial uses this class to keep track of the model(s) and | | * SGMaterial uses this class to keep track of the model(s) and | |
| * parameters for a single instance of a randomly-placeable object. | | * parameters for a single instance of a randomly-placeable object. | |
| * The object can have more than one variant model (i.e. slightly | | * The object can have more than one variant model (i.e. slightly | |
| * different shapes of trees), but they are considered equivalent | | * different shapes of trees), but they are considered equivalent | |
| * and interchangeable. | | * and interchangeable. | |
| */ | | */ | |
|
| class SGMatModel { | | class SGMatModel : public SGReferenced { | |
| | | | |
| public: | | public: | |
| | | | |
| /** | | /** | |
| * The heading type for a randomly-placed object. | | * The heading type for a randomly-placed object. | |
| */ | | */ | |
| enum HeadingType { | | enum HeadingType { | |
| HEADING_FIXED, | | HEADING_FIXED, | |
| HEADING_BILLBOARD, | | HEADING_BILLBOARD, | |
| HEADING_RANDOM | | HEADING_RANDOM | |
| | | | |
| skipping to change at line 112 | | skipping to change at line 115 | |
| */ | | */ | |
| double get_coverage_m2 () const; | | double get_coverage_m2 () const; | |
| | | | |
| /** | | /** | |
| * Get the heading type for the object. | | * Get the heading type for the object. | |
| * | | * | |
| * @return The heading type. | | * @return The heading type. | |
| */ | | */ | |
| HeadingType get_heading_type () const; | | HeadingType get_heading_type () const; | |
| | | | |
|
| | | virtual ~SGMatModel (); | |
| | | | |
| protected: | | protected: | |
| | | | |
| friend class SGMatModelGroup; | | friend class SGMatModelGroup; | |
| | | | |
| SGMatModel (const SGPropertyNode * node, double range_m); | | SGMatModel (const SGPropertyNode * node, double range_m); | |
| | | | |
|
| virtual ~SGMatModel (); | | | |
| | | | |
| private: | | private: | |
| | | | |
| /** | | /** | |
| * Actually load the models. | | * Actually load the models. | |
| * | | * | |
| * This class uses lazy loading so that models won't be held | | * This class uses lazy loading so that models won't be held | |
| * in memory for materials that are never referenced. | | * in memory for materials that are never referenced. | |
| */ | | */ | |
| void load_models( SGModelLib *modellib, | | void load_models( SGModelLib *modellib, | |
| const string &fg_root, | | const string &fg_root, | |
| SGPropertyNode *prop_root, | | SGPropertyNode *prop_root, | |
| double sim_time_sec ); | | double sim_time_sec ); | |
| | | | |
| vector<string> _paths; | | vector<string> _paths; | |
|
| mutable vector<ssgEntity *> _models; | | mutable vector<ssgSharedPtr<ssgEntity> > _models; | |
| mutable bool _models_loaded; | | mutable bool _models_loaded; | |
| double _coverage_m2; | | double _coverage_m2; | |
| double _range_m; | | double _range_m; | |
| HeadingType _heading_type; | | HeadingType _heading_type; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * A collection of related objects with the same visual range. | | * A collection of related objects with the same visual range. | |
| * | | * | |
| * Grouping objects with the same range together significantly | | * Grouping objects with the same range together significantly | |
| * reduces the memory requirements of randomly-placed objects. | | * reduces the memory requirements of randomly-placed objects. | |
| * Each SGMaterial instance keeps a (possibly-empty) list of | | * Each SGMaterial instance keeps a (possibly-empty) list of | |
| * object groups for placing randomly on the scenery. | | * object groups for placing randomly on the scenery. | |
| */ | | */ | |
|
| class SGMatModelGroup { | | class SGMatModelGroup : public SGReferenced { | |
| | | | |
| public: | | public: | |
| | | | |
| virtual ~SGMatModelGroup (); | | virtual ~SGMatModelGroup (); | |
| | | | |
| /** | | /** | |
| * Get the visual range of the object in meters. | | * Get the visual range of the object in meters. | |
| * | | * | |
| * @return The visual range. | | * @return The visual range. | |
| */ | | */ | |
| | | | |
| skipping to change at line 186 | | skipping to change at line 189 | |
| | | | |
| protected: | | protected: | |
| | | | |
| friend class SGMaterial; | | friend class SGMaterial; | |
| | | | |
| SGMatModelGroup (SGPropertyNode * node); | | SGMatModelGroup (SGPropertyNode * node); | |
| | | | |
| private: | | private: | |
| | | | |
| double _range_m; | | double _range_m; | |
|
| vector<SGMatModel *> _objects; | | vector<SGSharedPtr<SGMatModel> > _objects; | |
| | | | |
| }; | | }; | |
| | | | |
| #endif // _SG_MAT_MODEL_HXX | | #endif // _SG_MAT_MODEL_HXX | |
| | | | |
End of changes. 9 change blocks. |
| 8 lines changed or deleted | | 11 lines changed or added | |
|
| mercury.hxx | | mercury.hxx | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| * This library is free software; you can redistribute it and/or | | * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public | | * modify it under the terms of the GNU Library General Public | |
| * License as published by the Free Software Foundation; either | | * License as published by the Free Software Foundation; either | |
| * version 2 of the License, or (at your option) any later version. | | * version 2 of the License, or (at your option) any later version. | |
| * | | * | |
| * 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 General Public License | |
| * License along with this library; if not, write to the | | * along with this program; if not, write to the Free Software | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| * Boston, MA 02111-1307, USA. | | 1, USA. | |
| * | | * | |
|
| * $Id: mercury.hxx,v 1.1.1.1 2002/09/07 02:58:20 curt Exp $ | | * $Id: mercury.hxx,v 1.4 2006-03-08 18:16:08 mfranz Exp $ | |
| **************************************************************************
/ | | **************************************************************************
/ | |
| #ifndef _MERCURY_HXX_ | | #ifndef _MERCURY_HXX_ | |
| #define _MERCURY_HXX_ | | #define _MERCURY_HXX_ | |
| | | | |
| #include <simgear/ephemeris/celestialBody.hxx> | | #include <simgear/ephemeris/celestialBody.hxx> | |
| #include <simgear/ephemeris/star.hxx> | | #include <simgear/ephemeris/star.hxx> | |
| | | | |
| class Mercury : public CelestialBody | | class Mercury : public CelestialBody | |
| { | | { | |
| public: | | public: | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| model.hxx | | model.hxx | |
| | | | |
| skipping to change at line 34 | | skipping to change at line 34 | |
| | | | |
| // 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 | |
| | | | |
| /** | | /** | |
|
| | | * Abstract class for adding data to the scene graph. modelLoaded() is | |
| | | * called by sgLoad3DModel() after the model was loaded, and the destructor | |
| | | * when the branch is removed from the graph. | |
| | | */ | |
| | | class SGModelData : public ssgBase { | |
| | | public: | |
| | | virtual ~SGModelData() {} | |
| | | virtual void modelLoaded( const string& path, SGPropertyNode *prop, | |
| | | ssgBranch *branch) {} | |
| | | }; | |
| | | | |
| | | /** | |
| * Load a 3D model with or without XML wrapper. Note, this version | | * Load a 3D model with or without XML wrapper. Note, this version | |
| * Does not know about or load the panel/cockpit information. Use the | | * Does not know about or load the panel/cockpit information. Use the | |
| * "model_panel.hxx" version if you want to load an aircraft | | * "model_panel.hxx" version if you want to load an aircraft | |
| * (i.e. ownship) with a panel. | | * (i.e. ownship) with a panel. | |
| * | | * | |
| * If the path ends in ".xml", then it will be used as a property- | | * If the path ends in ".xml", then it will be used as a property- | |
| * list wrapper to add animations to the model. | | * list wrapper to add animations to the model. | |
| * | | * | |
| * Subsystems should not normally invoke this function directly; | | * Subsystems should not normally invoke this function directly; | |
| * instead, they should use the FGModelLoader declared in loader.hxx. | | * instead, they should use the FGModelLoader declared in loader.hxx. | |
| */ | | */ | |
| ssgBranch * | | ssgBranch * | |
| sgLoad3DModel( const string& fg_root, const string &path, | | sgLoad3DModel( const string& fg_root, const string &path, | |
| SGPropertyNode *prop_root, double sim_time_sec, | | SGPropertyNode *prop_root, double sim_time_sec, | |
|
| ssgEntity *(*load_panel)(SGPropertyNode *) = 0 ); | | ssgEntity *(*load_panel)(SGPropertyNode *) = 0, | |
| | | SGModelData *data = 0 ); | |
| | | | |
| /** | | /** | |
| * Make an offset matrix from rotations and position offset. | | * Make an offset matrix from rotations and position offset. | |
| */ | | */ | |
| void | | void | |
| sgMakeOffsetsMatrix( sgMat4 * result, double h_rot, double p_rot, double r_
rot, | | sgMakeOffsetsMatrix( sgMat4 * result, double h_rot, double p_rot, double r_
rot, | |
| double x_off, double y_off, double z_off ); | | double x_off, double y_off, double z_off ); | |
| | | | |
| /** | | /** | |
| * Make the animation | | * Make the animation | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 14 lines changed or added | |
|
| moon.hxx | | moon.hxx | |
| | | | |
| skipping to change at line 21 | | skipping to change at line 21 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: moon.hxx,v 1.2 2004/01/09 10:19:00 ehofman Exp $ | | // $Id: moon.hxx,v 1.3 2006-03-08 18:16:09 mfranz Exp $ | |
| | | | |
| #ifndef _SG_MOON_HXX_ | | #ifndef _SG_MOON_HXX_ | |
| #define _SG_MOON_HXX_ | | #define _SG_MOON_HXX_ | |
| | | | |
| #include <plib/ssg.h> | | #include <plib/ssg.h> | |
| | | | |
| #include <simgear/misc/sg_path.hxx> | | #include <simgear/misc/sg_path.hxx> | |
| | | | |
| class SGMoon { | | class SGMoon { | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| moonpos.hxx | | moonpos.hxx | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| * This library is free software; you can redistribute it and/or | | * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public | | * modify it under the terms of the GNU Library General Public | |
| * License as published by the Free Software Foundation; either | | * License as published by the Free Software Foundation; either | |
| * version 2 of the License, or (at your option) any later version. | | * version 2 of the License, or (at your option) any later version. | |
| * | | * | |
| * 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 General Public License | |
| * License along with this library; if not, write to the | | * along with this program; if not, write to the Free Software | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| * Boston, MA 02111-1307, USA. | | 1, USA. | |
| * | | * | |
|
| * $Id: moonpos.hxx,v 1.1.1.1 2002/09/07 02:58:20 curt Exp $ | | * $Id: moonpos.hxx,v 1.4 2006-03-08 18:16:08 mfranz Exp $ | |
| **************************************************************************
/ | | **************************************************************************
/ | |
| #ifndef _MOONPOS_HXX_ | | #ifndef _MOONPOS_HXX_ | |
| #define _MOONPOS_HXX_ | | #define _MOONPOS_HXX_ | |
| | | | |
| #include <simgear/constants.h> | | #include <simgear/constants.h> | |
| | | | |
| #include <simgear/ephemeris/celestialBody.hxx> | | #include <simgear/ephemeris/celestialBody.hxx> | |
| #include <simgear/ephemeris/star.hxx> | | #include <simgear/ephemeris/star.hxx> | |
| | | | |
| class MoonPos : public CelestialBody | | class MoonPos : public CelestialBody | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| neptune.hxx | | neptune.hxx | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| * This library is free software; you can redistribute it and/or | | * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public | | * modify it under the terms of the GNU Library General Public | |
| * License as published by the Free Software Foundation; either | | * License as published by the Free Software Foundation; either | |
| * version 2 of the License, or (at your option) any later version. | | * version 2 of the License, or (at your option) any later version. | |
| * | | * | |
| * 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 General Public License | |
| * License along with this library; if not, write to the | | * along with this program; if not, write to the Free Software | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| * Boston, MA 02111-1307, USA. | | 1, USA. | |
| * | | * | |
|
| * $Id: neptune.hxx,v 1.1.1.1 2002/09/07 02:58:20 curt Exp $ | | * $Id: neptune.hxx,v 1.4 2006-03-08 18:16:08 mfranz Exp $ | |
| **************************************************************************
/ | | **************************************************************************
/ | |
| #ifndef _NEPTUNE_HXX_ | | #ifndef _NEPTUNE_HXX_ | |
| #define _NEPTUNE_HXX_ | | #define _NEPTUNE_HXX_ | |
| | | | |
| #include <simgear/ephemeris/celestialBody.hxx> | | #include <simgear/ephemeris/celestialBody.hxx> | |
| #include <simgear/ephemeris/star.hxx> | | #include <simgear/ephemeris/star.hxx> | |
| | | | |
| class Neptune : public CelestialBody | | class Neptune : public CelestialBody | |
| { | | { | |
| public: | | public: | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| newbucket.hxx | | newbucket.hxx | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| * This library is free software; you can redistribute it and/or | | * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public | | * modify it under the terms of the GNU Library General Public | |
| * License as published by the Free Software Foundation; either | | * License as published by the Free Software Foundation; either | |
| * version 2 of the License, or (at your option) any later version. | | * version 2 of the License, or (at your option) any later version. | |
| * | | * | |
| * 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 General Public License | |
| * License along with this library; if not, write to the | | * along with this program; if not, write to the Free Software | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| * Boston, MA 02111-1307, USA. | | 1, USA. | |
| * | | * | |
|
| * $Id: newbucket.hxx,v 1.5 2004/11/19 21:44:16 curt Exp $ | | * $Id: newbucket.hxx,v 1.9 2006-03-08 18:16:08 mfranz Exp $ | |
| **************************************************************************
/ | | **************************************************************************
/ | |
| | | | |
| /** \file newbucket.hxx | | /** \file newbucket.hxx | |
| * A class and associated utiltity functions to manage world scenery tiling
. | | * A class and associated utiltity functions to manage world scenery tiling
. | |
| */ | | */ | |
| | | | |
| #ifndef _NEWBUCKET_HXX | | #ifndef _NEWBUCKET_HXX | |
| #define _NEWBUCKET_HXX | | #define _NEWBUCKET_HXX | |
| | | | |
| #include <simgear/compiler.h> | | #include <simgear/compiler.h> | |
| | | | |
| skipping to change at line 115 | | skipping to change at line 114 | |
| * A class to manage world scenery tiling. | | * A class to manage world scenery tiling. | |
| * This class encapsulates the world tiling scheme. It provides ways | | * This class encapsulates the world tiling scheme. It provides ways | |
| * to calculate a unique tile index from a lat/lon, and it can provide | | * to calculate a unique tile index from a lat/lon, and it can provide | |
| * information such as the dimensions of a given tile. | | * information such as the dimensions of a given tile. | |
| */ | | */ | |
| | | | |
| class SGBucket { | | class SGBucket { | |
| | | | |
| private: | | private: | |
| double cx, cy; // centerpoint (lon, lat) in degrees of bucket | | double cx, cy; // centerpoint (lon, lat) in degrees of bucket | |
|
| int lon; // longitude index (-180 to 179) | | short lon; // longitude index (-180 to 179) | |
| int lat; // latitude index (-90 to 89) | | short lat; // latitude index (-90 to 89) | |
| int x; // x subdivision (0 to 7) | | char x; // x subdivision (0 to 7) | |
| int y; // y subdivision (0 to 7) | | char y; // y subdivision (0 to 7) | |
| | | | |
| public: | | public: | |
| | | | |
| /** | | /** | |
| * Default constructor. | | * Default constructor. | |
| */ | | */ | |
| SGBucket(); | | SGBucket(); | |
| | | | |
| /** | | /** | |
| * Construct a bucket given a specific location. | | * Construct a bucket given a specific location. | |
| | | | |
End of changes. 3 change blocks. |
| 9 lines changed or deleted | | 9 lines changed or added | |
|
| oursun.hxx | | oursun.hxx | |
| | | | |
| skipping to change at line 21 | | skipping to change at line 21 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: oursun.hxx,v 1.5 2004/04/01 13:47:02 curt Exp $ | | // $Id: oursun.hxx,v 1.7 2006-03-08 18:16:09 mfranz Exp $ | |
| | | | |
| #ifndef _SG_SUN_HXX_ | | #ifndef _SG_SUN_HXX_ | |
| #define _SG_SUN_HXX_ | | #define _SG_SUN_HXX_ | |
| | | | |
| #include <plib/ssg.h> | | #include <plib/ssg.h> | |
| | | | |
| #include <simgear/misc/sg_path.hxx> | | #include <simgear/misc/sg_path.hxx> | |
| | | | |
| class SGSun { | | class SGSun { | |
| | | | |
| | | | |
| skipping to change at line 80 | | skipping to change at line 79 | |
| // reposition the sun at the specified right ascension and | | // reposition the sun at the specified right ascension and | |
| // declination, offset by our current position (p) so that it | | // declination, offset by our current position (p) so that it | |
| // appears fixed at a great distance from the viewer. Also add in | | // appears fixed at a great distance from the viewer. Also add in | |
| // an optional rotation (i.e. for the current time of day.) | | // an optional rotation (i.e. for the current time of day.) | |
| bool reposition( sgVec3 p, double angle, | | bool reposition( sgVec3 p, double angle, | |
| double rightAscension, double declination, | | double rightAscension, double declination, | |
| double sun_dist ); | | double sun_dist ); | |
| | | | |
| // retrun the current color of the sun | | // retrun the current color of the sun | |
| inline float *get_color() { return cl->get( 0 ); } | | inline float *get_color() { return cl->get( 0 ); } | |
|
| | | | |
| | | // return the texture id of the sun halo texture | |
| | | inline GLuint get_texture_id() { return halo_state->getTextureHandle(); | |
| | | } | |
| }; | | }; | |
| | | | |
| #endif // _SG_SUN_HXX_ | | #endif // _SG_SUN_HXX_ | |
| | | | |
End of changes. 3 change blocks. |
| 5 lines changed or deleted | | 9 lines changed or added | |
|
| point3d.hxx | | point3d.hxx | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: point3d.hxx,v 1.4 2005/10/25 13:48:58 ehofman Exp $ | | // $Id: point3d.hxx,v 1.6 2006-03-08 18:16:08 mfranz 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 53 | | skipping to change at line 52 | |
| #ifdef SG_HAVE_STD_INCLUDES | | #ifdef SG_HAVE_STD_INCLUDES | |
| # include <iostream> | | # include <iostream> | |
| # include <cassert> | | # include <cassert> | |
| # include <cmath> | | # include <cmath> | |
| #else | | #else | |
| # include <iostream.h> | | # include <iostream.h> | |
| # include <assert.h> | | # include <assert.h> | |
| # include <math.h> | | # include <math.h> | |
| #endif | | #endif | |
| | | | |
|
| #include <simgear/math/localconsts.hxx> | | #include "SGMath.hxx" | |
| | | | |
| // I don't understand ... <math.h> or <cmath> should be included | | // I don't understand ... <math.h> or <cmath> should be included | |
| // already depending on how you defined SG_HAVE_STD_INCLUDES, but I | | // already depending on how you defined SG_HAVE_STD_INCLUDES, but I | |
| // can go ahead and add this -- CLO | | // can go ahead and add this -- CLO | |
| #ifdef __MWERKS__ | | #ifdef __MWERKS__ | |
| SG_USING_NAMESPACE(std); | | SG_USING_NAMESPACE(std); | |
| #endif | | #endif | |
| | | | |
| SG_USING_STD(ostream); | | SG_USING_STD(ostream); | |
| SG_USING_STD(istream); | | SG_USING_STD(istream); | |
| | | | |
| skipping to change at line 94 | | skipping to change at line 93 | |
| double n[3]; | | double n[3]; | |
| | | | |
| public: | | public: | |
| | | | |
| /** Default constructor */ | | /** Default constructor */ | |
| Point3D(); | | Point3D(); | |
| Point3D(const double x, const double y, const double z); | | Point3D(const double x, const double y, const double z); | |
| explicit Point3D(const double d); | | explicit Point3D(const double d); | |
| Point3D(const Point3D &p); | | Point3D(const Point3D &p); | |
| | | | |
|
| | | static Point3D fromSGGeod(const SGGeod& geod); | |
| | | static Point3D fromSGGeoc(const SGGeoc& geoc); | |
| | | static Point3D fromSGVec3(const SGVec3<double>& cart); | |
| | | | |
| // Assignment operators | | // Assignment operators | |
| | | | |
| Point3D& operator = ( const Point3D& p ); // assignment of a Point3D | | Point3D& operator = ( const Point3D& p ); // assignment of a Point3D | |
| Point3D& operator += ( const Point3D& p ); // incrementation by a Poin
t3D | | Point3D& operator += ( const Point3D& p ); // incrementation by a Poin
t3D | |
| Point3D& operator -= ( const Point3D& p ); // decrementation by a Poin
t3D | | Point3D& operator -= ( const Point3D& p ); // decrementation by a Poin
t3D | |
| Point3D& operator *= ( const double d ); // multiplication by a con
stant | | Point3D& operator *= ( const double d ); // multiplication by a con
stant | |
| Point3D& operator /= ( const double d ); // division by a constant | | Point3D& operator /= ( const double d ); // division by a constant | |
| | | | |
| void setx(const double x); | | void setx(const double x); | |
| void sety(const double y); | | void sety(const double y); | |
| | | | |
| skipping to change at line 125 | | skipping to change at line 128 | |
| inline const double *get_n() const { return n; }; | | inline const double *get_n() const { return n; }; | |
| double x() const; // cartesian x | | double x() const; // cartesian x | |
| double y() const; // cartesian y | | double y() const; // cartesian y | |
| double z() const; // cartesian z | | double z() const; // cartesian z | |
| | | | |
| double lon() const; // polar longitude | | double lon() const; // polar longitude | |
| double lat() const; // polar latitude | | double lat() const; // polar latitude | |
| double radius() const; // polar radius | | double radius() const; // polar radius | |
| double elev() const; // geodetic elevation (if specifying a surface p
oint) | | double elev() const; // geodetic elevation (if specifying a surface p
oint) | |
| | | | |
|
| | | SGGeod toSGGeod(void) const; | |
| | | SGGeoc toSGGeoc(void) const; | |
| | | | |
| // friends | | // friends | |
| friend Point3D operator - (const Point3D& p); // -p1 | | friend Point3D operator - (const Point3D& p); // -p1 | |
| friend bool operator == (const Point3D& a, const Point3D& b); // p1 ==
p2? | | friend bool operator == (const Point3D& a, const Point3D& b); // p1 ==
p2? | |
| friend istream& operator>> ( istream&, Point3D& ); | | friend istream& operator>> ( istream&, Point3D& ); | |
| friend ostream& operator<< ( ostream&, const Point3D& ); | | friend ostream& operator<< ( ostream&, const Point3D& ); | |
| | | | |
| // Special functions | | // Special functions | |
| double distance3D(const Point3D& a) const; // distance between | | double distance3D(const Point3D& a) const; // distance between | |
| double distance3Dsquared(const Point3D& a) const; // distance between ^
2 | | double distance3Dsquared(const Point3D& a) const; // distance between ^
2 | |
| }; | | }; | |
| | | | |
| skipping to change at line 204 | | skipping to change at line 210 | |
| 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; | |
| } | | } | |
| | | | |
| inline Point3D::Point3D(const Point3D& p) | | inline Point3D::Point3D(const Point3D& p) | |
| { | | { | |
| n[PX] = p.n[PX]; n[PY] = p.n[PY]; n[PZ] = p.n[PZ]; | | n[PX] = p.n[PX]; n[PY] = p.n[PY]; n[PZ] = p.n[PZ]; | |
| } | | } | |
| | | | |
|
| | | inline Point3D Point3D::fromSGGeod(const SGGeod& geod) | |
| | | { | |
| | | Point3D pt; | |
| | | pt.setlon(geod.getLongitudeRad()); | |
| | | pt.setlat(geod.getLatitudeRad()); | |
| | | pt.setelev(geod.getElevationM()); | |
| | | return pt; | |
| | | } | |
| | | | |
| | | inline Point3D Point3D::fromSGGeoc(const SGGeoc& geoc) | |
| | | { | |
| | | Point3D pt; | |
| | | pt.setlon(geoc.getLongitudeRad()); | |
| | | pt.setlat(geoc.getLatitudeRad()); | |
| | | pt.setradius(geoc.getRadiusM()); | |
| | | return pt; | |
| | | } | |
| | | | |
| | | inline Point3D Point3D::fromSGVec3(const SGVec3<double>& cart) | |
| | | { | |
| | | Point3D pt; | |
| | | pt.setx(cart.x()); | |
| | | pt.sety(cart.y()); | |
| | | pt.setz(cart.z()); | |
| | | return pt; | |
| | | } | |
| | | | |
| // ASSIGNMENT OPERATORS | | // ASSIGNMENT OPERATORS | |
| | | | |
| inline Point3D& Point3D::operator = (const Point3D& p) | | inline Point3D& Point3D::operator = (const Point3D& p) | |
| { | | { | |
| n[PX] = p.n[PX]; n[PY] = p.n[PY]; n[PZ] = p.n[PZ]; return *this; | | n[PX] = p.n[PX]; n[PY] = p.n[PY]; n[PZ] = p.n[PZ]; return *this; | |
| } | | } | |
| | | | |
| inline Point3D& Point3D::operator += ( const Point3D& p ) | | inline Point3D& Point3D::operator += ( const Point3D& p ) | |
| { | | { | |
| n[PX] += p.n[PX]; n[PY] += p.n[PY]; n[PZ] += p.n[PZ]; return *this; | | n[PX] += p.n[PX]; n[PY] += p.n[PY]; n[PZ] += p.n[PZ]; return *this; | |
| | | | |
| skipping to change at line 287 | | skipping to change at line 320 | |
| inline double Point3D::z() const { return n[PZ]; } | | inline double Point3D::z() const { return n[PZ]; } | |
| | | | |
| inline double Point3D::lon() const { return n[PX]; } | | inline double Point3D::lon() const { return n[PX]; } | |
| | | | |
| inline double Point3D::lat() const { return n[PY]; } | | inline double Point3D::lat() const { return n[PY]; } | |
| | | | |
| inline double Point3D::radius() const { return n[PZ]; } | | inline double Point3D::radius() const { return n[PZ]; } | |
| | | | |
| inline double Point3D::elev() const { return n[PZ]; } | | inline double Point3D::elev() const { return n[PZ]; } | |
| | | | |
|
| | | inline SGGeod Point3D::toSGGeod(void) const | |
| | | { | |
| | | SGGeod geod; | |
| | | geod.setLongitudeRad(lon()); | |
| | | geod.setLatitudeRad(lat()); | |
| | | geod.setElevationM(elev()); | |
| | | return geod; | |
| | | } | |
| | | | |
| | | inline SGGeoc Point3D::toSGGeoc(void) const | |
| | | { | |
| | | SGGeoc geoc; | |
| | | geoc.setLongitudeRad(lon()); | |
| | | geoc.setLatitudeRad(lat()); | |
| | | geoc.setRadiusM(radius()); | |
| | | return geoc; | |
| | | } | |
| | | | |
| // FRIENDS | | // FRIENDS | |
| | | | |
| inline Point3D operator - (const Point3D& a) | | inline Point3D operator - (const Point3D& a) | |
| { | | { | |
| return Point3D(-a.n[PX],-a.n[PY],-a.n[PZ]); | | return Point3D(-a.n[PX],-a.n[PY],-a.n[PZ]); | |
| } | | } | |
| | | | |
| inline Point3D operator + (const Point3D& a, const Point3D& b) | | inline Point3D operator + (const Point3D& a, const Point3D& b) | |
| { | | { | |
| return Point3D(a) += b; | | return Point3D(a) += b; | |
| | | | |
End of changes. 7 change blocks. |
| 6 lines changed or deleted | | 58 lines changed or added | |
|
| polar3d.hxx | | polar3d.hxx | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: polar3d.hxx,v 1.3 2005/10/25 13:48:58 ehofman Exp $ | | // $Id: polar3d.hxx,v 1.5 2006-03-08 18:16:08 mfranz 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 <simgear/constants.h> | | #include <simgear/constants.h> | |
| #include <simgear/math/point3d.hxx> | | #include <simgear/math/point3d.hxx> | |
| | | | |
|
| | | #include "SGMath.hxx" | |
| | | | |
| /** | | /** | |
| * Find the Altitude above the Ellipsoid (WGS84) given the Earth | | * Find the Altitude above the Ellipsoid (WGS84) given the Earth | |
| * Centered Cartesian coordinate vector Distances are specified in | | * Centered Cartesian coordinate vector Distances are specified in | |
| * meters. | | * meters. | |
| * @param cp point specified in cartesian coordinates | | * @param cp point specified in cartesian coordinates | |
| * @return altitude above the (wgs84) earth in meters | | * @return altitude above the (wgs84) earth in meters | |
| */ | | */ | |
|
| double sgGeodAltFromCart(const Point3D& cp); | | inline double sgGeodAltFromCart(const Point3D& p) | |
| | | { | |
| | | SGGeod geod; | |
| | | SGGeodesy::SGCartToGeod(SGVec3<double>(p.x(), p.y(), p.z()), geod); | |
| | | return geod.getElevationM(); | |
| | | } | |
| | | | |
| /** | | /** | |
| * 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 | |
| */ | | */ | |
|
| Point3D sgPolarToCart3d(const Point3D& p); | | inline Point3D sgPolarToCart3d(const Point3D& p) | |
| | | { | |
| | | SGVec3<double> cart; | |
| | | SGGeodesy::SGGeocToCart(SGGeoc::fromRadM(p.lon(), p.lat(), p.radius()), c | |
| | | art); | |
| | | return Point3D::fromSGVec3(cart); | |
| | | } | |
| | | | |
| /** | | /** | |
| * 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 | |
| */ | | */ | |
|
| Point3D sgCartToPolar3d(const Point3D& cp); | | inline Point3D sgCartToPolar3d(const Point3D& p) | |
| | | { | |
| | | SGGeoc geoc; | |
| | | SGGeodesy::SGCartToGeoc(SGVec3<double>(p.x(), p.y(), p.z()), geoc); | |
| | | return Point3D::fromSGGeoc(geoc); | |
| | | } | |
| | | | |
| /** | | /** | |
| * 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 | |
| | | | |
End of changes. 7 change blocks. |
| 10 lines changed or deleted | | 26 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.14 2005/10/23 11:55:48 ehofman Exp $ | | * $Id: props.hxx,v 1.18 2006-03-14 15:55:24 mfranz 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 44 | | skipping to change at line 44 | |
| #include <simgear/debug/logstream.hxx> | | #include <simgear/debug/logstream.hxx> | |
| #include STL_STRING | | #include STL_STRING | |
| #include STL_IOSTREAM | | #include STL_IOSTREAM | |
| SG_USING_STD(string); | | SG_USING_STD(string); | |
| SG_USING_STD(vector); | | SG_USING_STD(vector); | |
| SG_USING_STD(istream); | | SG_USING_STD(istream); | |
| SG_USING_STD(ostream); | | SG_USING_STD(ostream); | |
| | | | |
| #endif | | #endif | |
| | | | |
|
| | | #include <simgear/structure/SGReferenced.hxx> | |
| | | #include <simgear/structure/SGSharedPtr.hxx> | |
| | | | |
| #ifdef NONE | | #ifdef NONE | |
| #pragma warn A sloppy coder has defined NONE as a macro! | | #pragma warn A sloppy coder has defined NONE as a macro! | |
| #undef NONE | | #undef NONE | |
| #endif | | #endif | |
| | | | |
| #ifdef ALIAS | | #ifdef ALIAS | |
| #pragma warn A sloppy coder has defined ALIAS as a macro! | | #pragma warn A sloppy coder has defined ALIAS as a macro! | |
| #undef ALIAS | | #undef ALIAS | |
| #endif | | #endif | |
| | | | |
| | | | |
| skipping to change at line 438 | | skipping to change at line 441 | |
| private: | | private: | |
| C &_obj; | | C &_obj; | |
| int _index; | | int _index; | |
| getter_t _getter; | | getter_t _getter; | |
| setter_t _setter; | | setter_t _setter; | |
| }; | | }; | |
| /** | | /** | |
| * The smart pointer that manage reference counting | | * The smart pointer that manage reference counting | |
| */ | | */ | |
| class SGPropertyNode; | | class SGPropertyNode; | |
|
| class SGPropertyNode_ptr | | typedef SGSharedPtr<SGPropertyNode> SGPropertyNode_ptr; | |
| { | | typedef SGSharedPtr<const SGPropertyNode> SGConstPropertyNode_ptr; | |
| public: | | | |
| | | | |
| /** | | | |
| * Default constructor | | | |
| */ | | | |
| SGPropertyNode_ptr(); | | | |
| | | | |
| /** | | | |
| * Copy constructor | | | |
| */ | | | |
| SGPropertyNode_ptr( const SGPropertyNode_ptr &r ); | | | |
| | | | |
| /** | | | |
| * Constructor from a pointer to a node | | | |
| */ | | | |
| SGPropertyNode_ptr( SGPropertyNode *p ); | | | |
| | | | |
| /** | | | |
| * Destructor | | | |
| */ | | | |
| ~SGPropertyNode_ptr(); | | | |
| | | | |
| /** | | | |
| * Assignement operator | | | |
| */ | | | |
| SGPropertyNode_ptr &operator=( const SGPropertyNode_ptr &r ); | | | |
| | | | |
| /** | | | |
| * Pointer access operator | | | |
| */ | | | |
| SGPropertyNode *operator->(); | | | |
| | | | |
| /** | | | |
| * Pointer access operator (const) | | | |
| */ | | | |
| const SGPropertyNode *operator->() const; | | | |
| | | | |
| /** | | | |
| * Conversion to SGPropertyNode * operator | | | |
| */ | | | |
| operator SGPropertyNode *(); | | | |
| | | | |
| /** | | | |
| * Conversion to const SGPropertyNode * operator | | | |
| */ | | | |
| operator const SGPropertyNode *() const; | | | |
| | | | |
| /** | | | |
| * Return the pointer. | | | |
| */ | | | |
| SGPropertyNode * ptr () { return _ptr; } | | | |
| | | | |
| /** | | | |
| * Validity test | | | |
| */ | | | |
| bool valid() const; | | | |
| | | | |
| private: | | | |
| | | | |
| SGPropertyNode *_ptr; | | | |
| }; | | | |
| /** | | /** | |
| * The property change listener interface. | | * The property change listener interface. | |
| * | | * | |
| * <p>Any class that needs to listen for property changes must implement | | * <p>Any class that needs to listen for property changes must implement | |
| * this interface.</p> | | * this interface.</p> | |
| */ | | */ | |
| class SGPropertyChangeListener | | class SGPropertyChangeListener | |
| { | | { | |
| public: | | public: | |
| virtual ~SGPropertyChangeListener (); | | virtual ~SGPropertyChangeListener (); | |
| | | | |
| skipping to change at line 526 | | skipping to change at line 468 | |
| friend class SGPropertyNode; | | friend class SGPropertyNode; | |
| virtual void register_property (SGPropertyNode * node); | | virtual void register_property (SGPropertyNode * node); | |
| virtual void unregister_property (SGPropertyNode * node); | | virtual void unregister_property (SGPropertyNode * node); | |
| | | | |
| private: | | private: | |
| vector<SGPropertyNode *> _properties; | | vector<SGPropertyNode *> _properties; | |
| }; | | }; | |
| /** | | /** | |
| * A node in a property tree. | | * A node in a property tree. | |
| */ | | */ | |
|
| class SGPropertyNode | | class SGPropertyNode : public SGReferenced | |
| { | | { | |
| public: | | public: | |
| | | | |
| /** | | /** | |
| * Public constants. | | * Public constants. | |
| */ | | */ | |
| enum { | | enum { | |
| MAX_STRING_LEN = 1024 | | MAX_STRING_LEN = 1024 | |
| }; | | }; | |
| | | | |
| | | | |
| skipping to change at line 564 | | skipping to change at line 506 | |
| * | | * | |
| * <p>The ARCHIVE attribute is strictly advisory, and controls | | * <p>The ARCHIVE attribute is strictly advisory, and controls | |
| * whether the property should normally be saved and restored.</p> | | * whether the property should normally be saved and restored.</p> | |
| */ | | */ | |
| enum Attribute { | | enum Attribute { | |
| READ = 1, | | READ = 1, | |
| WRITE = 2, | | WRITE = 2, | |
| ARCHIVE = 4, | | ARCHIVE = 4, | |
| REMOVED = 8, | | REMOVED = 8, | |
| TRACE_READ = 16, | | TRACE_READ = 16, | |
|
| TRACE_WRITE = 32 | | TRACE_WRITE = 32, | |
| | | USERARCHIVE = 64 | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Last used attribute | | * Last used attribute | |
| * Update as needed when enum Attribute is changed | | * Update as needed when enum Attribute is changed | |
| */ | | */ | |
| static const int LAST_USED_ATTRIBUTE; | | static const int LAST_USED_ATTRIBUTE; | |
| | | | |
| /** | | /** | |
| * Default constructor. | | * Default constructor. | |
| | | | |
| skipping to change at line 600 | | skipping to change at line 543 | |
| // | | // | |
| | | | |
| /** | | /** | |
| * Test whether this node contains a primitive leaf value. | | * Test whether this node contains a primitive leaf value. | |
| */ | | */ | |
| bool hasValue () const { return (_type != NONE); } | | bool hasValue () const { return (_type != NONE); } | |
| | | | |
| /** | | /** | |
| * Get the node's simple (XML) name. | | * Get the node's simple (XML) name. | |
| */ | | */ | |
|
| const char * getName () const { return _name; } | | const char * getName () const { return _name.c_str(); } | |
| | | | |
| /** | | /** | |
| * Get the node's pretty display name, with subscript when needed. | | * Get the node's pretty display name, with subscript when needed. | |
| */ | | */ | |
| const char * getDisplayName (bool simplify = false) const; | | const char * getDisplayName (bool simplify = false) const; | |
| | | | |
| /** | | /** | |
| * Get the node's integer index. | | * Get the node's integer index. | |
| */ | | */ | |
| int getIndex () const { return _index; } | | int getIndex () const { return _index; } | |
| | | | |
| skipping to change at line 1044 | | skipping to change at line 987 | |
| */ | | */ | |
| bool tie (const char * relative_path, const SGRawValue<const char *> &raw
Value, | | bool tie (const char * relative_path, const SGRawValue<const char *> &raw
Value, | |
| bool useDefault = true); | | bool useDefault = true); | |
| | | | |
| /** | | /** | |
| * Unbind another node from any external data source. | | * Unbind another node from any external data source. | |
| */ | | */ | |
| bool untie (const char * relative_path); | | bool untie (const char * relative_path); | |
| | | | |
| /** | | /** | |
|
| * Add a change listener to the property. | | * Add a change listener to the property. If "initial" is set call the | |
| | | * listener initially. | |
| */ | | */ | |
|
| void addChangeListener (SGPropertyChangeListener * listener); | | void addChangeListener (SGPropertyChangeListener * listener, | |
| | | bool initial = false); | |
| | | | |
| /** | | /** | |
| * Remove a change listener from the property. | | * Remove a change listener from the property. | |
| */ | | */ | |
| void removeChangeListener (SGPropertyChangeListener * listener); | | void removeChangeListener (SGPropertyChangeListener * listener); | |
| | | | |
| /** | | /** | |
| * Fire a value change event to all listeners. | | * Fire a value change event to all listeners. | |
| */ | | */ | |
| void fireValueChanged (); | | void fireValueChanged (); | |
| | | | |
| skipping to change at line 1117 | | skipping to change at line 1062 | |
| /** | | /** | |
| * Trace a read access. | | * Trace a read access. | |
| */ | | */ | |
| void trace_read () const; | | void trace_read () const; | |
| | | | |
| /** | | /** | |
| * Trace a write access. | | * Trace a write access. | |
| */ | | */ | |
| void trace_write () const; | | void trace_write () const; | |
| | | | |
|
| /** | | | |
| * Increment reference counter | | | |
| */ | | | |
| void incrementRef(); | | | |
| | | | |
| /** | | | |
| * Decrement reference counter | | | |
| */ | | | |
| int decrementRef(); | | | |
| | | | |
| friend class SGPropertyNode_ptr; | | | |
| | | | |
| mutable char _buffer[MAX_STRING_LEN+1]; | | | |
| | | | |
| class hash_table; | | class hash_table; | |
| | | | |
|
| char * _name; | | | |
| mutable char * _display_name; | | | |
| int _index; | | int _index; | |
|
| | | string _name; | |
| | | mutable string _display_name; | |
| | | /// To avoid cyclic reference counting loops this shall not be a referenc | |
| | | e | |
| | | /// counted pointer | |
| SGPropertyNode * _parent; | | SGPropertyNode * _parent; | |
| vector<SGPropertyNode_ptr> _children; | | vector<SGPropertyNode_ptr> _children; | |
| vector<SGPropertyNode_ptr> _removedChildren; | | vector<SGPropertyNode_ptr> _removedChildren; | |
|
| mutable char * _path; | | mutable string _path; | |
| | | mutable string _buffer; | |
| hash_table * _path_cache; | | hash_table * _path_cache; | |
| Type _type; | | Type _type; | |
| bool _tied; | | bool _tied; | |
| int _attr; | | int _attr; | |
|
| int _count; | | | |
| | | | |
| // The right kind of pointer... | | // The right kind of pointer... | |
| union { | | union { | |
| SGPropertyNode * alias; | | SGPropertyNode * alias; | |
| SGRawValue<bool> * bool_val; | | SGRawValue<bool> * bool_val; | |
| SGRawValue<int> * int_val; | | SGRawValue<int> * int_val; | |
| SGRawValue<long> * long_val; | | SGRawValue<long> * long_val; | |
| SGRawValue<float> * float_val; | | SGRawValue<float> * float_val; | |
| SGRawValue<double> * double_val; | | SGRawValue<double> * double_val; | |
| SGRawValue<const char *> * string_val; | | SGRawValue<const char *> * string_val; | |
| | | | |
| skipping to change at line 1180 | | skipping to change at line 1113 | |
| 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 (); | |
| ~entry (); | | ~entry (); | |
|
| const char * get_key () { return _key; } | | const char * get_key () { return _key.c_str(); } | |
| void set_key (const char * key); | | void set_key (const char * key); | |
| SGPropertyNode * get_value () { return _value; } | | SGPropertyNode * get_value () { return _value; } | |
| void set_value (SGPropertyNode * value); | | void set_value (SGPropertyNode * value); | |
| private: | | private: | |
|
| char * _key; | | string _key; | |
| SGPropertyNode * _value; | | SGSharedPtr<SGPropertyNode> _value; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * A bucket in a hash table. | | * A bucket in a hash table. | |
| */ | | */ | |
| class bucket { | | class bucket { | |
| public: | | public: | |
| bucket (); | | bucket (); | |
| ~bucket (); | | ~bucket (); | |
| entry * get_entry (const char * key, bool create = false); | | entry * get_entry (const char * key, bool create = false); | |
| | | | |
End of changes. 15 change blocks. |
| 90 lines changed or deleted | | 24 lines changed or added | |
|
| props_io.hxx | | props_io.hxx | |
| /** | | /** | |
| * \file props_io.hxx | | * \file props_io.hxx | |
| * Interface definition for property list io. | | * Interface definition for property list io. | |
| * 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_io.hxx,v 1.2 2004/09/10 15:57:52 curt Exp $ | | * $Id: props_io.hxx,v 1.3 2005-12-17 15:11:37 ehofman Exp $ | |
| */ | | */ | |
| | | | |
| #ifndef __PROPS_IO_HXX | | #ifndef __PROPS_IO_HXX | |
| #define __PROPS_IO_HXX | | #define __PROPS_IO_HXX | |
| | | | |
| #include <simgear/compiler.h> | | #include <simgear/compiler.h> | |
| #include <simgear/props/props.hxx> | | #include <simgear/props/props.hxx> | |
| | | | |
| #include <stdio.h> | | #include <stdio.h> | |
| | | | |
| | | | |
| skipping to change at line 35 | | skipping to change at line 35 | |
| SG_USING_STD(string); | | SG_USING_STD(string); | |
| SG_USING_STD(vector); | | SG_USING_STD(vector); | |
| SG_USING_STD(map); | | SG_USING_STD(map); | |
| SG_USING_STD(istream); | | SG_USING_STD(istream); | |
| SG_USING_STD(ostream); | | SG_USING_STD(ostream); | |
| | | | |
| /** | | /** | |
| * Read properties from an XML input stream. | | * Read properties from an XML input stream. | |
| */ | | */ | |
| void readProperties (istream &input, SGPropertyNode * start_node, | | void readProperties (istream &input, SGPropertyNode * start_node, | |
|
| const string &base = ""); | | const string &base = "", int default_mode = 0); | |
| | | | |
| /** | | /** | |
| * Read properties from an XML file. | | * Read properties from an XML file. | |
| */ | | */ | |
|
| void readProperties (const string &file, SGPropertyNode * start_node); | | void readProperties (const string &file, SGPropertyNode * start_node, | |
| | | int default_mode = 0); | |
| | | | |
| /** | | /** | |
| * Read properties from an in-memory buffer. | | * Read properties from an in-memory buffer. | |
| */ | | */ | |
| void readProperties (const char *buf, const int size, | | void readProperties (const char *buf, const int size, | |
|
| SGPropertyNode * start_node); | | SGPropertyNode * start_node, int default_mode = 0); | |
| | | | |
| /** | | /** | |
| * Write properties to an XML output stream. | | * Write properties to an XML output stream. | |
| */ | | */ | |
| void writeProperties (ostream &output, const SGPropertyNode * start_node, | | void writeProperties (ostream &output, const SGPropertyNode * start_node, | |
|
| bool write_all = false); | | bool write_all = false, | |
| | | SGPropertyNode::Attribute archive_flag = SGPropertyNod | |
| | | e::ARCHIVE); | |
| | | | |
| /** | | /** | |
| * Write properties to an XML file. | | * Write properties to an XML file. | |
| */ | | */ | |
| void writeProperties (const string &file, const SGPropertyNode * start_node
, | | void writeProperties (const string &file, const SGPropertyNode * start_node
, | |
|
| bool write_all = false); | | bool write_all = false, | |
| | | SGPropertyNode::Attribute archive_flag = SGPropertyNod | |
| | | e::ARCHIVE); | |
| | | | |
| /** | | /** | |
| * Copy properties from one node to another. | | * Copy properties from one node to another. | |
| */ | | */ | |
| bool copyProperties (const SGPropertyNode *in, SGPropertyNode *out); | | bool copyProperties (const SGPropertyNode *in, SGPropertyNode *out); | |
| | | | |
| #endif // __PROPS_IO_HXX | | #endif // __PROPS_IO_HXX | |
| | | | |
| // end of props_io.hxx | | // end of props_io.hxx | |
| | | | |
End of changes. 6 change blocks. |
| 6 lines changed or deleted | | 11 lines changed or added | |
|
| pt_lights.hxx | | pt_lights.hxx | |
| | | | |
| skipping to change at line 19 | | skipping to change at line 19 | |
| // published by the Free Software Foundation; either version 2 of the | | // published by the Free Software Foundation; either version 2 of the | |
| // License, or (at your option) any later version. | | // License, or (at your option) any later version. | |
| // | | // | |
| // 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA. | |
| // | | // | |
|
| // $Id: pt_lights.hxx,v 1.5 2004/11/19 21:44:17 curt Exp $ | | // $Id: pt_lights.hxx,v 1.7 2006-03-08 18:16:09 mfranz Exp $ | |
| | | | |
| #ifndef _SG_PT_LIGHTS_HXX | | #ifndef _SG_PT_LIGHTS_HXX | |
| #define _SG_PT_LIGHTS_HXX | | #define _SG_PT_LIGHTS_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> | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| sample_openal.hxx | | sample_openal.hxx | |
| | | | |
| skipping to change at line 19 | | skipping to change at line 19 | |
| // published by the Free Software Foundation; either version 2 of the | | // published by the Free Software Foundation; either version 2 of the | |
| // License, or (at your option) any later version. | | // License, or (at your option) any later version. | |
| // | | // | |
| // 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA. | |
| // | | // | |
|
| // $Id: sample_openal.hxx,v 1.15 2005/11/12 12:22:23 ehofman Exp $ | | // $Id: sample_openal.hxx,v 1.17 2006-03-08 18:16:09 mfranz 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 | |
| # 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 <simgear/debug/logstream.hxx> | | #include <simgear/debug/logstream.hxx> | |
|
| | | #include <simgear/structure/SGReferenced.hxx> | |
| | | #include <simgear/structure/SGSharedPtr.hxx> | |
| | | | |
| #include <plib/sg.h> | | #include <plib/sg.h> | |
| | | | |
| #if defined(__APPLE__) | | #if defined(__APPLE__) | |
| # define AL_ILLEGAL_ENUM AL_INVALID_ENUM | | # define AL_ILLEGAL_ENUM AL_INVALID_ENUM | |
| # define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION | | # define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION | |
| # include <OpenAL/al.h> | | # include <OpenAL/al.h> | |
| # include <OpenAL/alut.h> | | # include <OpenAL/alut.h> | |
| #else | | #else | |
| # include <AL/al.h> | | # include <AL/al.h> | |
| # include <AL/alut.h> | | # include <AL/alut.h> | |
| #endif | | #endif | |
| | | | |
| SG_USING_STD(string); | | SG_USING_STD(string); | |
| | | | |
| /** | | /** | |
| * manages everything we need to know for an individual sound sample | | * manages everything we need to know for an individual sound sample | |
| */ | | */ | |
| | | | |
|
| class SGSoundSample { | | class SGSoundSample : public SGReferenced { | |
| | | | |
| private: | | private: | |
| | | | |
| string sample_name; | | string sample_name; | |
| | | | |
| // Buffers hold sound data. | | // Buffers hold sound data. | |
| ALuint buffer; | | ALuint buffer; | |
| | | | |
| // Sources are points emitting sound. | | // Sources are points emitting sound. | |
| ALuint source; | | ALuint source; | |
| | | | |
End of changes. 4 change blocks. |
| 3 lines changed or deleted | | 5 lines changed or added | |
|
| saturn.hxx | | saturn.hxx | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| * This library is free software; you can redistribute it and/or | | * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public | | * modify it under the terms of the GNU Library General Public | |
| * License as published by the Free Software Foundation; either | | * License as published by the Free Software Foundation; either | |
| * version 2 of the License, or (at your option) any later version. | | * version 2 of the License, or (at your option) any later version. | |
| * | | * | |
| * 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 General Public License | |
| * License along with this library; if not, write to the | | * along with this program; if not, write to the Free Software | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| * Boston, MA 02111-1307, USA. | | 1, USA. | |
| * | | * | |
|
| * $Id: saturn.hxx,v 1.1.1.1 2002/09/07 02:58:20 curt Exp $ | | * $Id: saturn.hxx,v 1.4 2006-03-08 18:16:08 mfranz Exp $ | |
| **************************************************************************
/ | | **************************************************************************
/ | |
| #ifndef _SATURN_HXX_ | | #ifndef _SATURN_HXX_ | |
| #define _SATURN_HXX_ | | #define _SATURN_HXX_ | |
| | | | |
| #include <simgear/ephemeris/celestialBody.hxx> | | #include <simgear/ephemeris/celestialBody.hxx> | |
| #include <simgear/ephemeris/star.hxx> | | #include <simgear/ephemeris/star.hxx> | |
| | | | |
| class Saturn : public CelestialBody | | class Saturn : public CelestialBody | |
| { | | { | |
| public: | | public: | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| screen-dump.hxx | | screen-dump.hxx | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: screen-dump.hxx,v 1.3 2004/11/18 19:10:34 curt Exp $ | | // $Id: screen-dump.hxx,v 1.5 2006-03-08 18:16:09 mfranz Exp $ | |
| | | | |
| #include <simgear/compiler.h> | | #include <simgear/compiler.h> | |
| | | | |
| #include SG_GL_H | | #include SG_GL_H | |
| | | | |
| /** | | /** | |
| * Dump the screen buffer to a ppm file. | | * Dump the screen buffer to a ppm file. | |
| * @param filename name of file | | * @param filename name of file | |
| * @param win_width width of our opengl window | | * @param win_width width of our opengl window | |
| * @param win_height height of our opengl window | | * @param win_height height of our opengl window | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| serial.hxx | | serial.hxx | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: serial.hxx,v 1.3 2004/11/19 21:44:17 curt Exp $ | | // $Id: serial.hxx,v 1.5 2006-03-08 18:16:09 mfranz Exp $ | |
| | | | |
| #ifndef _SERIAL_HXX | | #ifndef _SERIAL_HXX | |
| #define _SERIAL_HXX | | #define _SERIAL_HXX | |
| | | | |
| #ifndef __cplusplus | | #ifndef __cplusplus | |
| # error This library requires C++ | | # error This library requires C++ | |
| #endif | | #endif | |
| | | | |
| #if defined( WIN32 ) && !defined( __CYGWIN__) && !defined( __CYGWIN32__ ) | | #if defined( WIN32 ) && !defined( __CYGWIN__) && !defined( __CYGWIN32__ ) | |
| # include <windows.h> | | # include <windows.h> | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| sg_binobj.hxx | | sg_binobj.hxx | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| // the Free Software Foundation; either version 2 of the License, or | | // the Free Software Foundation; either version 2 of the License, or | |
| // (at your option) any later version. | | // (at your option) any later version. | |
| // | | // | |
| // 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA. | |
| // | | // | |
|
| // $Id: sg_binobj.hxx,v 1.3 2004/11/19 21:44:16 curt Exp $ | | // $Id: sg_binobj.hxx,v 1.6 2006-03-08 18:16:08 mfranz Exp $ | |
| | | | |
| #ifndef _SG_BINOBJ_HXX | | #ifndef _SG_BINOBJ_HXX | |
| #define _SG_BINOBJ_HXX | | #define _SG_BINOBJ_HXX | |
| | | | |
| #include <plib/sg.h> | | #include <plib/sg.h> | |
| | | | |
| #include <simgear/compiler.h> | | #include <simgear/compiler.h> | |
| #include <simgear/constants.h> | | #include <simgear/constants.h> | |
| #include <simgear/math/sg_types.hxx> | | #include <simgear/math/sg_types.hxx> | |
| #include <simgear/bucket/newbucket.hxx> | | #include <simgear/bucket/newbucket.hxx> | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| sg_geodesy.hxx | | sg_geodesy.hxx | |
| #ifndef _SG_GEODESY_HXX | | #ifndef _SG_GEODESY_HXX | |
| #define _SG_GEODESY_HXX | | #define _SG_GEODESY_HXX | |
| | | | |
| #include <simgear/math/point3d.hxx> | | #include <simgear/math/point3d.hxx> | |
|
| | | #include "SGMath.hxx" | |
| | | | |
| | | // Returns the insersection of the line joining the center of the | |
| | | // earth and the specified cylindrical point with the surface of the | |
| | | // WGS84 ellipsoid. Works by finding a normalization constant (in | |
| | | // squashed space) that places the squashed point on the surface of | |
| | | // the sphere. | |
| | | inline double seaLevelRadius(double r, double z) | |
| | | { | |
| | | double sr = r * SGGeodesy::SQUASH; | |
| | | double zz = z*z; | |
| | | return SGGeodesy::POLRAD*sqrt((r*r + zz)/(sr*sr + zz)); | |
| | | } | |
| | | | |
| /** | | /** | |
| * Convert from geocentric coordinates to geodetic coordinates | | * Convert from geocentric coordinates to geodetic coordinates | |
| * @param lat_geoc (in) Geocentric latitude, radians, + = North | | * @param lat_geoc (in) Geocentric latitude, radians, + = North | |
| * @param radius (in) C.G. radius to earth center (meters) | | * @param radius (in) C.G. radius to earth center (meters) | |
| * @param lat_geod (out) Geodetic latitude, radians, + = North | | * @param lat_geod (out) Geodetic latitude, radians, + = North | |
| * @param alt (out) C.G. altitude above mean sea level (meters) | | * @param alt (out) C.G. altitude above mean sea level (meters) | |
| * @param sea_level_r (out) radius from earth center to sea level at | | * @param sea_level_r (out) radius from earth center to sea level at | |
| * local vertical (surface normal) of C.G. (meters) | | * local vertical (surface normal) of C.G. (meters) | |
| */ | | */ | |
|
| void sgGeocToGeod(double lat_geoc, double radius, | | inline void sgGeocToGeod(double lat_geoc, double radius, | |
| double *lat_geod, double *alt, double *sea_level_r); | | double *lat_geod, double *alt, double *sea_level_r | |
| | | ) | |
| | | { | |
| | | SGVec3<double> cart; | |
| | | SGGeodesy::SGGeocToCart(SGGeoc::fromRadM(0, lat_geoc, radius), cart); | |
| | | SGGeod geod; | |
| | | SGGeodesy::SGCartToGeod(cart, geod); | |
| | | *lat_geod = geod.getLatitudeRad(); | |
| | | *alt = geod.getElevationM(); | |
| | | *sea_level_r = SGGeodesy::SGGeodToSeaLevelRadius(geod); | |
| | | } | |
| | | | |
| /** | | /** | |
| * Convert from geodetic coordinates to geocentric coordinates. | | * Convert from geodetic coordinates to geocentric coordinates. | |
| * WARNING: this function is non-reversible. Due to the fact that | | * WARNING: this function is non-reversible. Due to the fact that | |
| * "up" is a different direction for geocentric and geodetic frames, | | * "up" is a different direction for geocentric and geodetic frames, | |
| * you can not simply add your "alt" parameter to the "sl_radius" | | * you can not simply add your "alt" parameter to the "sl_radius" | |
| * result and get back (via sgGeodToGeoc()) to the coordinates you | | * result and get back (via sgGeodToGeoc()) to the coordinates you | |
| * started with. The error under normal conditions will be of | | * started with. The error under normal conditions will be of | |
| * centimeter order; whether that is important or not is application | | * centimeter order; whether that is important or not is application | |
| * dependent. Consider using sgGeodToCart() instead. | | * dependent. Consider using sgGeodToCart() instead. | |
| * | | * | |
| * @param lat_geod (in) Geodetic latitude, radians, + = North | | * @param lat_geod (in) Geodetic latitude, radians, + = North | |
| * @param alt (in) C.G. altitude above mean sea level (meters) | | * @param alt (in) C.G. altitude above mean sea level (meters) | |
| * @param sl_radius (out) SEA LEVEL radius to earth center (meters) | | * @param sl_radius (out) SEA LEVEL radius to earth center (meters) | |
| * @param lat_geoc (out) Geocentric latitude, radians, + = North | | * @param lat_geoc (out) Geocentric latitude, radians, + = North | |
| */ | | */ | |
|
| void sgGeodToGeoc(double lat_geod, double alt, | | inline void sgGeodToGeoc(double lat_geod, double alt, | |
| double *sl_radius, double *lat_geoc ); | | double *sl_radius, double *lat_geoc) | |
| | | { | |
| | | SGVec3<double> cart; | |
| | | SGGeodesy::SGGeodToCart(SGGeod::fromRadM(0, lat_geod, alt), cart); | |
| | | SGGeoc geoc; | |
| | | SGGeodesy::SGCartToGeoc(cart, geoc); | |
| | | *lat_geoc = geoc.getLatitudeRad(); | |
| | | *sl_radius = seaLevelRadius(cart(0), cart(2)); | |
| | | } | |
| | | | |
| /** | | /** | |
| * Convert a cartesian point to a geodetic lat/lon/altitude. | | * Convert a cartesian point to a geodetic lat/lon/altitude. | |
| * | | * | |
| * @param xyz (in) Pointer to cartesian point. | | * @param xyz (in) Pointer to cartesian point. | |
| * @param lat (out) Latitude, in radians | | * @param lat (out) Latitude, in radians | |
| * @param lon (out) Longitude, in radians | | * @param lon (out) Longitude, in radians | |
| * @param alt (out) Altitude, in meters above the WGS84 ellipsoid | | * @param alt (out) Altitude, in meters above the WGS84 ellipsoid | |
| */ | | */ | |
|
| void sgCartToGeod(const double* xyz, double* lat, double* lon, double* alt) | | inline void sgCartToGeod(const double* xyz, double* lat, double* lon, doubl | |
| ; | | e* alt) | |
| | | { | |
| | | SGGeod geod; | |
| | | SGGeodesy::SGCartToGeod(SGVec3<double>(xyz), geod); | |
| | | *lat = geod.getLatitudeRad(); | |
| | | *lon = geod.getLongitudeRad(); | |
| | | *alt = geod.getElevationM(); | |
| | | } | |
| | | | |
| /** | | /** | |
| * Convert a cartesian point to a geodetic lat/lon/altitude. | | * Convert a cartesian point to a geodetic lat/lon/altitude. | |
| * Alternate form using Point3D objects. | | * Alternate form using Point3D objects. | |
| * | | * | |
| * @param cartesian point | | * @param cartesian point | |
| * @return geodetic point | | * @return geodetic point | |
| */ | | */ | |
| inline Point3D sgCartToGeod(const Point3D& p) | | inline Point3D sgCartToGeod(const Point3D& p) | |
| { | | { | |
|
| double lat, lon, alt, xyz[3]; | | SGGeod geod; | |
| xyz[0] = p.x(); xyz[1] = p.y(); xyz[2] = p.z(); | | SGGeodesy::SGCartToGeod(SGVec3<double>(p.x(), p.y(), p.z()), geod); | |
| sgCartToGeod(xyz, &lat, &lon, &alt); | | return Point3D::fromSGGeod(geod); | |
| return Point3D(lon, lat, alt); | | | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Convert a geodetic lat/lon/altitude to a cartesian point. | | * Convert a geodetic lat/lon/altitude to a cartesian point. | |
| * | | * | |
| * @param lat (in) Latitude, in radians | | * @param lat (in) Latitude, in radians | |
| * @param lon (in) Longitude, in radians | | * @param lon (in) Longitude, in radians | |
| * @param alt (in) Altitude, in meters above the WGS84 ellipsoid | | * @param alt (in) Altitude, in meters above the WGS84 ellipsoid | |
| * @param xyz (out) Pointer to cartesian point. | | * @param xyz (out) Pointer to cartesian point. | |
| */ | | */ | |
|
| void sgGeodToCart(double lat, double lon, double alt, double* xyz); | | inline void sgGeodToCart(double lat, double lon, double alt, double* xyz) | |
| | | { | |
| | | SGVec3<double> cart; | |
| | | SGGeodesy::SGGeodToCart(SGGeod::fromRadM(lon, lat, alt), cart); | |
| | | xyz[0] = cart(0); | |
| | | xyz[1] = cart(1); | |
| | | xyz[2] = cart(2); | |
| | | } | |
| | | | |
| /** | | /** | |
| * Convert a geodetic lat/lon/altitude to a cartesian point. | | * Convert a geodetic lat/lon/altitude to a cartesian point. | |
| * Alternate form using Point3D objects. | | * Alternate form using Point3D objects. | |
| * | | * | |
| * @param geodetic point | | * @param geodetic point | |
| * @return cartesian point | | * @return cartesian point | |
| */ | | */ | |
| inline Point3D sgGeodToCart(const Point3D& geod) | | inline Point3D sgGeodToCart(const Point3D& geod) | |
| { | | { | |
|
| double xyz[3]; | | SGVec3<double> cart; | |
| sgGeodToCart(geod.lat(), geod.lon(), geod.elev(), xyz); | | SGGeodesy::SGGeodToCart(SGGeod::fromRadM(geod.lon(), geod.lat(), geod.ele | |
| return Point3D(xyz[0], xyz[1], xyz[2]); | | v()), cart); | |
| | | return Point3D::fromSGVec3(cart); | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Given a starting position and an offset radial and distance, | | * Given a starting position and an offset radial and distance, | |
| * calculate an ending positon on a wgs84 ellipsoid. | | * calculate an ending positon on a wgs84 ellipsoid. | |
| * @param alt (in) meters | | * @param alt (in) meters | |
| * @param lat1 (in) degrees | | * @param lat1 (in) degrees | |
| * @param lon1 (in) degrees | | * @param lon1 (in) degrees | |
| * @param az1 (in) degrees | | * @param az1 (in) degrees | |
| * @param s (in) distance in meters | | * @param s (in) distance in meters | |
| | | | |
End of changes. 7 change blocks. |
| 14 lines changed or deleted | | 59 lines changed or added | |
|
| sg_inlines.h | | sg_inlines.h | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: sg_inlines.h,v 1.1.1.1 2002/09/07 02:58:19 curt Exp $ | | // $Id: sg_inlines.h,v 1.4 2006-03-08 18:16:08 mfranz Exp $ | |
| | | | |
| #ifndef _SG_INLINES_H | | #ifndef _SG_INLINES_H | |
| #define _SG_INLINES_H | | #define _SG_INLINES_H | |
| | | | |
| // return the sign of a value | | // return the sign of a value | |
| template <class T> | | template <class T> | |
| inline int SG_SIGN(const T x) { | | inline int SG_SIGN(const T x) { | |
| return x < T(0) ? -1 : 1; | | return x < T(0) ? -1 : 1; | |
| } | | } | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| sg_memory.h | | sg_memory.h | |
| | | | |
| skipping to change at line 17 | | skipping to change at line 17 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: sg_memory.h,v 1.1.1.1 2002/09/07 02:58:19 curt Exp $ | | // $Id: sg_memory.h,v 1.3 2006-03-08 18:16:08 mfranz Exp $ | |
| | | | |
| #ifndef _SG_MEMORY_H | | #ifndef _SG_MEMORY_H | |
| #define _SG_MEMORY_H | | #define _SG_MEMORY_H | |
| | | | |
| #ifdef HAVE_CONFIG_H | | #ifdef HAVE_CONFIG_H | |
|
| # include <config.h> | | # include <simgear_config.h> | |
| #endif | | #endif | |
| | | | |
| #ifdef HAVE_MEMCPY | | #ifdef HAVE_MEMCPY | |
| | | | |
| # ifdef HAVE_MEMORY_H | | # ifdef HAVE_MEMORY_H | |
| # include <memory.h> | | # include <memory.h> | |
| # endif | | # endif | |
| | | | |
| # define sgmemcmp memcmp | | # define sgmemcmp memcmp | |
| # define sgmemcpy memcpy | | # define sgmemcpy memcpy | |
| | | | |
End of changes. 3 change blocks. |
| 6 lines changed or deleted | | 6 lines changed or added | |
|
| sg_path.hxx | | sg_path.hxx | |
| | | | |
| skipping to change at line 21 | | skipping to change at line 21 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: sg_path.hxx,v 1.7 2004/11/19 21:44:16 curt Exp $ | | // $Id: sg_path.hxx,v 1.11 2006-03-08 18:16:08 mfranz Exp $ | |
| | | | |
| #ifndef _SG_PATH_HXX | | #ifndef _SG_PATH_HXX | |
| #define _SG_PATH_HXX | | #define _SG_PATH_HXX | |
| | | | |
|
| | | #include <sys/types.h> | |
| | | | |
| #include <simgear/compiler.h> | | #include <simgear/compiler.h> | |
| #include STL_STRING | | #include STL_STRING | |
| | | | |
| #include <simgear/math/sg_types.hxx> | | #include <simgear/math/sg_types.hxx> | |
| | | | |
| SG_USING_STD(string); | | SG_USING_STD(string); | |
| | | | |
|
| | | #ifdef _MSC_VER | |
| | | typedef int mode_t; | |
| | | #endif | |
| | | | |
| /** | | /** | |
| * A class to hide path separator difference across platforms and assist | | * A class to hide path separator difference across platforms and assist | |
| * in managing file system path names. | | * in managing file system path names. | |
| * | | * | |
| * Paths can be input in any platform format and will be converted | | * Paths can be input in any platform format and will be converted | |
| * automatically to the proper format. | | * automatically to the proper format. | |
| */ | | */ | |
| | | | |
| class SGPath { | | class SGPath { | |
| | | | |
| | | | |
| skipping to change at line 116 | | skipping to change at line 121 | |
| * @return the base string | | * @return the base string | |
| */ | | */ | |
| string base() const; | | string base() const; | |
| | | | |
| /** | | /** | |
| * Get the extention part of the path (everything after the final ".") | | * Get the extention part of the path (everything after the final ".") | |
| * @return the extention string | | * @return the extention string | |
| */ | | */ | |
| string extension() const; | | string extension() const; | |
| | | | |
|
| /** Get the path string | | /** | |
| | | * Get the path string | |
| * @return path string | | * @return path string | |
| */ | | */ | |
| string str() const { return path; } | | string str() const { return path; } | |
| | | | |
|
| /** Get the path string | | /** | |
| | | * Get the path string | |
| * @return path in "C" string (ptr to char array) form. | | * @return path in "C" string (ptr to char array) form. | |
| */ | | */ | |
| const char* c_str() { return path.c_str(); } | | const char* c_str() { return path.c_str(); } | |
| | | | |
| /** | | /** | |
| * Determine if file exists by attempting to fopen it. | | * Determine if file exists by attempting to fopen it. | |
| * @return true if file exists, otherwise returns false. | | * @return true if file exists, otherwise returns false. | |
| */ | | */ | |
| bool exists() const; | | bool exists() const; | |
| | | | |
|
| | | /** | |
| | | * Create the designated directory. | |
| | | */ | |
| | | void create_dir(mode_t mode); | |
| | | | |
| private: | | private: | |
| | | | |
| void fix(); | | void fix(); | |
| | | | |
| }; | | }; | |
| | | | |
| /** | | /** | |
|
| | | * Split a directory string into a list of it's parent directories. | |
| | | */ | |
| | | string_list sgPathBranchSplit( const string &path ); | |
| | | | |
| | | /** | |
| * Split a directory search path into a vector of individual paths | | * Split a directory search path into a vector of individual paths | |
| */ | | */ | |
| string_list sgPathSplit( const string &search_path ); | | string_list sgPathSplit( const string &search_path ); | |
| | | | |
| #endif // _SG_PATH_HXX | | #endif // _SG_PATH_HXX | |
| | | | |
End of changes. 8 change blocks. |
| 7 lines changed or deleted | | 25 lines changed or added | |
|
| sg_random.h | | sg_random.h | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: sg_random.h,v 1.3 2005/04/30 09:59:12 ehofman Exp $ | | // $Id: sg_random.h,v 1.5 2006-03-08 18:16:08 mfranz 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 | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| sg_socket_udp.hxx | | sg_socket_udp.hxx | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| // published by the Free Software Foundation; either version 2 of the | | // published by the Free Software Foundation; either version 2 of the | |
| // License, or (at your option) any later version. | | // License, or (at your option) any later version. | |
| // | | // | |
| // 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA. | |
| // | | // | |
|
| // $Id: sg_socket_udp.hxx,v 1.2 2004/11/19 21:44:16 curt Exp $ | | // $Id: sg_socket_udp.hxx,v 1.5 2006-03-08 18:16:08 mfranz Exp $ | |
| | | | |
| #ifndef _SG_SOCKET_UDP_HXX | | #ifndef _SG_SOCKET_UDP_HXX | |
| #define _SG_SOCKET_UDP_HXX | | #define _SG_SOCKET_UDP_HXX | |
| | | | |
| #ifndef __cplusplus | | #ifndef __cplusplus | |
| # error This library requires C++ | | # error This library requires C++ | |
| #endif | | #endif | |
| | | | |
| #include <plib/netSocket.h> | | #include <plib/netSocket.h> | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| sg_time.hxx | | sg_time.hxx | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: sg_time.hxx,v 1.7 2005/11/17 15:30:07 curt Exp $ | | // $Id: sg_time.hxx,v 1.9 2006-03-08 18:16:10 mfranz 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> | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| sg_types.hxx | | sg_types.hxx | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: sg_types.hxx,v 1.3 2004/11/19 21:44:16 curt Exp $ | | // $Id: sg_types.hxx,v 1.5 2006-03-08 18:16:08 mfranz Exp $ | |
| | | | |
| #ifndef _SG_TYPES_HXX | | #ifndef _SG_TYPES_HXX | |
| #define _SG_TYPES_HXX | | #define _SG_TYPES_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> | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| sgstream.hxx | | sgstream.hxx | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: sgstream.hxx,v 1.2 2002/12/31 14:47:36 david Exp $ | | // $Id: sgstream.hxx,v 1.3 2006-03-08 18:16:08 mfranz Exp $ | |
| | | | |
| #ifndef _SGSTREAM_HXX | | #ifndef _SGSTREAM_HXX | |
| #define _SGSTREAM_HXX | | #define _SGSTREAM_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> | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| shadowvolume.hxx | | shadowvolume.hxx | |
| | | | |
| skipping to change at line 19 | | skipping to change at line 19 | |
| // published by the Free Software Foundation; either version 2 of the | | // published by the Free Software Foundation; either version 2 of the | |
| // License, or (at your option) any later version. | | // License, or (at your option) any later version. | |
| // | | // | |
| // 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, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA. | |
| // | | // | |
| // | | // | |
| | | | |
| #ifndef _SHADOWVOLUME_HXX | | #ifndef _SHADOWVOLUME_HXX | |
| #define _SHADOWVOLUME_HXX | | #define _SHADOWVOLUME_HXX | |
| | | | |
|
| | | #include <simgear/structure/ssgSharedPtr.hxx> | |
| | | | |
| #include <plib/sg.h> | | #include <plib/sg.h> | |
| #include <vector> | | #include <vector> | |
| #include <map> | | #include <map> | |
| | | | |
| SG_USING_STD(vector); | | SG_USING_STD(vector); | |
| SG_USING_STD(map); | | SG_USING_STD(map); | |
| | | | |
| class ssgBranch; | | class ssgBranch; | |
| class ssgLeaf; | | class ssgLeaf; | |
| class SGPropertyNode; | | class SGPropertyNode; | |
| | | | |
| skipping to change at line 74 | | skipping to change at line 76 | |
| class ShadowCaster | | class ShadowCaster | |
| { | | { | |
| public: | | public: | |
| typedef struct { | | typedef struct { | |
| sgVec4 planeEquations; | | sgVec4 planeEquations; | |
| int neighbourIndices[3]; | | int neighbourIndices[3]; | |
| bool isSilhouetteEdge[3]; | | bool isSilhouetteEdge[3]; | |
| bool isFacingLight; | | bool isFacingLight; | |
| } triData; | | } triData; | |
| | | | |
|
| ssgBranch *geometry_leaf; | | ssgSharedPtr<ssgBranch> geometry_leaf; | |
| ssgBranch *scenery_object; | | ssgSharedPtr<ssgBranch> scenery_object; | |
| ssgBranch *lib_object; | | ssgSharedPtr<ssgBranch> lib_object; | |
| ssgBranch *first_select; | | ssgSharedPtr<ssgBranch> first_select; | |
| sgVec3 last_lightpos; | | sgVec3 last_lightpos; | |
| sgMat4 last_transform; | | sgMat4 last_transform; | |
| int frameNumber; | | int frameNumber; | |
| | | | |
| int *indices; | | int *indices; | |
| int numTriangles; | | int numTriangles; | |
| triData *triangles; | | triData *triangles; | |
| | | | |
| sgVec4 * vertices; | | sgVec4 * vertices; | |
| GLushort *silhouetteEdgeIndices; | | GLushort *silhouetteEdgeIndices; | |
| | | | |
| skipping to change at line 112 | | skipping to change at line 114 | |
| }; | | }; | |
| typedef vector<ShadowCaster *> ShadowCaster_list; | | typedef vector<ShadowCaster *> ShadowCaster_list; | |
| | | | |
| class SceneryObject { | | class SceneryObject { | |
| public: | | public: | |
| SceneryObject(ssgBranch *_scenery_object, OccluderType _occl
uder_type); | | SceneryObject(ssgBranch *_scenery_object, OccluderType _occl
uder_type); | |
| ~SceneryObject(); | | ~SceneryObject(); | |
| void computeShadows(void); | | void computeShadows(void); | |
| void traverseTree(ssgBranch *branch); | | void traverseTree(ssgBranch *branch); | |
| void find_trans(void); | | void find_trans(void); | |
|
| ssgBranch *scenery_object; | | ssgSharedPtr<ssgBranch> scenery_object; | |
| ssgBranch *lib_object; | | ssgSharedPtr<ssgBranch> lib_object; | |
| ssgBranch *pending_object; | | ssgSharedPtr<ssgBranch> pending_object; | |
| ssgBranch *tile; | | ssgSharedPtr<ssgBranch> tile; | |
| ShadowCaster_list parts; | | ShadowCaster_list parts; | |
| OccluderType occluder_type; | | OccluderType occluder_type; | |
| }; | | }; | |
|
| typedef map<ssgBranch *, SceneryObject *> SceneryObject_map; | | typedef map<ssgSharedPtr<ssgBranch>, SceneryObject *> SceneryObject_
map; | |
| | | | |
| private: | | private: | |
| void update_light_view(void); | | void update_light_view(void); | |
| void computeShadows(void); | | void computeShadows(void); | |
| void cull ( ssgBranch *b, sgFrustum *f, sgMat4 m, int test_needed ); | | void cull ( ssgBranch *b, sgFrustum *f, sgMat4 m, int test_needed ); | |
| | | | |
| bool shadows_enabled; | | bool shadows_enabled; | |
| bool shadowsAC_enabled, shadowsAI_enabled, shadowsTO_enabled, sha
dowsDebug_enabled; | | bool shadowsAC_enabled, shadowsAI_enabled, shadowsTO_enabled, sha
dowsDebug_enabled; | |
| bool shadowsAC_transp_enabled; | | bool shadowsAC_transp_enabled; | |
| bool use_alpha; | | bool use_alpha; | |
| bool canDoAlpha, canDoStencil; | | bool canDoAlpha, canDoStencil; | |
|
| SGPropertyNode *sim_rendering; | | SGPropertyNode_ptr sim_rendering; | |
| | | | |
| sgVec3 sunPos; | | sgVec3 sunPos; | |
| int frameNumber; | | int frameNumber; | |
| int lastTraverseTreeFrame; | | int lastTraverseTreeFrame; | |
| sgMat4 CameraViewM; | | sgMat4 CameraViewM; | |
| double sun_angle; | | double sun_angle; | |
| SceneryObject_map sceneryObjects; | | SceneryObject_map sceneryObjects; | |
|
| ssgBranch *ssg_root; | | ssgSharedPtr<ssgBranch> ssg_root; | |
| bool shadows_rendered; | | bool shadows_rendered; | |
| }; | | }; | |
| | | | |
| #endif // _SHADOWVOLUME_HXX | | #endif // _SHADOWVOLUME_HXX | |
| | | | |
End of changes. 7 change blocks. |
| 12 lines changed or deleted | | 14 lines changed or added | |
|
| sky.hxx | | sky.hxx | |
| | | | |
| skipping to change at line 21 | | skipping to change at line 21 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: sky.hxx,v 1.15 2004/11/19 21:44:17 curt Exp $ | | // $Id: sky.hxx,v 1.17 2006-03-08 18:16:09 mfranz Exp $ | |
| | | | |
| #ifndef _SG_SKY_HXX | | #ifndef _SG_SKY_HXX | |
| #define _SG_SKY_HXX | | #define _SG_SKY_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 379 | | skipping to change at line 378 | |
| pre_selector->select( 0 ); | | pre_selector->select( 0 ); | |
| post_selector->select( 0 ); | | post_selector->select( 0 ); | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Get the current sun color | | * Get the current sun color | |
| */ | | */ | |
| inline float *get_sun_color() { return oursun->get_color(); } | | inline float *get_sun_color() { return oursun->get_color(); } | |
| | | | |
| /** | | /** | |
|
| | | * Get the sun halo texture handle | |
| | | */ | |
| | | inline GLuint get_sun_texture_id() { return oursun->get_texture_id(); } | |
| | | | |
| | | /** | |
| * Add a cloud layer. | | * Add a cloud layer. | |
| * | | * | |
| * Transfer pointer ownership to this object. | | * Transfer pointer ownership to this object. | |
| * | | * | |
| * @param layer The new cloud layer to add. | | * @param layer The new cloud layer to add. | |
| */ | | */ | |
| void add_cloud_layer (SGCloudLayer * layer); | | void add_cloud_layer (SGCloudLayer * layer); | |
| | | | |
| /** | | /** | |
| * Get a cloud layer (const). | | * Get a cloud layer (const). | |
| | | | |
End of changes. 3 change blocks. |
| 5 lines changed or deleted | | 10 lines changed or added | |
|
| soundmgr_openal.hxx | | soundmgr_openal.hxx | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| // published by the Free Software Foundation; either version 2 of the | | // published by the Free Software Foundation; either version 2 of the | |
| // License, or (at your option) any later version. | | // License, or (at your option) any later version. | |
| // | | // | |
| // 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA. | |
| // | | // | |
|
| // $Id: soundmgr_openal.hxx,v 1.6 2005/01/24 15:51:37 ehofman Exp $ | | // $Id: soundmgr_openal.hxx,v 1.8 2006-03-08 18:16:09 mfranz 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 58 | | skipping to change at line 58 | |
| #else | | #else | |
| # include <AL/al.h> | | # include <AL/al.h> | |
| # include <AL/alc.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, SGSharedPtr<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; | | ALCdevice *dev; | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| sphere.hxx | | sphere.hxx | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: sphere.hxx,v 1.1.1.1 2002/09/07 02:58:20 curt Exp $ | | // $Id: sphere.hxx,v 1.2 2006-03-08 18:16:09 mfranz Exp $ | |
| | | | |
| #include <plib/ssg.h> | | #include <plib/ssg.h> | |
| | | | |
| // return a sphere object as an ssgBranch (and connect in the | | // return a sphere object as an ssgBranch (and connect in the | |
| // specified ssgSimpleState | | // specified ssgSimpleState | |
| ssgBranch *ssgMakeSphere( ssgSimpleState *state, ssgColourArray *cl, | | ssgBranch *ssgMakeSphere( ssgSimpleState *state, ssgColourArray *cl, | |
| double radius, int slices, int stacks, | | double radius, int slices, int stacks, | |
| ssgCallback predraw, ssgCallback postdraw ); | | ssgCallback predraw, ssgCallback postdraw ); | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| star.hxx | | star.hxx | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| * This library is free software; you can redistribute it and/or | | * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public | | * modify it under the terms of the GNU Library General Public | |
| * License as published by the Free Software Foundation; either | | * License as published by the Free Software Foundation; either | |
| * version 2 of the License, or (at your option) any later version. | | * version 2 of the License, or (at your option) any later version. | |
| * | | * | |
| * 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 General Public License | |
| * License along with this library; if not, write to the | | * along with this program; if not, write to the Free Software | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| * Boston, MA 02111-1307, USA. | | 1, USA. | |
| * | | * | |
|
| * $Id: star.hxx,v 1.2 2005/11/11 13:19:59 ehofman Exp $ | | * $Id: star.hxx,v 1.5 2006-03-08 18:16:08 mfranz 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: | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| stardata.hxx | | stardata.hxx | |
| | | | |
| skipping to change at line 17 | | skipping to change at line 17 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: stardata.hxx,v 1.2 2004/11/19 21:44:16 curt Exp $ | | // $Id: stardata.hxx,v 1.5 2006-03-08 18:16:08 mfranz Exp $ | |
| | | | |
| #ifndef _SG_STARDATA_HXX | | #ifndef _SG_STARDATA_HXX | |
| #define _SG_STARDATA_HXX | | #define _SG_STARDATA_HXX | |
| | | | |
| #include <plib/sg.h> | | #include <plib/sg.h> | |
| | | | |
| #include <simgear/misc/sg_path.hxx> | | #include <simgear/misc/sg_path.hxx> | |
| | | | |
| #define SG_MAX_STARS 850 | | #define SG_MAX_STARS 850 | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| stars.hxx | | stars.hxx | |
| | | | |
| skipping to change at line 21 | | skipping to change at line 21 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: stars.hxx,v 1.1.1.1 2002/09/07 02:58:20 curt Exp $ | | // $Id: stars.hxx,v 1.2 2006-03-08 18:16:09 mfranz Exp $ | |
| | | | |
| #ifndef _SG_STARS_HXX_ | | #ifndef _SG_STARS_HXX_ | |
| #define _SG_STARS_HXX_ | | #define _SG_STARS_HXX_ | |
| | | | |
| #include <plib/ssg.h> | | #include <plib/ssg.h> | |
| | | | |
| class SGStars { | | class SGStars { | |
| | | | |
| ssgTransform *stars_transform; | | ssgTransform *stars_transform; | |
| ssgSimpleState *state; | | ssgSimpleState *state; | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| stopwatch.hxx | | stopwatch.hxx | |
| | | | |
| skipping to change at line 16 | | skipping to change at line 16 | |
| * Copyright (C) 1997,1998 Todd Veldhuizen <tveldhui@seurat.uwaterloo.ca> | | * Copyright (C) 1997,1998 Todd Veldhuizen <tveldhui@seurat.uwaterloo.ca> | |
| * | | * | |
| * Suggestions: blitz-suggest@cybervision.com | | * Suggestions: blitz-suggest@cybervision.com | |
| * Bugs: blitz-bugs@cybervision.com | | * Bugs: blitz-bugs@cybervision.com | |
| * | | * | |
| * For more information, please see the Blitz++ Home Page: | | * For more information, please see the Blitz++ Home Page: | |
| * http://seurat.uwaterloo.ca/blitz/ | | * http://seurat.uwaterloo.ca/blitz/ | |
| */ | | */ | |
| | | | |
| /* | | /* | |
|
| * $Id: stopwatch.hxx,v 1.1.1.1 2002/09/07 02:58:19 curt Exp $ | | * $Id: stopwatch.hxx,v 1.3 2006-03-08 18:16:08 mfranz Exp $ | |
| * | | * | |
| * This library is free software; you can redistribute it and/or | | * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public | | * modify it under the terms of the GNU Library General Public | |
| * License as published by the Free Software Foundation; either | | * License as published by the Free Software Foundation; either | |
| * version 2 of the License, or (at your option) any later version. | | * version 2 of the License, or (at your option) any later version. | |
| * | | * | |
| * 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 General Public License | |
| * License along with this library; if not, write to the | | * along with this program; if not, write to the Free Software | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| * Boston, MA 02111-1307, USA. | | 1, USA. | |
| * | | * | |
| */ | | */ | |
| | | | |
| // This class is not portable to non System V platforms. | | // This class is not portable to non System V platforms. | |
| // It will need to be rewritten for Windows, NT, Mac. | | // It will need to be rewritten for Windows, NT, Mac. | |
| // NEEDS_WORK | | // NEEDS_WORK | |
| | | | |
| #ifndef _STOPWATCH_HXX | | #ifndef _STOPWATCH_HXX | |
| #define _STOPWATCH_HXX | | #define _STOPWATCH_HXX | |
| | | | |
| #ifndef __cplusplus | | #ifndef __cplusplus | |
| # error This library requires C++ | | # error This library requires C++ | |
| #endif | | #endif | |
| | | | |
| #ifdef HAVE_CONFIG_H | | #ifdef HAVE_CONFIG_H | |
|
| # include <config.h> | | # include <simgear_config.h> | |
| #endif | | #endif | |
| | | | |
| #if defined(__linux__) && ! defined(HAVE_GETRUSAGE) | | #if defined(__linux__) && ! defined(HAVE_GETRUSAGE) | |
| # define HAVE_GETRUSAGE | | # define HAVE_GETRUSAGE | |
| #endif | | #endif | |
| | | | |
| #if defined( WIN32 ) && defined( HAVE_GETRUSAGE ) | | #if defined( WIN32 ) && defined( HAVE_GETRUSAGE ) | |
| # undef HAVE_GETRUSAGE | | # undef HAVE_GETRUSAGE | |
| #endif // WIN32 | | #endif // WIN32 | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 6 lines changed or deleted | | 6 lines changed or added | |
|
| strutils.hxx | | strutils.hxx | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: strutils.hxx,v 1.1.1.1 2002/09/07 02:58:19 curt Exp $ | | // $Id: strutils.hxx,v 1.2 2006-03-08 18:16:08 mfranz Exp $ | |
| | | | |
| #ifndef STRUTILS_H | | #ifndef STRUTILS_H | |
| #define STRUTILS_H | | #define STRUTILS_H | |
| | | | |
| #include <simgear/compiler.h> | | #include <simgear/compiler.h> | |
| | | | |
| #include STL_STRING | | #include STL_STRING | |
| | | | |
| #include <vector> | | #include <vector> | |
| SG_USING_STD(vector); | | SG_USING_STD(vector); | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| subsystem_mgr.hxx | | subsystem_mgr.hxx | |
| | | | |
| skipping to change at line 17 | | skipping to change at line 17 | |
| // published by the Free Software Foundation; either version 2 of the | | // published by the Free Software Foundation; either version 2 of the | |
| // License, or (at your option) any later version. | | // License, or (at your option) any later version. | |
| // | | // | |
| // 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA. | |
| // | | // | |
|
| // $Id: subsystem_mgr.hxx,v 1.2 2005/06/11 08:39:26 ehofman Exp $ | | // $Id: subsystem_mgr.hxx,v 1.3 2006-03-08 18:16:10 mfranz 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> | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| texcoord.hxx | | texcoord.hxx | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: texcoord.hxx,v 1.3 2004/11/19 21:44:16 curt Exp $ | | // $Id: texcoord.hxx,v 1.5 2006-03-08 18:16:08 mfranz Exp $ | |
| | | | |
| #ifndef _TEXCOORD_HXX | | #ifndef _TEXCOORD_HXX | |
| #define _TEXCOORD_HXX | | #define _TEXCOORD_HXX | |
| | | | |
| #ifndef __cplusplus | | #ifndef __cplusplus | |
| # error This library requires C++ | | # error This library requires C++ | |
| #endif | | #endif | |
| | | | |
| #include <simgear/bucket/newbucket.hxx> | | #include <simgear/bucket/newbucket.hxx> | |
| #include <simgear/math/sg_types.hxx> | | #include <simgear/math/sg_types.hxx> | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| timezone.h | | timezone.h | |
| | | | |
| skipping to change at line 15 | | skipping to change at line 15 | |
| * This library is free software; you can redistribute it and/or | | * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public | | * modify it under the terms of the GNU Library General Public | |
| * License as published by the Free Software Foundation; either | | * License as published by the Free Software Foundation; either | |
| * version 2 of the License, or (at your option) any later version. | | * version 2 of the License, or (at your option) any later version. | |
| * | | * | |
| * 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 General Public License | |
| * License along with this library; if not, write to the | | * along with this program; if not, write to the Free Software | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| * Boston, MA 02111-1307, USA. | | 1, USA. | |
| * | | * | |
| **************************************************************************
/ | | **************************************************************************
/ | |
| | | | |
| /** \file timezone.h | | /** \file timezone.h | |
| * | | * | |
| * Provides SGTimeZone and SGTimeZoneContainer | | * Provides SGTimeZone and SGTimeZoneContainer | |
| * | | * | |
| */ | | */ | |
| | | | |
| #ifndef _TIMEZONE_H_ | | #ifndef _TIMEZONE_H_ | |
| | | | |
End of changes. 1 change blocks. |
| 4 lines changed or deleted | | 4 lines changed or added | |
|
| uranus.hxx | | uranus.hxx | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| * This library is free software; you can redistribute it and/or | | * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public | | * modify it under the terms of the GNU Library General Public | |
| * License as published by the Free Software Foundation; either | | * License as published by the Free Software Foundation; either | |
| * version 2 of the License, or (at your option) any later version. | | * version 2 of the License, or (at your option) any later version. | |
| * | | * | |
| * 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 General Public License | |
| * License along with this library; if not, write to the | | * along with this program; if not, write to the Free Software | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| * Boston, MA 02111-1307, USA. | | 1, USA. | |
| * | | * | |
|
| * $Id: uranus.hxx,v 1.1.1.1 2002/09/07 02:58:20 curt Exp $ | | * $Id: uranus.hxx,v 1.4 2006-03-08 18:16:08 mfranz Exp $ | |
| **************************************************************************
/ | | **************************************************************************
/ | |
| #ifndef _URANUS_HXX_ | | #ifndef _URANUS_HXX_ | |
| #define _URANUS_HXX_ | | #define _URANUS_HXX_ | |
| | | | |
| #include <simgear/ephemeris/celestialBody.hxx> | | #include <simgear/ephemeris/celestialBody.hxx> | |
| #include <simgear/ephemeris/star.hxx> | | #include <simgear/ephemeris/star.hxx> | |
| | | | |
| class Uranus : public CelestialBody | | class Uranus : public CelestialBody | |
| { | | { | |
| public: | | public: | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| vector.hxx | | vector.hxx | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: vector.hxx,v 1.2 2004/11/19 21:47:05 curt Exp $ | | // $Id: vector.hxx,v 1.4 2006-03-08 18:16:08 mfranz Exp $ | |
| | | | |
| #ifndef _VECTOR_HXX | | #ifndef _VECTOR_HXX | |
| #define _VECTOR_HXX | | #define _VECTOR_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> | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| venus.hxx | | venus.hxx | |
| | | | |
| skipping to change at line 18 | | skipping to change at line 18 | |
| * This library is free software; you can redistribute it and/or | | * This library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public | | * modify it under the terms of the GNU Library General Public | |
| * License as published by the Free Software Foundation; either | | * License as published by the Free Software Foundation; either | |
| * version 2 of the License, or (at your option) any later version. | | * version 2 of the License, or (at your option) any later version. | |
| * | | * | |
| * 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 General Public License | |
| * License along with this library; if not, write to the | | * along with this program; if not, write to the Free Software | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| * Boston, MA 02111-1307, USA. | | 1, USA. | |
| * | | * | |
|
| * $Id: venus.hxx,v 1.1.1.1 2002/09/07 02:58:20 curt Exp $ | | * $Id: venus.hxx,v 1.4 2006-03-08 18:16:08 mfranz Exp $ | |
| **************************************************************************
/ | | **************************************************************************
/ | |
| #ifndef _VENUS_HXX_ | | #ifndef _VENUS_HXX_ | |
| #define _VENUS_HXX_ | | #define _VENUS_HXX_ | |
| | | | |
| #include <simgear/ephemeris/celestialBody.hxx> | | #include <simgear/ephemeris/celestialBody.hxx> | |
| #include <simgear/ephemeris/star.hxx> | | #include <simgear/ephemeris/star.hxx> | |
| | | | |
| class Venus : public CelestialBody | | class Venus : public CelestialBody | |
| { | | { | |
| public: | | public: | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| visual_enviro.hxx | | visual_enviro.hxx | |
| | | | |
| skipping to change at line 19 | | skipping to change at line 19 | |
| // published by the Free Software Foundation; either version 2 of the | | // published by the Free Software Foundation; either version 2 of the | |
| // License, or (at your option) any later version. | | // License, or (at your option) any later version. | |
| // | | // | |
| // 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, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA. | |
| // | | // | |
| // | | // | |
| #ifndef _VISUAL_ENVIRO_HXX | | #ifndef _VISUAL_ENVIRO_HXX | |
| #define _VISUAL_ENVIRO_HXX | | #define _VISUAL_ENVIRO_HXX | |
| | | | |
| #include <simgear/compiler.h> | | #include <simgear/compiler.h> | |
| #include STL_STRING | | #include STL_STRING | |
| #include <vector> | | #include <vector> | |
| | | | |
| SG_USING_STD(vector); | | SG_USING_STD(vector); | |
| | | | |
| skipping to change at line 93 | | skipping to change at line 93 | |
| double last_lon, last_lat, last_alt; | | double last_lon, last_lat, last_alt; | |
| SGSoundMgr *soundMgr; | | SGSoundMgr *soundMgr; | |
| bool snd_active, snd_playing; | | bool snd_active, snd_playing; | |
| double snd_timer, snd_wait, snd_pos_lat, snd_pos_lon, snd_d
ist; | | double snd_timer, snd_wait, snd_pos_lat, snd_pos_lon, snd_d
ist; | |
| double min_time_before_lt; | | double min_time_before_lt; | |
| | | | |
| float fov_width, fov_height; | | float fov_width, fov_height; | |
| | | | |
| /** a list of all the radar echo. */ | | /** a list of all the radar echo. */ | |
| list_of_SGWxRadarEcho radarEcho; | | list_of_SGWxRadarEcho radarEcho; | |
|
| | | static sgVec3 min_light; | |
| | | static SGfloat streak_bright_nearmost_layer, | |
| | | streak_bright_farmost_layer, | |
| | | streak_period_max, | |
| | | streak_period_change_per_kt, | |
| | | streak_period_min, | |
| | | streak_length_min, | |
| | | streak_length_change_per_kt, | |
| | | streak_length_max; | |
| | | static int streak_count_min, streak_count_max; | |
| | | static SGfloat cone_base_radius, | |
| | | cone_height; | |
| | | | |
| public: | | public: | |
| SGEnviro(); | | SGEnviro(); | |
| ~SGEnviro(); | | ~SGEnviro(); | |
| | | | |
|
| | | /** Read the config from the precipitation rendering config properti | |
| | | es. | |
| | | * @param precip_rendering_cfgNode "/sim/rendering/precipitation" in | |
| | | fg | |
| | | * Set from whatever info present in the | |
| | | * subnodes passed, substituting hardwired defaults for missing fiel | |
| | | ds. | |
| | | * If NULL is given, do nothing. | |
| | | */ | |
| | | void config(const class SGPropertyNode* precip_rendering_cfgNode); | |
| | | | |
| /** | | /** | |
| * Forward a few states used for renderings. | | * Forward a few states used for renderings. | |
| */ | | */ | |
| void startOfFrame( sgVec3 p, sgVec3 up, double lon, double lat, doub
le alt, double delta_time); | | void startOfFrame( sgVec3 p, sgVec3 up, double lon, double lat, doub
le alt, double delta_time); | |
| | | | |
| void endOfFrame(void); | | void endOfFrame(void); | |
| | | | |
| /** | | /** | |
| * Whenever a cloud is drawn we check his 'impact' on the environment. | | * Whenever a cloud is drawn we check his 'impact' on the environment. | |
| * @param heading direction of cloud in radians | | * @param heading direction of cloud in radians | |
| * @param alt asl of cloud in meters | | * @param alt asl of cloud in meters | |
| * @param radius radius of cloud in meters | | * @param radius radius of cloud in meters | |
|
| * @param familly cloud familly | | * @param family cloud family | |
| * @param dist squared dist to cloud in meters | | * @param dist squared dist to cloud in meters | |
| */ | | */ | |
|
| void callback_cloud(float heading, float alt, float radius, int fami
lly, float dist, int cloudId); | | void callback_cloud(float heading, float alt, float radius, int fami
ly, float dist, int cloudId); | |
| | | | |
|
| void drawRain(double pitch, double roll, double heading, double spee
d, double rain_norm); | | void drawRain(double pitch, double roll, double heading, double hspe
ed, double rain_norm); | |
| /** | | /** | |
| * Draw rain or snow precipitation around the viewer. | | * Draw rain or snow precipitation around the viewer. | |
| * @param rain_norm rain normalized intensity given by metar class | | * @param rain_norm rain normalized intensity given by metar class | |
| * @param snow_norm snow normalized intensity given by metar class | | * @param snow_norm snow normalized intensity given by metar class | |
| * @param hail_norm hail normalized intensity given by metar class | | * @param hail_norm hail normalized intensity given by metar class | |
| * @param pitch pitch rotation of viewer | | * @param pitch pitch rotation of viewer | |
| * @param roll roll rotation of viewer | | * @param roll roll rotation of viewer | |
|
| * @param speed moving speed of viewer in kt | | * @param hspeed moving horizontal speed of viewer in kt | |
| */ | | */ | |
| void drawPrecipitation(double rain_norm, double snow_norm, double ha
il_norm, | | void drawPrecipitation(double rain_norm, double snow_norm, double ha
il_norm, | |
|
| double pitch, double
roll, double heading, double speed); | | double pitch, double
roll, double heading, double hspeed); | |
| | | | |
| /** | | /** | |
| * Draw the lightnings spawned by cumulo nimbus. | | * Draw the lightnings spawned by cumulo nimbus. | |
| */ | | */ | |
| void drawLightning(void); | | void drawLightning(void); | |
| | | | |
| /** | | /** | |
| * Forward the fog color used by the rain rendering. | | * Forward the fog color used by the rain rendering. | |
| * @param adj_fog_color color of the fog | | * @param adj_fog_color color of the fog | |
| */ | | */ | |
| | | | |
| skipping to change at line 189 | | skipping to change at line 209 | |
| /** | | /** | |
| * Enable or disable the use of proximity cloud turbulence. | | * Enable or disable the use of proximity cloud turbulence. | |
| * @param enable when true the turbulence is computed based on type of
cloud around the AC | | * @param enable when true the turbulence is computed based on type of
cloud around the AC | |
| */ | | */ | |
| void set_turbulence_enable_state(bool enable); | | void set_turbulence_enable_state(bool enable); | |
| | | | |
| // rain/snow | | // rain/snow | |
| float get_precipitation_density(void) const; | | float get_precipitation_density(void) const; | |
| bool get_precipitation_enable_state(void) const; | | bool get_precipitation_enable_state(void) const; | |
| | | | |
|
| | | /** | |
| | | * Decrease the precipitation density to the given percentage. | |
| | | * (Only show the given percentage of rain streaks etc.) | |
| | | * Default precipitation density upon construction is 100.0. | |
| | | * @param density 0.0 to 100.0 | |
| | | */ | |
| void set_precipitation_density(float density); | | void set_precipitation_density(float density); | |
| /** | | /** | |
| * Enable or disable the rendering of precipitation around the viewer. | | * Enable or disable the rendering of precipitation around the viewer. | |
| * @param enable when true we will draw precipitation depending on meta
r data | | * @param enable when true we will draw precipitation depending on meta
r data | |
| */ | | */ | |
| void set_precipitation_enable_state(bool enable); | | void set_precipitation_enable_state(bool enable); | |
| | | | |
| // others | | // others | |
| bool get_lightning_enable_state(void) const; | | bool get_lightning_enable_state(void) const; | |
| /** | | /** | |
| | | | |
End of changes. 9 change blocks. |
| 6 lines changed or deleted | | 35 lines changed or added | |
|
| xmlsound.hxx | | xmlsound.hxx | |
| | | | |
| skipping to change at line 19 | | skipping to change at line 19 | |
| // published by the Free Software Foundation; either version 2 of the | | // published by the Free Software Foundation; either version 2 of the | |
| // License, or (at your option) any later version. | | // License, or (at your option) any later version. | |
| // | | // | |
| // 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130
1, USA. | |
| // | | // | |
|
| // $Id: xmlsound.hxx,v 1.1 2004/04/24 19:02:30 curt Exp $ | | // $Id: xmlsound.hxx,v 1.3 2006-03-08 18:16:09 mfranz Exp $ | |
| | | | |
| /** | | /** | |
| * \file sound.hxx | | * \file sound.hxx | |
| * Provides a class to manage a single sound event including things | | * Provides a class to manage a single sound event including things | |
| * like looping, volume and pitch changes. | | * like looping, volume and pitch changes. | |
| */ | | */ | |
| | | | |
| #ifndef _SG_SOUND_HXX | | #ifndef _SG_SOUND_HXX | |
| #define _SG_SOUND_HXX 1 | | #define _SG_SOUND_HXX 1 | |
| | | | |
| | | | |
| skipping to change at line 122 | | skipping to change at line 122 | |
| void stop(); | | void stop(); | |
| | | | |
| protected: | | protected: | |
| | | | |
| enum { MAXPROP=5 }; | | enum { MAXPROP=5 }; | |
| enum { ONCE=0, LOOPED, IN_TRANSIT }; | | enum { ONCE=0, LOOPED, IN_TRANSIT }; | |
| enum { LEVEL=0, INVERTED, FLIPFLOP }; | | enum { LEVEL=0, INVERTED, FLIPFLOP }; | |
| | | | |
| // SGXmlSound properties | | // SGXmlSound properties | |
| typedef struct { | | typedef struct { | |
|
| SGPropertyNode * prop; | | SGPropertyNode_ptr prop; | |
| double (*fn)(double); | | double (*fn)(double); | |
| double *intern; | | double *intern; | |
| double factor; | | double factor; | |
| double offset; | | double offset; | |
| double min; | | double min; | |
| double max; | | double max; | |
| bool subtract; | | bool subtract; | |
| } _snd_prop; | | } _snd_prop; | |
| | | | |
| private: | | private: | |
| | | | |
| SGSoundMgr * _mgr; | | SGSoundMgr * _mgr; | |
|
| SGSoundSample * _sample; | | SGSharedPtr<SGSoundSample> _sample; | |
| | | | |
| SGCondition * _condition; | | SGCondition * _condition; | |
|
| SGPropertyNode * _property; | | SGPropertyNode_ptr _property; | |
| | | | |
| bool _active; | | bool _active; | |
| string _name; | | string _name; | |
| int _mode; | | int _mode; | |
| double _prev_value; | | double _prev_value; | |
| double _dt_play; | | double _dt_play; | |
| double _dt_stop; | | double _dt_stop; | |
| double _stopping; // time after the sound should have stopped. | | double _stopping; // time after the sound should have stopped. | |
| // This is usefull for lost packets in in-trasit mod
e. | | // This is usefull for lost packets in in-trasit mod
e. | |
| | | | |
| | | | |
End of changes. 5 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|
| zfstream.hxx | | zfstream.hxx | |
| | | | |
| skipping to change at line 21 | | skipping to change at line 21 | |
| // This library is free software; you can redistribute it and/or | | // This library is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU Library General Public | | // modify it under the terms of the GNU Library General Public | |
| // License as published by the Free Software Foundation; either | | // License as published by the Free Software Foundation; either | |
| // version 2 of the License, or (at your option) any later version. | | // version 2 of the License, or (at your option) any later version. | |
| // | | // | |
| // 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 General Public License | |
| // License along with this library; if not, write to the | | // along with this program; if not, write to the Free Software | |
| // Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130 | |
| // Boston, MA 02111-1307, USA. | | 1, USA. | |
| // | | // | |
|
| // $Id: zfstream.hxx,v 1.4 2004/03/12 08:59:12 ehofman Exp $ | | // $Id: zfstream.hxx,v 1.5 2006-03-08 18:16:08 mfranz Exp $ | |
| | | | |
| #ifndef _zfstream_hxx | | #ifndef _zfstream_hxx | |
| #define _zfstream_hxx | | #define _zfstream_hxx | |
| | | | |
| #include <simgear/compiler.h> | | #include <simgear/compiler.h> | |
| | | | |
| #include <zlib.h> | | #include <zlib.h> | |
| | | | |
| #ifdef SG_HAVE_STD_INCLUDES | | #ifdef SG_HAVE_STD_INCLUDES | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 5 lines changed or deleted | | 5 lines changed or added | |
|