noinst_LIBRARIES = libAircraft.a
-libAircraft_a_SOURCES = aircraft.c aircraft.h
+libAircraft_a_SOURCES = aircraft.cxx aircraft.hxx
INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
+++ /dev/null
-/**************************************************************************
- * aircraft.c -- various aircraft routines
- *
- * Written by Curtis Olson, started May 1997.
- *
- * Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- * (Log is kept at end of this file)
- **************************************************************************/
-
-
-#include <stdio.h>
-
-#include <Aircraft/aircraft.h>
-#include <Debug/fg_debug.h>
-#include <Include/fg_constants.h>
-
-/* This is a record containing all the info for the aircraft currently
- being operated */
-fgAIRCRAFT current_aircraft;
-
-
-/* Initialize an Aircraft structure */
-void fgAircraftInit( void ) {
- fgPrintf( FG_AIRCRAFT, FG_INFO, "Initializing Aircraft structure\n" );
-
- current_aircraft.flight = &cur_flight_params;
- current_aircraft.controls = &cur_control_params;
-}
-
-
-/* Display various parameters to stdout */
-void fgAircraftOutputCurrent(fgAIRCRAFT *a) {
- fgFLIGHT *f;
- fgCONTROLS *c;
-
- f = a->flight;
- c = a->controls;
-
- fgPrintf( FG_FLIGHT, FG_DEBUG,
- "Pos = (%.2f,%.2f,%.2f) (Phi,Theta,Psi)=(%.2f,%.2f,%.2f)\n",
- FG_Longitude * 3600.0 * RAD_TO_DEG,
- FG_Latitude * 3600.0 * RAD_TO_DEG,
- FG_Altitude, FG_Phi, FG_Theta, FG_Psi);
- fgPrintf( FG_FLIGHT, FG_DEBUG,
- "Kts = %.0f Elev = %.2f, Aileron = %.2f, Rudder = %.2f Power = %.2f\n",
- FG_V_equiv_kts, FG_Elevator, FG_Aileron, FG_Rudder, FG_Throttle[0]);
-}
-
-
-/* $Log$
-/* Revision 1.19 1998/04/25 22:06:24 curt
-/* Edited cvs log messages in source files ... bad bad bad!
-/*
- * Revision 1.18 1998/04/18 04:13:56 curt
- * Moved fg_debug.c to it's own library.
- *
- * Revision 1.17 1998/02/12 21:59:31 curt
- * Incorporated code changes contributed by Charlie Hotchkiss
- * <chotchkiss@namg.us.anritsu.com>
- *
- * Revision 1.16 1998/02/07 15:29:31 curt
- * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
- * <chotchkiss@namg.us.anritsu.com>
- *
- * Revision 1.15 1998/01/27 00:47:46 curt
- * Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
- * system and commandline/config file processing code.
- *
- * Revision 1.14 1998/01/19 19:26:56 curt
- * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
- * This should simplify things tremendously.
- *
- * Revision 1.13 1997/12/15 23:54:30 curt
- * Add xgl wrappers for debugging.
- * Generate terrain normals on the fly.
- *
- * Revision 1.12 1997/12/10 22:37:37 curt
- * Prepended "fg" on the name of all global structures that didn't have it yet.
- * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
- *
- * Revision 1.11 1997/09/13 02:00:05 curt
- * Mostly working on stars and generating sidereal time for accurate star
- * placement.
- *
- * Revision 1.10 1997/08/27 03:29:56 curt
- * Changed naming scheme of basic shared structures.
- *
- * Revision 1.9 1997/07/19 22:39:08 curt
- * Moved PI to ../constants.h
- *
- * Revision 1.8 1997/06/25 15:39:45 curt
- * Minor changes to compile with rsxnt/win32.
- *
- * Revision 1.7 1997/06/02 03:01:39 curt
- * Working on views (side, front, back, transitions, etc.)
- *
- * Revision 1.6 1997/05/31 19:16:26 curt
- * Elevator trim added.
- *
- * Revision 1.5 1997/05/30 19:30:14 curt
- * The LaRCsim flight model is starting to look like it is working.
- *
- * Revision 1.4 1997/05/30 03:54:11 curt
- * Made a bit more progress towards integrating the LaRCsim flight model.
- *
- * Revision 1.3 1997/05/29 22:39:56 curt
- * Working on incorporating the LaRCsim flight model.
- *
- * Revision 1.2 1997/05/23 15:40:29 curt
- * Added GNU copyright headers.
- *
- * Revision 1.1 1997/05/16 15:58:24 curt
- * Initial revision.
- *
- */
--- /dev/null
+/**************************************************************************
+ * aircraft.c -- various aircraft routines
+ *
+ * Written by Curtis Olson, started May 1997.
+ *
+ * Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id$
+ * (Log is kept at end of this file)
+ **************************************************************************/
+
+
+#include <stdio.h>
+
+#include "aircraft.hxx"
+#include <Debug/fg_debug.h>
+#include <Include/fg_constants.h>
+
+/* This is a record containing all the info for the aircraft currently
+ being operated */
+fgAIRCRAFT current_aircraft;
+
+
+/* Initialize an Aircraft structure */
+void fgAircraftInit( void ) {
+ fgPrintf( FG_AIRCRAFT, FG_INFO, "Initializing Aircraft structure\n" );
+
+ current_aircraft.flight = &cur_flight_params;
+ current_aircraft.controls = &cur_control_params;
+}
+
+
+/* Display various parameters to stdout */
+void fgAircraftOutputCurrent(fgAIRCRAFT *a) {
+ fgFLIGHT *f;
+ fgCONTROLS *c;
+
+ f = a->flight;
+ c = a->controls;
+
+ fgPrintf( FG_FLIGHT, FG_DEBUG,
+ "Pos = (%.2f,%.2f,%.2f) (Phi,Theta,Psi)=(%.2f,%.2f,%.2f)\n",
+ FG_Longitude * 3600.0 * RAD_TO_DEG,
+ FG_Latitude * 3600.0 * RAD_TO_DEG,
+ FG_Altitude, FG_Phi, FG_Theta, FG_Psi);
+ fgPrintf( FG_FLIGHT, FG_DEBUG,
+ "Kts = %.0f Elev = %.2f, Aileron = %.2f, Rudder = %.2f Power = %.2f\n",
+ FG_V_equiv_kts, FG_Elevator, FG_Aileron, FG_Rudder, FG_Throttle[0]);
+}
+
+
+/* $Log$
+/* Revision 1.1 1998/10/16 23:26:47 curt
+/* C++-ifying.
+/*
+ * Revision 1.19 1998/04/25 22:06:24 curt
+ * Edited cvs log messages in source files ... bad bad bad!
+ *
+ * Revision 1.18 1998/04/18 04:13:56 curt
+ * Moved fg_debug.c to it's own library.
+ *
+ * Revision 1.17 1998/02/12 21:59:31 curt
+ * Incorporated code changes contributed by Charlie Hotchkiss
+ * <chotchkiss@namg.us.anritsu.com>
+ *
+ * Revision 1.16 1998/02/07 15:29:31 curt
+ * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
+ * <chotchkiss@namg.us.anritsu.com>
+ *
+ * Revision 1.15 1998/01/27 00:47:46 curt
+ * Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
+ * system and commandline/config file processing code.
+ *
+ * Revision 1.14 1998/01/19 19:26:56 curt
+ * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+ * This should simplify things tremendously.
+ *
+ * Revision 1.13 1997/12/15 23:54:30 curt
+ * Add xgl wrappers for debugging.
+ * Generate terrain normals on the fly.
+ *
+ * Revision 1.12 1997/12/10 22:37:37 curt
+ * Prepended "fg" on the name of all global structures that didn't have it yet.
+ * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+ *
+ * Revision 1.11 1997/09/13 02:00:05 curt
+ * Mostly working on stars and generating sidereal time for accurate star
+ * placement.
+ *
+ * Revision 1.10 1997/08/27 03:29:56 curt
+ * Changed naming scheme of basic shared structures.
+ *
+ * Revision 1.9 1997/07/19 22:39:08 curt
+ * Moved PI to ../constants.h
+ *
+ * Revision 1.8 1997/06/25 15:39:45 curt
+ * Minor changes to compile with rsxnt/win32.
+ *
+ * Revision 1.7 1997/06/02 03:01:39 curt
+ * Working on views (side, front, back, transitions, etc.)
+ *
+ * Revision 1.6 1997/05/31 19:16:26 curt
+ * Elevator trim added.
+ *
+ * Revision 1.5 1997/05/30 19:30:14 curt
+ * The LaRCsim flight model is starting to look like it is working.
+ *
+ * Revision 1.4 1997/05/30 03:54:11 curt
+ * Made a bit more progress towards integrating the LaRCsim flight model.
+ *
+ * Revision 1.3 1997/05/29 22:39:56 curt
+ * Working on incorporating the LaRCsim flight model.
+ *
+ * Revision 1.2 1997/05/23 15:40:29 curt
+ * Added GNU copyright headers.
+ *
+ * Revision 1.1 1997/05/16 15:58:24 curt
+ * Initial revision.
+ *
+ */
+++ /dev/null
-/**************************************************************************
- * aircraft.h -- define shared aircraft parameters
- *
- * Written by Curtis Olson, started May 1997.
- *
- * Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- * (Log is kept at end of this file)
- **************************************************************************/
-
-
-#ifndef _AIRCRAFT_H
-#define _AIRCRAFT_H
-
-
-#include <Flight/flight.h>
-#include <Controls/controls.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* Define a structure containing all the parameters for an aircraft */
-typedef struct{
- fgFLIGHT *flight;
- fgCONTROLS *controls;
-} fgAIRCRAFT ;
-
-
-/* current_aircraft contains all the parameters of the aircraft
- currently being operated. */
-extern fgAIRCRAFT current_aircraft;
-
-
-/* Initialize an Aircraft structure */
-void fgAircraftInit( void );
-
-
-/* Display various parameters to stdout */
-void fgAircraftOutputCurrent(fgAIRCRAFT *a);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _AIRCRAFT_H */
-
-
-/* $Log$
-/* Revision 1.12 1998/04/22 13:26:15 curt
-/* C++ - ifing the code a bit.
-/*
- * Revision 1.11 1998/04/21 17:02:27 curt
- * Prepairing for C++ integration.
- *
- * Revision 1.10 1998/02/07 15:29:32 curt
- * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
- * <chotchkiss@namg.us.anritsu.com>
- *
- * Revision 1.9 1998/01/22 02:59:23 curt
- * Changed #ifdef FILE_H to #ifdef _FILE_H
- *
- * Revision 1.8 1998/01/19 19:26:57 curt
- * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
- * This should simplify things tremendously.
- *
- * Revision 1.7 1997/12/10 22:37:38 curt
- * Prepended "fg"AIRCRAFT_H */
-
-
-/* $Log$
-/* Revision 1.12 1998/04/22 13:26:15 curt
-/* C++ - ifing the code a bit.
-/*
- * Revision 1.11 1998/04/21 17:02:27 curt
- * Prepairing for C++ integration.
- *
- * Revision 1.10 1998/02/07 15:29:32 curt
- * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
- * <chotchkiss@namg.us.anritsu.com>
- *
- * Revision 1.9 1998/01/22 02:59:23 curt
- * Changed #ifdef FILE_H to #ifdef _FILE_H
- *
- * Revision 1.8 1998/01/19 19:26:57 curt
- * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
- * This should simplify things tremendously.
- *
- * Revision 1.7 1997/12/10 22:37:38 curt
- * Prepended "fg" on the name of all global structures that didn't have it yet.
- * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
- *
- * Revision 1.6 1997/09/13 02:00:06 curt
- * Mostly working on stars and generating sidereal time for accurate star
- * placement.
- *
- * Revision 1.5 1997/08/27 03:29:58 curt
- * Changed naming scheme of basic shared structures.
- *
- * Revision 1.4 1997/07/23 21:52:17 curt
- * Put comments around the text after an #endif for increased portability.
- *
- * Revision 1.3 1997/06/21 17:12:42 curt
- * Capitalized subdirectory names.
- *
- * Revision 1.2 1997/05/23 15:40:30 curt
- * Added GNU copyright headers.
- *
- * Revision 1.1 1997/05/16 15:58:25 curt
- * Initial revision.
- *
- */
--- /dev/null
+/**************************************************************************
+ * aircraft.h -- define shared aircraft parameters
+ *
+ * Written by Curtis Olson, started May 1997.
+ *
+ * Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id$
+ * (Log is kept at end of this file)
+ **************************************************************************/
+
+
+#ifndef _AIRCRAFT_H
+#define _AIRCRAFT_H
+
+
+#ifndef __cplusplus
+# error This library requires C++
+#endif
+
+
+#include <Flight/flight.hxx>
+#include <Controls/controls.h>
+
+
+/* Define a structure containing all the parameters for an aircraft */
+typedef struct{
+ fgFLIGHT *flight;
+ fgCONTROLS *controls;
+} fgAIRCRAFT ;
+
+
+/* current_aircraft contains all the parameters of the aircraft
+ currently being operated. */
+extern fgAIRCRAFT current_aircraft;
+
+
+/* Initialize an Aircraft structure */
+void fgAircraftInit( void );
+
+
+/* Display various parameters to stdout */
+void fgAircraftOutputCurrent(fgAIRCRAFT *a);
+
+
+#endif /* _AIRCRAFT_H */
+
+
+/* $Log$
+/* Revision 1.1 1998/10/16 23:26:49 curt
+/* C++-ifying.
+/*
+ * Revision 1.12 1998/04/22 13:26:15 curt
+ * C++ - ifing the code a bit.
+ *
+ * Revision 1.11 1998/04/21 17:02:27 curt
+ * Prepairing for C++ integration.
+ *
+ * Revision 1.10 1998/02/07 15:29:32 curt
+ * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
+ * <chotchkiss@namg.us.anritsu.com>
+ *
+ * Revision 1.9 1998/01/22 02:59:23 curt
+ * Changed #ifdef FILE_H to #ifdef _FILE_H
+ *
+ * Revision 1.8 1998/01/19 19:26:57 curt
+ * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+ * This should simplify things tremendously.
+ *
+ * Revision 1.7 1997/12/10 22:37:38 curt
+ * Prepended "fg"AIRCRAFT_H */
+
+
+/* $Log$
+/* Revision 1.1 1998/10/16 23:26:49 curt
+/* C++-ifying.
+/*
+ * Revision 1.12 1998/04/22 13:26:15 curt
+ * C++ - ifing the code a bit.
+ *
+ * Revision 1.11 1998/04/21 17:02:27 curt
+ * Prepairing for C++ integration.
+ *
+ * Revision 1.10 1998/02/07 15:29:32 curt
+ * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
+ * <chotchkiss@namg.us.anritsu.com>
+ *
+ * Revision 1.9 1998/01/22 02:59:23 curt
+ * Changed #ifdef FILE_H to #ifdef _FILE_H
+ *
+ * Revision 1.8 1998/01/19 19:26:57 curt
+ * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+ * This should simplify things tremendously.
+ *
+ * Revision 1.7 1997/12/10 22:37:38 curt
+ * Prepended "fg" on the name of all global structures that didn't have it yet.
+ * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+ *
+ * Revision 1.6 1997/09/13 02:00:06 curt
+ * Mostly working on stars and generating sidereal time for accurate star
+ * placement.
+ *
+ * Revision 1.5 1997/08/27 03:29:58 curt
+ * Changed naming scheme of basic shared structures.
+ *
+ * Revision 1.4 1997/07/23 21:52:17 curt
+ * Put comments around the text after an #endif for increased portability.
+ *
+ * Revision 1.3 1997/06/21 17:12:42 curt
+ * Capitalized subdirectory names.
+ *
+ * Revision 1.2 1997/05/23 15:40:30 curt
+ * Added GNU copyright headers.
+ *
+ * Revision 1.1 1997/05/16 15:58:25 curt
+ * Initial revision.
+ *
+ */
#include <Debug/fg_debug.h>
// #include <Include/fg_types.h>
-#include <Math/fg_geodesy.h>
+#include <Math/fg_geodesy.hxx>
#include <Math/mat3.h>
#include <Math/point3d.hxx>
#include <Math/polar3d.hxx>
*/
-// convert a geodetic point lon(radians), lat(radians), elev(meter) to
-// a cartesian point
-static Point3D geod_to_cart(const Point3D& geod) {
- Point3D cp;
- Point3D pp;
- double gc_lon, gc_lat, sl_radius;
-
- // printf("A geodetic point is (%.2f, %.2f, %.2f)\n",
- // geod[0], geod[1], geod[2]);
-
- gc_lon = geod.lon();
- fgGeodToGeoc(geod.lat(), geod.radius(), &sl_radius, &gc_lat);
-
- // printf("A geocentric point is (%.2f, %.2f, %.2f)\n", gc_lon,
- // gc_lat, sl_radius+geod[2]);
-
- pp.setvals(gc_lon, gc_lat, sl_radius + geod.radius());
- cp = fgPolarToCart3d(pp);
-
- // printf("A cart point is (%.8f, %.8f, %.8f)\n", cp.x, cp.y, cp.z);
-
- return(cp);
-}
-
#define FG_APT_BASE_TEX_CONSTANT 2000.0
#ifdef OLD_TEX_COORDS
// first point on perimeter
const_iterator current = perimeter.begin();
- cart = geod_to_cart( *current );
+ cart = fgGeodToCart( *current );
cart_trans = cart - t->center;
t->nodes[t->ncount][0] = cart_trans.x();
t->nodes[t->ncount][1] = cart_trans.y();
const_iterator last = perimeter.end();
for ( ; current != last; ++current ) {
- cart = geod_to_cart( *current );
+ cart = fgGeodToCart( *current );
cart_trans = cart - t->center;
t->nodes[t->ncount][0] = cart_trans.x();
t->nodes[t->ncount][1] = cart_trans.y();
// last point (first point in perimeter list)
current = perimeter.begin();
- cart = geod_to_cart( *current );
+ cart = fgGeodToCart( *current );
cart_trans = cart - t->center;
fragment.add_face(center_num, i - 1, 1);
// $Log$
+// Revision 1.5 1998/10/16 23:27:14 curt
+// C++-ifying.
+//
// Revision 1.4 1998/10/16 00:51:46 curt
// Converted to Point3D class.
//
* $Id$
* (Log is kept at end of this file)
**************************************************************************/
-#include <Flight/flight.h>
+#include <Flight/flight.hxx>
#include <string.h>
#include "moon.hxx"
#ifndef _MOON_HXX_
#define _MOON_HXX_
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
#include <Include/general.h>
-/**************************************************************************
- * sky.c -- model sky with an upside down "bowl"
- *
- * Written by Curtis Olson, started December 1997.
- *
- * Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- * (Log is kept at end of this file)
- **************************************************************************/
+// sky.cxx -- model sky with an upside down "bowl"
+//
+// Written by Curtis Olson, started December 1997.
+//
+// Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// $Id$
+// (Log is kept at end of this file)
#ifdef HAVE_CONFIG_H
#include <GL/glut.h>
#include <XGL/xgl.h>
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
#include <Debug/fg_debug.h>
-#include <Flight/flight.h>
+#include <Flight/flight.hxx>
#include <Include/fg_constants.h>
#include <Main/views.hxx>
#include <Math/fg_random.h>
#include "sky.hxx"
-/*
-#include <Include/general.h>
-*/
-
-/* in meters of course */
+// in meters of course
#define CENTER_ELEV 25000.0
#define INNER_RADIUS 50000.0
static float outer_color[12][4];
-/* Calculate the sky structure vertices */
+// Calculate the sky structure vertices
void fgSkyVerticesInit( void ) {
float theta;
int i;
inner_vertex[i][1] = sin(theta) * INNER_RADIUS;
inner_vertex[i][2] = INNER_ELEV;
- /* printf(" %.2f %.2f\n", cos(theta) * INNER_RADIUS,
- sin(theta) * INNER_RADIUS); */
+ // printf(" %.2f %.2f\n", cos(theta) * INNER_RADIUS,
+ // sin(theta) * INNER_RADIUS);
middle_vertex[i][0] = cos((double)theta) * MIDDLE_RADIUS;
middle_vertex[i][1] = sin((double)theta) * MIDDLE_RADIUS;
}
-/* (Re)calculate the sky colors at each vertex */
+// (Re)calculate the sky colors at each vertex
void fgSkyColorsInit( void ) {
fgLIGHT *l;
double sun_angle, diff;
fgPrintf( FG_ASTRO, FG_INFO,
" Generating the sky colors for each vertex.\n" );
- /* setup for the possibility of sunset effects */
+ // setup for the possibility of sunset effects
sun_angle = l->sun_angle * RAD_TO_DEG;
// fgPrintf( FG_ASTRO, FG_INFO,
// " Sun angle in degrees = %.2f\n", sun_angle);
if ( (sun_angle > 80.0) && (sun_angle < 100.0) ) {
- /* 0.0 - 0.4 */
+ // 0.0 - 0.4
outer_param[0] = (10.0 - fabs(90.0 - sun_angle)) / 25.0;
outer_param[1] = (10.0 - fabs(90.0 - sun_angle)) / 35.0;
outer_param[2] = 0.0;
outer_diff[0] = outer_diff[1] = outer_diff[2] = 0.0;
middle_diff[0] = middle_diff[1] = middle_diff[2] = 0.0;
}
- /* printf(" outer_red_param = %.2f outer_red_diff = %.2f\n",
- outer_red_param, outer_red_diff); */
+ // printf(" outer_red_param = %.2f outer_red_diff = %.2f\n",
+ // outer_red_param, outer_red_diff);
- /* calculate transition colors between sky and fog */
+ // calculate transition colors between sky and fog
for ( j = 0; j < 3; j++ ) {
outer_amt[j] = outer_param[j];
middle_amt[j] = middle_param[j];
for ( j = 0; j < 3; j++ ) {
diff = l->sky_color[j] - l->fog_color[j];
- /* printf("sky = %.2f fog = %.2f diff = %.2f\n",
- l->sky_color[j], l->fog_color[j], diff); */
+ // printf("sky = %.2f fog = %.2f diff = %.2f\n",
+ // l->sky_color[j], l->fog_color[j], diff);
inner_color[i][j] = l->sky_color[j] - diff * 0.3;
middle_color[i][j] = l->sky_color[j] - diff * 0.9 + middle_amt[j];
for ( j = 0; j < 3; j++ ) {
diff = l->sky_color[j] - l->fog_color[j];
- /* printf("sky = %.2f fog = %.2f diff = %.2f\n",
- l->sky_color[j], l->fog_color[j], diff); */
+ // printf("sky = %.2f fog = %.2f diff = %.2f\n",
+ // l->sky_color[j], l->fog_color[j], diff);
inner_color[i][j] = l->sky_color[j] - diff * 0.3;
middle_color[i][j] = l->sky_color[j] - diff * 0.9 + middle_amt[j];
}
-/* Initialize the sky structure and colors */
+// Initialize the sky structure and colors
void fgSkyInit( void ) {
fgPrintf(FG_ASTRO, FG_INFO, "Initializing the sky\n");
fgSkyVerticesInit();
- /* regester fgSkyColorsInit() as an event to be run periodically */
+ // regester fgSkyColorsInit() as an event to be run periodically
global_events.Register( "fgSkyColorsInit()", fgSkyColorsInit,
fgEVENT::FG_EVENT_READY, 30000);
}
-/* Draw the Sky */
+// Draw the Sky
void fgSkyRender( void ) {
fgFLIGHT *f;
fgLIGHT *l;
l = &cur_light_params;
v = ¤t_view;
- /* printf("Rendering the sky.\n"); */
+ // printf("Rendering the sky.\n");
// calculate the proper colors
for ( i = 0; i < 3; i++ ) {
diff = l->sky_color[i] - l->adj_fog_color[i];
- /* printf("sky = %.2f fog = %.2f diff = %.2f\n",
- l->sky_color[j], l->adj_fog_color[j], diff); */
+ // printf("sky = %.2f fog = %.2f diff = %.2f\n",
+ // l->sky_color[j], l->adj_fog_color[j], diff);
inner_color[i] = l->sky_color[i] - diff * 0.3;
middle_color[i] = l->sky_color[i] - diff * 0.9;
xglPushMatrix();
- /* Translate to view position */
+ // Translate to view position
xglTranslatef( v->cur_zero_elev.x(),
v->cur_zero_elev.y(),
v->cur_zero_elev.z() );
- /* printf(" Translated to %.2f %.2f %.2f\n",
- v->cur_zero_elev.x, v->cur_zero_elev.y, v->cur_zero_elev.z ); */
+ // printf(" Translated to %.2f %.2f %.2f\n",
+ // v->cur_zero_elev.x, v->cur_zero_elev.y, v->cur_zero_elev.z );
- /* Rotate to proper orientation */
- /* printf(" lon = %.2f lat = %.2f\n", FG_Longitude * RAD_TO_DEG,
- FG_Latitude * RAD_TO_DEG); */
+ // Rotate to proper orientation
+ // printf(" lon = %.2f lat = %.2f\n", FG_Longitude * RAD_TO_DEG,
+ // FG_Latitude * RAD_TO_DEG);
xglRotatef( FG_Longitude * RAD_TO_DEG, 0.0, 0.0, 1.0 );
xglRotatef( 90.0 - FG_Latitude * RAD_TO_DEG, 0.0, 1.0, 0.0 );
xglRotatef( l->sun_rotation * RAD_TO_DEG, 0.0, 0.0, 1.0 );
- /* Draw inner/center section of sky*/
+ // Draw inner/center section of sky*/
xglBegin( GL_TRIANGLE_FAN );
xglColor4fv(l->sky_color);
xglVertex3f(0.0, 0.0, CENTER_ELEV);
xglBegin( GL_TRIANGLE_STRIP );
for ( i = 0; i < 12; i++ ) {
xglColor4fv( middle_color );
- /* printf("middle_color[%d] = %.2f %.2f %.2f %.2f\n", i,
- middle_color[i][0], middle_color[i][1], middle_color[i][2],
- middle_color[i][3]); */
+ // printf("middle_color[%d] = %.2f %.2f %.2f %.2f\n", i,
+ // middle_color[i][0], middle_color[i][1], middle_color[i][2],
+ // middle_color[i][3]);
// xglColor4f(1.0, 0.0, 0.0, 1.0);
xglVertex3fv( middle_vertex[i] );
xglColor4fv( inner_color );
- /* printf("inner_color[%d] = %.2f %.2f %.2f %.2f\n", i,
- inner_color[i][0], inner_color[i][1], inner_color[i][2],
- inner_color[i][3]); */
+ // printf("inner_color[%d] = %.2f %.2f %.2f %.2f\n", i,
+ // inner_color[i][0], inner_color[i][1], inner_color[i][2],
+ // inner_color[i][3]);
// xglColor4f(0.0, 0.0, 1.0, 1.0);
xglVertex3fv( inner_vertex[i] );
}
xglVertex3fv( inner_vertex[0] );
xglEnd();
- /* Draw the outer ring */
+ // Draw the outer ring
xglBegin( GL_TRIANGLE_STRIP );
for ( i = 0; i < 12; i++ ) {
xglColor4fv( outer_color );
xglVertex3fv( middle_vertex[0] );
xglEnd();
- /* Draw the bottom skirt */
+ // Draw the bottom skirt
xglBegin( GL_TRIANGLE_STRIP );
xglColor4fv( outer_color );
for ( i = 0; i < 12; i++ ) {
}
-/* $Log$
-/* Revision 1.11 1998/10/16 00:52:19 curt
-/* Converted to Point3D class.
-/*
- * Revision 1.10 1998/08/29 13:07:16 curt
- * Rewrite of event manager thanks to Bernie Bright.
- *
- * Revision 1.9 1998/08/22 01:18:59 curt
- * Minor tweaks to avoid using unitialized memory.
- *
- * Revision 1.8 1998/08/12 21:40:44 curt
- * Sky now tracks adjusted fog color so it blends well with terrain.
- *
- * Revision 1.7 1998/07/22 21:39:21 curt
- * Lower skirt tracks adjusted fog color, not fog color.
- *
- * Revision 1.6 1998/05/23 14:07:14 curt
- * Use new C++ events class.
- *
- * Revision 1.5 1998/04/28 01:19:02 curt
- * Type-ified fgTIME and fgVIEW
- *
- * Revision 1.4 1998/04/26 05:10:01 curt
- * "struct fgLIGHT" -> "fgLIGHT" because fgLIGHT is typedef'd.
- *
- * Revision 1.3 1998/04/25 22:06:25 curt
- * Edited cvs log messages in source files ... bad bad bad!
- *
- * Revision 1.2 1998/04/24 00:45:03 curt
- * Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
- * Fixed a bug when generating sky colors.
- *
- * Revision 1.1 1998/04/22 13:21:32 curt
- * C++ - ifing the code a bit.
- *
- * Revision 1.9 1998/04/03 21:52:50 curt
- * Converting to Gnu autoconf system.
- *
- * Revision 1.8 1998/03/09 22:47:25 curt
- * Incorporated Durk's updates.
- *
- * Revision 1.7 1998/02/19 13:05:49 curt
- * Incorporated some HUD tweaks from Michelle America.
- * Tweaked the sky's sunset/rise colors.
- * Other misc. tweaks.
- *
- * Revision 1.6 1998/02/07 15:29:32 curt
- * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
- * <chotchkiss@namg.us.anritsu.com>
- *
- * Revision 1.5 1998/01/27 00:47:48 curt
- * Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
- * system and commandline/config file processing code.
- *
- * Revision 1.4 1998/01/26 15:54:28 curt
- * Added a "skirt" to try to help hide gaps between scenery and sky. This will
- * have to be revisited in the future.
- *
- * Revision 1.3 1998/01/19 19:26:59 curt
- * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
- * This should simplify things tremendously.
- *
- * Revision 1.2 1998/01/19 18:40:17 curt
- * Tons of little changes to clean up the code and to remove fatal errors
- * when building with the c++ compiler.
- *
- * Revision 1.1 1998/01/07 03:16:19 curt
- * Moved from .../Src/Scenery/ to .../Src/Astro/
- *
- * Revision 1.11 1997/12/30 22:22:38 curt
- * Further integration of event manager.
- *
- * Revision 1.10 1997/12/30 20:47:53 curt
- * Integrated new event manager with subsystem initializations.
- *
- * Revision 1.9 1997/12/30 13:06:57 curt
- * A couple lighting tweaks ...
- *
- * Revision 1.8 1997/12/23 04:58:38 curt
- * Tweaked the sky coloring a bit to build in structures to allow finer rgb
- * control.
- *
- * Revision 1.7 1997/12/22 23:45:48 curt
- * First stab at sunset/sunrise sky glow effects.
- *
- * Revision 1.6 1997/12/22 04:14:34 curt
- * Aligned sky with sun so dusk/dawn effects can be correct relative to the sun.
- *
- * Revision 1.5 1997/12/19 23:34:59 curt
- * Lot's of tweaking with sky rendering and lighting.
- *
- * Revision 1.4 1997/12/19 16:45:02 curt
- * Working on scene rendering order and options.
- *
- * Revision 1.3 1997/12/18 23:32:36 curt
- * First stab at sky dome actually starting to look reasonable. :-)
- *
- * Revision 1.2 1997/12/18 04:07:03 curt
- * Worked on properly translating and positioning the sky dome.
- *
- * Revision 1.1 1997/12/17 23:14:30 curt
- * Initial revision.
- * Begin work on rendering the sky. (Rather than just using a clear screen.)
- *
- */
+// $Log$
+// Revision 1.12 1998/10/16 23:27:18 curt
+// C++-ifying.
+//
+// Revision 1.11 1998/10/16 00:52:19 curt
+// Converted to Point3D class.
+//
+// Revision 1.10 1998/08/29 13:07:16 curt
+// Rewrite of event manager thanks to Bernie Bright.
+//
+// Revision 1.9 1998/08/22 01:18:59 curt
+// Minor tweaks to avoid using unitialized memory.
+//
+// Revision 1.8 1998/08/12 21:40:44 curt
+// Sky now tracks adjusted fog color so it blends well with terrain.
+//
+// Revision 1.7 1998/07/22 21:39:21 curt
+// Lower skirt tracks adjusted fog color, not fog color.
+//
+// Revision 1.6 1998/05/23 14:07:14 curt
+// Use new C++ events class.
+//
+// Revision 1.5 1998/04/28 01:19:02 curt
+// Type-ified fgTIME and fgVIEW
+//
+// Revision 1.4 1998/04/26 05:10:01 curt
+// "struct fgLIGHT" -> "fgLIGHT" because fgLIGHT is typedef'd.
+//
+// Revision 1.3 1998/04/25 22:06:25 curt
+// Edited cvs log messages in source files ... bad bad bad!
+//
+// Revision 1.2 1998/04/24 00:45:03 curt
+// Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
+// Fixed a bug when generating sky colors.
+//
+// Revision 1.1 1998/04/22 13:21:32 curt
+// C++ - ifing the code a bit.
+//
+// Revision 1.9 1998/04/03 21:52:50 curt
+// Converting to Gnu autoconf system.
+//
+// Revision 1.8 1998/03/09 22:47:25 curt
+// Incorporated Durk's updates.
+//
+// Revision 1.7 1998/02/19 13:05:49 curt
+// Incorporated some HUD tweaks from Michelle America.
+// Tweaked the sky's sunset/rise colors.
+// Other misc. tweaks.
+//
+// Revision 1.6 1998/02/07 15:29:32 curt
+// Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
+// <chotchkiss@namg.us.anritsu.com>
+//
+// Revision 1.5 1998/01/27 00:47:48 curt
+// Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
+// system and commandline/config file processing code.
+//
+// Revision 1.4 1998/01/26 15:54:28 curt
+// Added a "skirt" to try to help hide gaps between scenery and sky. This will
+// have to be revisited in the future.
+//
+// Revision 1.3 1998/01/19 19:26:59 curt
+// Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+// This should simplify things tremendously.
+//
+// Revision 1.2 1998/01/19 18:40:17 curt
+// Tons of little changes to clean up the code and to remove fatal errors
+// when building with the c++ compiler.
+//
+// Revision 1.1 1998/01/07 03:16:19 curt
+// Moved from .../Src/Scenery/ to .../Src/Astro/
+//
+// Revision 1.11 1997/12/30 22:22:38 curt
+// Further integration of event manager.
+//
+// Revision 1.10 1997/12/30 20:47:53 curt
+// Integrated new event manager with subsystem initializations.
+//
+// Revision 1.9 1997/12/30 13:06:57 curt
+// A couple lighting tweaks ...
+//
+// Revision 1.8 1997/12/23 04:58:38 curt
+// Tweaked the sky coloring a bit to build in structures to allow finer rgb
+// control.
+//
+// Revision 1.7 1997/12/22 23:45:48 curt
+// First stab at sunset/sunrise sky glow effects.
+//
+// Revision 1.6 1997/12/22 04:14:34 curt
+// Aligned sky with sun so dusk/dawn effects can be correct relative to the sun.
+//
+// Revision 1.5 1997/12/19 23:34:59 curt
+// Lot's of tweaking with sky rendering and lighting.
+//
+// Revision 1.4 1997/12/19 16:45:02 curt
+// Working on scene rendering order and options.
+//
+// Revision 1.3 1997/12/18 23:32:36 curt
+// First stab at sky dome actually starting to look reasonable. :-)
+//
+// Revision 1.2 1997/12/18 04:07:03 curt
+// Worked on properly translating and positioning the sky dome.
+//
+// Revision 1.1 1997/12/17 23:14:30 curt
+// Initial revision.
+// Begin work on rendering the sky. (Rather than just using a clear screen.)
+//
+
-/**************************************************************************
- * sky.hxx -- model sky with an upside down "bowl"
- *
- * Written by Curtis Olson, started December 1997.
- *
- * Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- * (Log is kept at end of this file)
- **************************************************************************/
+// sky.hxx -- model sky with an upside down "bowl"
+//
+// Written by Curtis Olson, started December 1997.
+//
+// Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// $Id$
+// (Log is kept at end of this file)
#ifndef _SKY_HXX
#endif
-/* (Re)generate the display list */
+// (Re)generate the display list
void fgSkyInit( void );
-/* (Re)calculate the sky colors at each vertex */
+// (Re)calculate the sky colors at each vertex
void fgSkyColorsInit( void );
-/* Draw the Sky */
+// Draw the Sky
void fgSkyRender( void );
-#endif /* _SKY_HXX */
+#endif // _SKY_HXX
-/* $Log$
-/* Revision 1.1 1998/04/22 13:21:33 curt
-/* C++ - ifing the code a bit.
-/*
- * Revision 1.4 1998/04/21 17:02:32 curt
- * Prepairing for C++ integration.
- *
- * Revision 1.3 1998/01/22 02:59:28 curt
- * Changed #ifdef FILE_H to #ifdef _FILE_H
- *
- * Revision 1.2 1998/01/19 18:40:17 curt
- * Tons of little changes to clean up the code and to remove fatal errors
- * when building with the c++ compiler.
- *
- * Revision 1.1 1998/01/07 03:16:19 curt
- * Moved from .../Src/Scenery/ to .../Src/Astro/
- *
- * Revision 1.2 1997/12/22 23:45:49 curt
- * First stab at sunset/sunrise sky glow effects.
- *
- * Revision 1.1 1997/12/17 23:14:31 curt
- * Initial revision.
- * Begin work on rendering the sky. (Rather than just using a clear screen.)
- *
- */
+// $Log$
+// Revision 1.2 1998/10/16 23:27:19 curt
+// C++-ifying.
+//
+// Revision 1.1 1998/04/22 13:21:33 curt
+// C++ - ifing the code a bit.
+//
+// Revision 1.4 1998/04/21 17:02:32 curt
+// Prepairing for C++ integration.
+//
+// Revision 1.3 1998/01/22 02:59:28 curt
+// Changed #ifdef FILE_H to #ifdef _FILE_H
+//
+// Revision 1.2 1998/01/19 18:40:17 curt
+// Tons of little changes to clean up the code and to remove fatal errors
+// when building with the c++ compiler.
+//
+// Revision 1.1 1998/01/07 03:16:19 curt
+// Moved from .../Src/Scenery/ to .../Src/Astro/
+//
+// Revision 1.2 1997/12/22 23:45:49 curt
+// First stab at sunset/sunrise sky glow effects.
+//
+// Revision 1.1 1997/12/17 23:14:31 curt
+// Initial revision.
+// Begin work on rendering the sky. (Rather than just using a clear screen.)
+//
#include <GL/glut.h>
#include <XGL/xgl.h>
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
#include <Misc/fgstream.hxx>
// $Log$
+// Revision 1.19 1998/10/16 23:27:21 curt
+// C++-ifying.
+//
// Revision 1.18 1998/10/16 00:52:20 curt
// Converted to Point3D class.
//
#define _AUTOPILOT_H
-#include <Aircraft/aircraft.h>
-#include <Flight/flight.h>
+#include <Aircraft/aircraft.hxx>
+#include <Flight/flight.hxx>
#include <Controls/controls.h>
#include <stdio.h>
#include <string.h>
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
#include <Include/general.h>
// $Log$
+// Revision 1.18 1998/10/16 23:27:23 curt
+// C++-ifying.
+//
// Revision 1.17 1998/09/29 14:56:30 curt
// c++-ified comments.
//
# include <values.h> // for MAXINT
#endif
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
#include <Main/options.hxx>
}
// $Log$
+// Revision 1.24 1998/10/16 23:27:25 curt
+// C++-ifying.
+//
// Revision 1.23 1998/10/16 00:53:00 curt
// Mods to display a bit more info when mini-hud is active.
//
#include <fg_typedefs.h>
#include <fg_constants.h>
-#include <Aircraft/aircraft.h>
-#include <Flight/flight.h>
+#include <Aircraft/aircraft.hxx>
+#include <Flight/flight.hxx>
#include <Controls/controls.h>
#include <deque> // STL double ended queue
#endif // _HUD_H
// $Log$
+// Revision 1.15 1998/10/16 23:27:27 curt
+// C++-ifying.
+//
// Revision 1.14 1998/09/29 14:56:33 curt
// c++-ified comments.
//
#endif
#include <stdlib.h>
#include <string.h>
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
#include <Math/fg_random.h>
#endif
#include <stdlib.h>
#include <string.h>
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
#include <Math/fg_random.h>
#endif
#include <stdlib.h>
#include <string.h>
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
#include <Math/fg_random.h>
#include <stdlib.h>
#include <string.h>
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
#include <Math/fg_random.h>
#endif
#include <stdlib.h>
#include <string.h>
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
#include <Math/fg_random.h>
#endif
#include <stdlib.h>
#include <string.h>
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
#include <Math/fg_random.h>
#endif
#include <stdlib.h>
#include <string.h>
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
#include <Math/fg_random.h>
#endif
#include <stdlib.h>
#include <string.h>
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
#include <Debug/fg_debug.h>
#include <Include/fg_constants.h>
#include <Math/fg_random.h>
#include <string>
#include <math.h>
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
#include <Debug/fg_debug.h>
#include <Main/options.hxx>
#include <Main/views.hxx>
/* $Log$
-/* Revision 1.7 1998/08/31 20:45:31 curt
-/* Tweaks from Friedemann.
+/* Revision 1.8 1998/10/16 23:27:37 curt
+/* C++-ifying.
/*
+ * Revision 1.7 1998/08/31 20:45:31 curt
+ * Tweaks from Friedemann.
+ *
* Revision 1.6 1998/08/28 18:14:40 curt
* Added new cockpit code from Friedemann Reinhard
* <mpt218@faupt212.physik.uni-erlangen.de>
noinst_LIBRARIES = libFlight.a
-libFlight_a_SOURCES = flight.cxx flight.hxx
+libFlight_a_SOURCES = flight.cxx flight.hxx LaRCsim.cxx LaRCsim.hxx
INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
#include <stdio.h>
+#include "flight.hxx"
+#include "LaRCsim.hxx"
+
#include <Debug/fg_debug.h>
-#include <Flight/flight.h>
#include <Flight/LaRCsim/ls_interface.h>
#include <Include/fg_constants.h>
-#include <Math/fg_geodesy.h>
+#include <Math/fg_geodesy.hxx>
fgFLIGHT cur_flight_params;
/* Set the altitude (force) */
-int fgFlightModelSetAltitude(int model, fgFLIGHT *f, double alt_meters) {
+void fgFlightModelSetAltitude(int model, fgFLIGHT *f, double alt_meters) {
double sea_level_radius_meters;
double lat_geoc;
// Set the FG variables first
// $Log$
+// Revision 1.2 1998/10/16 23:27:40 curt
+// C++-ifying.
+//
// Revision 1.1 1998/10/16 20:16:41 curt
// Renamed flight.[ch] to flight.[ch]xx
//
#define _FLIGHT_H
-#include <Flight/Slew/slew.h>
+#include <Flight/Slew/slew.hxx>
-#ifdef __cplusplus
-extern "C" {
+#ifndef __cplusplus
+# error This library requires C++
#endif
int fgFlightModelUpdate(int model, fgFLIGHT *f, int multiloop);
/* Set the altitude (force) */
-int fgFlightModelSetAltitude(int model, fgFLIGHT *f, double alt_meters);
-
-
-#ifdef __cplusplus
-}
-#endif
+void fgFlightModelSetAltitude(int model, fgFLIGHT *f, double alt_meters);
#endif /* _FLIGHT_H */
// $Log$
+// Revision 1.2 1998/10/16 23:27:41 curt
+// C++-ifying.
+//
// Revision 1.1 1998/10/16 20:16:44 curt
// Renamed flight.[ch] to flight.[ch]xx
//
#define _LS_GENERIC_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include "ls_types.h"
+
+
typedef struct {
/*================== Mass properties and geometry values ==================*/
extern GENERIC generic_; /* usually defined in ls_main.c */
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _LS_GENERIC_H */
#include "ls_model.h"
#include "ls_init.h"
-#include <Flight/flight.h>
-#include <Aircraft/aircraft.h>
-#include <Debug/fg_debug.h>
+// #include <Flight/flight.h>
+// #include <Aircraft/aircraft.h>
+// #include <Debug/fg_debug.h>
/* global variable declarations */
int ls_cockpit( void ) {
- fgCONTROLS *c;
+ // fgCONTROLS *c;
sim_control_.paused = 0;
- c = current_aircraft.controls;
+ // c = current_aircraft.controls;
- Lat_control = FG_Aileron;
- Long_control = FG_Elevator;
- Long_trim = FG_Elev_Trim;
- Rudder_pedal = FG_Rudder;
- Throttle_pct = FG_Throttle[0];
+ // Lat_control = FG_Aileron;
+ // Long_control = FG_Elevator;
+ // Long_trim = FG_Elev_Trim;
+ // Rudder_pedal = FG_Rudder;
+ // Throttle_pct = FG_Throttle[0];
/* printf("Mach = %.2f ", Mach_number);
printf("%.4f,%.4f,%.2f ", Latitude, Longitude, Altitude);
/* Initialize the LaRCsim flight model, dt is the time increment for
each subsequent iteration through the EOM */
-int fgLaRCsimInit(double dt) {
+int ls_toplevel_init(double dt) {
model_dt = dt;
ls_setdefopts(); /* set default options */
/* Run an iteration of the EOM (equations of motion) */
-int fgLaRCsimUpdate(fgFLIGHT *f, int multiloop) {
- double save_alt = 0.0;
+int ls_update(int multiloop) {
int i;
if (speedup > 0) {
ls_cockpit();
}
- /* lets try to avoid really screwing up the LaRCsim model */
- if ( FG_Altitude < -9000 ) {
- save_alt = FG_Altitude;
- FG_Altitude = 0;
- }
-
- // translate FG to LaRCsim structure
- fgFlight_2_LaRCsim(f);
- // printf("FG_Altitude = %.2f\n", FG_Altitude * 0.3048);
- // printf("Altitude = %.2f\n", Altitude * 0.3048);
- // printf("Radius to Vehicle = %.2f\n", Radius_to_vehicle * 0.3048);
-
for ( i = 0; i < multiloop; i++ ) {
ls_loop( model_dt, 0);
}
- // printf("%d FG_Altitude = %.2f\n", i, FG_Altitude * 0.3048);
- // printf("%d Altitude = %.2f\n", i, Altitude * 0.3048);
-
- // translate LaRCsim back to FG structure so that the
- // autopilot (and the rest of the sim can use the updated
- // values
- fgLaRCsim_2_Flight(f);
-
- /* but lets restore our original bogus altitude when we are done */
- if ( save_alt < -9000 ) {
- FG_Altitude = save_alt;
- }
-
return 1;
}
+#if 0
/* Convert from the fgFLIGHT struct to the LaRCsim generic_ struct */
int fgFlight_2_LaRCsim (fgFLIGHT *f) {
Mass = FG_Mass;
return ( 0 );
}
-
+#endif
/* Set the altitude (force) */
int ls_ForceAltitude(double alt_feet) {
/* Flight Gear Modification Log
*
* $Log$
+ * Revision 1.23 1998/10/16 23:27:44 curt
+ * C++-ifying.
+ *
* Revision 1.22 1998/09/29 02:02:59 curt
* Added a brake + autopilot mods.
*
#define _LS_INTERFACE_H
-#include <Flight/flight.h>
+// #include <Flight/flight.h>
#include "ls_types.h"
/* reset flight params to a specific position */
-int fgLaRCsimInit(double dt);
+int ls_toplevel_init(double dt);
/* update position based on inputs, positions, velocities, etc. */
-int fgLaRCsimUpdate(fgFLIGHT *f, int multiloop);
+int ls_update(int multiloop);
+#if 0
/* Convert from the fgFLIGHT struct to the LaRCsim generic_ struct */
int fgFlight_2_LaRCsim (fgFLIGHT *f);
int fgLaRCsim_2_Flight (fgFLIGHT *f);
void ls_loop( SCALAR dt, int initialize );
+#endif
/* Set the altitude (force) */
int ls_ForceAltitude(double alt_feet);
/* $Log$
-/* Revision 1.9 1998/07/12 03:11:04 curt
-/* Removed some printf()'s.
-/* Fixed the autopilot integration so it should be able to update it's control
-/* positions every time the internal flight model loop is run, and not just
-/* once per rendered frame.
-/* Added a routine to do the necessary stuff to force an arbitrary altitude
-/* change.
-/* Gave the Navion engine just a tad more power.
+/* Revision 1.10 1998/10/16 23:27:45 curt
+/* C++-ifying.
/*
+ * Revision 1.9 1998/07/12 03:11:04 curt
+ * Removed some printf()'s.
+ * Fixed the autopilot integration so it should be able to update it's control
+ * positions every time the internal flight model loop is run, and not just
+ * once per rendered frame.
+ * Added a routine to do the necessary stuff to force an arbitrary altitude
+ * change.
+ * Gave the Navion engine just a tad more power.
+ *
* Revision 1.8 1998/04/21 16:59:39 curt
* Integrated autopilot.
* Prepairing for C++ integration.
#include <Debug/fg_debug.h>
#include <GUI/gui.h>
#include <Joystick/joystick.h>
-#include <Math/fg_geodesy.h>
+#include <Math/fg_geodesy.hxx>
#include <Math/mat3.h>
#include <Math/polar3d.hxx>
#include <PUI/pu.h>
// $Log$
+// Revision 1.58 1998/10/16 23:27:52 curt
+// C++-ifying.
+//
// Revision 1.57 1998/10/16 00:54:00 curt
// Converted to Point3D class.
//
#include <Cockpit/cockpit.hxx>
#include <Debug/fg_debug.h>
#include <Joystick/joystick.h>
-#include <Math/fg_geodesy.h>
+#include <Math/fg_geodesy.hxx>
#include <Math/fg_random.h>
#include <Math/point3d.hxx>
#include <Math/polar3d.hxx>
}
-// convert a geodetic point lon(radians), lat(radians), elev(meter) to
-// a cartesian point
-static Point3D geod_to_cart(double geod[3]) {
- Point3D cp;
- Point3D pp;
- double gc_lon, gc_lat, sl_radius;
-
- // printf("A geodetic point is (%.2f, %.2f, %.2f)\n",
- // geod[0], geod[1], geod[2]);
-
- gc_lon = geod[0];
- fgGeodToGeoc(geod[1], geod[2], &sl_radius, &gc_lat);
-
- // printf("A geocentric point is (%.2f, %.2f, %.2f)\n", gc_lon,
- // gc_lat, sl_radius+geod[2]);
-
- pp.setvals( gc_lon, gc_lat, sl_radius + geod[2] );
- cp = fgPolarToCart3d(pp);
-
- // printf("A cart point is (%.8f, %.8f, %.8f)\n", cp.x, cp.y, cp.z);
-
- return(cp);
-}
-
-
// This is the top level init routine which calls all the other
// initialization routines. If you are adding a subsystem to flight
// gear, its initialization call should located in this routine.
fgLIGHT *l;
fgTIME *t;
fgVIEW *v;
- double geod_pos[3];
- Point3D abs_view_pos;
+ Point3D geod_pos, abs_view_pos;
l = &cur_light_params;
t = &cur_time_params;
}
// calculalate a cartesian point somewhere along the line between
- // the center of the earth and our view position
- geod_pos[0] = FG_Longitude;
- geod_pos[1] = FG_Latitude;
- // doesn't have to be the exact elevation (this is good because we
- // don't know it yet :-)
- geod_pos[2] = 0;
- abs_view_pos = geod_to_cart(geod_pos);
+ // the center of the earth and our view position. Doesn't have to
+ // be the exact elevation (this is good because we don't know it
+ // yet :-)
+ geod_pos.setvals( FG_Longitude, FG_Latitude, 0.0);
+ abs_view_pos = fgGeodToCart(geod_pos);
// Calculate ground elevation at starting point
scenery.cur_elev =
// $Log$
+// Revision 1.42 1998/10/16 23:27:54 curt
+// C++-ifying.
+//
// Revision 1.41 1998/10/16 00:54:01 curt
// Converted to Point3D class.
//
-//
// views.hxx -- data structures and routines for managing and view parameters.
//
// Written by Curtis Olson, started August 1997.
#endif
-// #include <Include/fg_types.h>
-#include <Flight/flight.h>
+#include <Flight/flight.hxx>
#include <Math/mat3.h>
#include <Math/point3d.hxx>
#include <Time/fg_time.hxx>
// $Log$
+// Revision 1.15 1998/10/16 23:27:56 curt
+// C++-ifying.
+//
// Revision 1.14 1998/10/16 00:54:04 curt
// Converted to Point3D class.
//
-/* -*- Mode: C++ -*-
- *
- * scenery.c -- data structures and routines for managing scenery.
- *
- * Written by Curtis Olson, started May 1997.
- *
- * Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- * (Log is kept at end of this file)
- **************************************************************************/
+// scenery.cxx -- data structures and routines for managing scenery.
+//
+// Written by Curtis Olson, started May 1997.
+//
+// Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// $Id$
+// (Log is kept at end of this file)
#ifdef HAVE_CONFIG_H
// #include "texload.h"
-/* Temporary hack until we get a better texture management system running */
+// Temporary hack until we get a better texture management system running
GLint area_texture;
-/* Shared structure to hold current scenery parameters */
+// Shared structure to hold current scenery parameters
struct fgSCENERY scenery;
-/* Initialize the Scenery Management system */
+// Initialize the Scenery Management system
int fgSceneryInit( void ) {
fgOPTIONS *o;
// char path[1024], fgpath[1024];
}
-/* Tell the scenery manager where we are so it can load the proper data, and
- * build the proper structures. */
+// Tell the scenery manager where we are so it can load the proper data, and
+// build the proper structures.
void fgSceneryUpdate(double lon, double lat, double elev) {
// does nothing;
}
-/* Render out the current scene */
+// Render out the current scene
void fgSceneryRender( void ) {
}
-/* $Log$
-/* Revision 1.8 1998/08/25 16:52:40 curt
-/* material.cxx material.hxx obj.cxx obj.hxx texload.c texload.h moved to
-/* ../Objects
-/*
- * Revision 1.7 1998/07/13 21:01:59 curt
- * Wrote access functions for current fgOPTIONS.
- *
- * Revision 1.6 1998/07/12 03:18:27 curt
- * Added ground collision detection. This involved:
- * - saving the entire vertex list for each tile with the tile records.
- * - saving the face list for each fragment with the fragment records.
- * - code to intersect the current vertical line with the proper face in
- * an efficient manner as possible.
- * Fixed a bug where the tiles weren't being shifted to "near" (0,0,0)
- *
- * Revision 1.5 1998/06/17 21:36:41 curt
- * Load and manage multiple textures defined in the Materials library.
- * Boost max material fagments for each material property to 800.
- * Multiple texture support when rendering.
- *
- * Revision 1.4 1998/05/13 18:26:40 curt
- * Root path info moved to fgOPTIONS.
- *
- * Revision 1.3 1998/05/07 23:15:20 curt
- * Fixed a glTexImage2D() usage bug where width and height were mis-swapped.
- * Added support for --tile-radius=n option.
- *
- * Revision 1.2 1998/05/02 01:52:16 curt
- * Playing around with texture coordinates.
- *
- * Revision 1.1 1998/04/30 12:35:30 curt
- * Added a command line rendering option specify smooth/flat shading.
- *
- * Revision 1.42 1998/04/28 21:43:27 curt
- * Wrapped zlib calls up so we can conditionally comment out zlib support.
- *
- * Revision 1.41 1998/04/24 00:51:08 curt
- * Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
- * Tweaked the scenery file extentions to be "file.obj" (uncompressed)
- * or "file.obz" (compressed.)
- *
- * Revision 1.40 1998/04/18 04:14:06 curt
- * Moved fg_debug.c to it's own library.
- *
- * Revision 1.39 1998/04/08 23:30:07 curt
- * Adopted Gnu automake/autoconf system.
- *
- * Revision 1.38 1998/04/03 22:11:37 curt
- * Converting to Gnu autoconf system.
- *
- * Revision 1.37 1998/03/23 21:23:05 curt
- * Debugging output tweaks.
- *
- * Revision 1.36 1998/03/14 00:30:50 curt
- * Beginning initial terrain texturing experiments.
- *
- * Revision 1.35 1998/01/31 00:43:26 curt
- * Added MetroWorks patches from Carmen Volpe.
- *
- * Revision 1.34 1998/01/27 03:26:43 curt
- * Playing with new fgPrintf command.
- *
- * Revision 1.33 1998/01/19 19:27:17 curt
- * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
- * This should simplify things tremendously.
- *
- * Revision 1.32 1998/01/19 18:40:37 curt
- * Tons of little changes to clean up the code and to remove fatal errors
- * when building with the c++ compiler.
- *
- * Revision 1.31 1998/01/13 00:23:11 curt
- * Initial changes to support loading and management of scenery tiles. Note,
- * there's still a fair amount of work left to be done.
- *
- * Revision 1.30 1998/01/07 03:22:29 curt
- * Moved astro stuff to .../Src/Astro/
- *
- * Revision 1.29 1997/12/30 20:47:52 curt
- * Integrated new event manager with subsystem initializations.
- *
- * Revision 1.28 1997/12/15 23:55:02 curt
- * Add xgl wrappers for debugging.
- * Generate terrain normals on the fly.
- *
- * Revision 1.27 1997/12/12 21:41:30 curt
- * More light/material property tweaking ... still a ways off.
- *
- * Revision 1.26 1997/12/12 19:52:58 curt
- * Working on lightling and material properties.
- *
- * Revision 1.25 1997/12/10 22:37:51 curt
- * Prepended "fg" on the name of all global structures that didn't have it yet.
- * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
- *
- * Revision 1.24 1997/12/08 22:51:18 curt
- * Enhanced to handle ccw and cw tri-stripe winding. This is a temporary
- * admission of defeat. I will eventually go back and get all the stripes
- * wound the same way (ccw).
- *
- * Revision 1.23 1997/11/25 19:25:37 curt
- * Changes to integrate Durk's moon/sun code updates + clean up.
- *
- * Revision 1.22 1997/10/28 21:00:22 curt
- * Changing to new terrain format.
- *
- * Revision 1.21 1997/10/25 03:24:24 curt
- * Incorporated sun, moon, and star positioning code contributed by Durk Talsma.
- *
- * Revision 1.20 1997/10/25 03:18:27 curt
- * Incorporated sun, moon, and planet position and rendering code contributed
- * by Durk Talsma.
- *
- * Revision 1.19 1997/09/05 14:17:30 curt
- * More tweaking with stars.
- *
- * Revision 1.18 1997/09/05 01:35:59 curt
- * Working on getting stars right.
- *
- * Revision 1.17 1997/08/29 17:55:27 curt
- * Worked on properly aligning the stars.
- *
- * Revision 1.16 1997/08/27 21:32:29 curt
- * Restructured view calculation code. Added stars.
- *
- * Revision 1.15 1997/08/27 03:30:32 curt
- * Changed naming scheme of basic shared structures.
- *
- * Revision 1.14 1997/08/25 20:27:24 curt
- * Merged in initial HUD and Joystick code.
- *
- * Revision 1.13 1997/08/22 21:34:41 curt
- * Doing a bit of reorganizing and house cleaning.
- *
- * Revision 1.12 1997/08/19 23:55:08 curt
- * Worked on better simulating real lighting.
- *
- * Revision 1.11 1997/08/13 20:24:22 curt
- * Changed default detail level.
- *
- * Revision 1.10 1997/08/06 00:24:30 curt
- * Working on correct real time sun lighting.
- *
- * Revision 1.9 1997/08/04 17:08:11 curt
- * Testing cvs on IRIX 6.x
- *
- * Revision 1.8 1997/07/18 23:41:27 curt
- * Tweaks for building with Cygnus Win32 compiler.
- *
- * Revision 1.7 1997/07/16 20:04:52 curt
- * Minor tweaks to aid Win32 port.
- *
- * Revision 1.6 1997/07/14 16:26:05 curt
- * Testing/playing -- placed objects randomly across the entire terrain.
- *
- * Revision 1.5 1997/07/11 03:23:19 curt
- * Solved some scenery display/orientation problems. Still have a positioning
- * (or transformation?) problem.
- *
- * Revision 1.4 1997/07/11 01:30:03 curt
- * More tweaking of terrian floor.
- *
- * Revision 1.3 1997/06/29 21:16:50 curt
- * More twiddling with the Scenery Management system.
- *
- * Revision 1.2 1997/06/27 20:03:37 curt
- * Working on Makefile structure.
- *
- * Revision 1.1 1997/06/27 02:26:30 curt
- * Initial revision.
- *
- */
+// $Log$
+// Revision 1.9 1998/10/16 23:27:57 curt
+// C++-ifying.
+//
+// Revision 1.8 1998/08/25 16:52:40 curt
+// material.cxx material.hxx obj.cxx obj.hxx texload.c texload.h moved to
+// ../Objects
+//
+// Revision 1.7 1998/07/13 21:01:59 curt
+// Wrote access functions for current fgOPTIONS.
+//
+// Revision 1.6 1998/07/12 03:18:27 curt
+// Added ground collision detection. This involved:
+// - saving the entire vertex list for each tile with the tile records.
+// - saving the face list for each fragment with the fragment records.
+// - code to intersect the current vertical line with the proper face in
+// an efficient manner as possible.
+// Fixed a bug where the tiles weren't being shifted to "near" (0,0,0)
+//
+// Revision 1.5 1998/06/17 21:36:41 curt
+// Load and manage multiple textures defined in the Materials library.
+// Boost max material fagments for each material property to 800.
+// Multiple texture support when rendering.
+//
+// Revision 1.4 1998/05/13 18:26:40 curt
+// Root path info moved to fgOPTIONS.
+//
+// Revision 1.3 1998/05/07 23:15:20 curt
+// Fixed a glTexImage2D() usage bug where width and height were mis-swapped.
+// Added support for --tile-radius=n option.
+//
+// Revision 1.2 1998/05/02 01:52:16 curt
+// Playing around with texture coordinates.
+//
+// Revision 1.1 1998/04/30 12:35:30 curt
+// Added a command line rendering option specify smooth/flat shading.
+//
+// Revision 1.42 1998/04/28 21:43:27 curt
+// Wrapped zlib calls up so we can conditionally comment out zlib support.
+//
+// Revision 1.41 1998/04/24 00:51:08 curt
+// Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
+// Tweaked the scenery file extentions to be "file.obj" (uncompressed)
+// or "file.obz" (compressed.)
+//
+// Revision 1.40 1998/04/18 04:14:06 curt
+// Moved fg_debug.c to it's own library.
+//
+// Revision 1.39 1998/04/08 23:30:07 curt
+// Adopted Gnu automake/autoconf system.
+//
+// Revision 1.38 1998/04/03 22:11:37 curt
+// Converting to Gnu autoconf system.
+//
+// Revision 1.37 1998/03/23 21:23:05 curt
+// Debugging output tweaks.
+//
+// Revision 1.36 1998/03/14 00:30:50 curt
+// Beginning initial terrain texturing experiments.
+//
+// Revision 1.35 1998/01/31 00:43:26 curt
+// Added MetroWorks patches from Carmen Volpe.
+//
+// Revision 1.34 1998/01/27 03:26:43 curt
+// Playing with new fgPrintf command.
+//
+// Revision 1.33 1998/01/19 19:27:17 curt
+// Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+// This should simplify things tremendously.
+//
+// Revision 1.32 1998/01/19 18:40:37 curt
+// Tons of little changes to clean up the code and to remove fatal errors
+// when building with the c++ compiler.
+//
+// Revision 1.31 1998/01/13 00:23:11 curt
+// Initial changes to support loading and management of scenery tiles. Note,
+// there's still a fair amount of work left to be done.
+//
+// Revision 1.30 1998/01/07 03:22:29 curt
+// Moved astro stuff to .../Src/Astro/
+//
+// Revision 1.29 1997/12/30 20:47:52 curt
+// Integrated new event manager with subsystem initializations.
+//
+// Revision 1.28 1997/12/15 23:55:02 curt
+// Add xgl wrappers for debugging.
+// Generate terrain normals on the fly.
+//
+// Revision 1.27 1997/12/12 21:41:30 curt
+// More light/material property tweaking ... still a ways off.
+//
+// Revision 1.26 1997/12/12 19:52:58 curt
+// Working on lightling and material properties.
+//
+// Revision 1.25 1997/12/10 22:37:51 curt
+// Prepended "fg" on the name of all global structures that didn't have it yet.
+// i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+//
+// Revision 1.24 1997/12/08 22:51:18 curt
+// Enhanced to handle ccw and cw tri-stripe winding. This is a temporary
+// admission of defeat. I will eventually go back and get all the stripes
+// wound the same way (ccw).
+//
+// Revision 1.23 1997/11/25 19:25:37 curt
+// Changes to integrate Durk's moon/sun code updates + clean up.
+//
+// Revision 1.22 1997/10/28 21:00:22 curt
+// Changing to new terrain format.
+//
+// Revision 1.21 1997/10/25 03:24:24 curt
+// Incorporated sun, moon, and star positioning code contributed by Durk Talsma.
+//
+// Revision 1.20 1997/10/25 03:18:27 curt
+// Incorporated sun, moon, and planet position and rendering code contributed
+// by Durk Talsma.
+//
+// Revision 1.19 1997/09/05 14:17:30 curt
+// More tweaking with stars.
+//
+// Revision 1.18 1997/09/05 01:35:59 curt
+// Working on getting stars right.
+//
+// Revision 1.17 1997/08/29 17:55:27 curt
+// Worked on properly aligning the stars.
+//
+// Revision 1.16 1997/08/27 21:32:29 curt
+// Restructured view calculation code. Added stars.
+//
+// Revision 1.15 1997/08/27 03:30:32 curt
+// Changed naming scheme of basic shared structures.
+//
+// Revision 1.14 1997/08/25 20:27:24 curt
+// Merged in initial HUD and Joystick code.
+//
+// Revision 1.13 1997/08/22 21:34:41 curt
+// Doing a bit of reorganizing and house cleaning.
+//
+// Revision 1.12 1997/08/19 23:55:08 curt
+// Worked on better simulating real lighting.
+//
+// Revision 1.11 1997/08/13 20:24:22 curt
+// Changed default detail level.
+//
+// Revision 1.10 1997/08/06 00:24:30 curt
+// Working on correct real time sun lighting.
+//
+// Revision 1.9 1997/08/04 17:08:11 curt
+// Testing cvs on IRIX 6.x
+//
+// Revision 1.8 1997/07/18 23:41:27 curt
+// Tweaks for building with Cygnus Win32 compiler.
+//
+// Revision 1.7 1997/07/16 20:04:52 curt
+// Minor tweaks to aid Win32 port.
+//
+// Revision 1.6 1997/07/14 16:26:05 curt
+// Testing/playing -- placed objects randomly across the entire terrain.
+//
+// Revision 1.5 1997/07/11 03:23:19 curt
+// Solved some scenery display/orientation problems. Still have a positioning
+// (or transformation?) problem.
+//
+// Revision 1.4 1997/07/11 01:30:03 curt
+// More tweaking of terrian floor.
+//
+// Revision 1.3 1997/06/29 21:16:50 curt
+// More twiddling with the Scenery Management system.
+//
+// Revision 1.2 1997/06/27 20:03:37 curt
+// Working on Makefile structure.
+//
+// Revision 1.1 1997/06/27 02:26:30 curt
+// Initial revision.
+//
-/**************************************************************************
- * scenery.hxx -- data structures and routines for managing scenery.
- *
- * Written by Curtis Olson, started May 1997.
- *
- * Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- * (Log is kept at end of this file)
- **************************************************************************/
+// scenery.hxx -- data structures and routines for managing scenery.
+//
+// Written by Curtis Olson, started May 1997.
+//
+// Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// $Id$
+// (Log is kept at end of this file)
#ifndef _SCENERY_HXX
#endif
-// #include <Include/fg_types.h>
#include <Math/point3d.hxx>
-/* Define a structure containing global scenery parameters */
+// Define a structure containing global scenery parameters
struct fgSCENERY {
- /* center of current scenery chunk */
+ // center of current scenery chunk
Point3D center;
- /* next center of current scenery chunk */
+ // next center of current scenery chunk
Point3D next_center;
- /* angle of sun relative to current local horizontal */
+ // angle of sun relative to current local horizontal
double sun_angle;
// elevation of terrain at our current lat/lon (based on the
extern struct fgSCENERY scenery;
-/* Initialize the Scenery Management system */
+// Initialize the Scenery Management system
int fgSceneryInit( void );
-/* Tell the scenery manager where we are so it can load the proper data, and
- * build the proper structures. */
+// Tell the scenery manager where we are so it can load the proper
+// data, and build the proper structures.
void fgSceneryUpdate(double lon, double lat, double elev);
-/* Render out the current scene */
+// Render out the current scene
void fgSceneryRender( void );
-#endif /* _SCENERY_HXX */
-
-
-/* $Log$
-/* Revision 1.5 1998/10/16 00:55:44 curt
-/* Converted to Point3D class.
-/*
- * Revision 1.4 1998/07/12 03:18:28 curt
- * Added ground collision detection. This involved:
- * - saving the entire vertex list for each tile with the tile records.
- * - saving the face list for each fragment with the fragment records.
- * - code to intersect the current vertical line with the proper face in
- * an efficient manner as possible.
- * Fixed a bug where the tiles weren't being shifted to "near" (0,0,0)
- *
- * Revision 1.3 1998/07/08 14:47:22 curt
- * Fix GL_MODULATE vs. GL_DECAL problem introduced by splash screen.
- * polare3d.h renamed to polar3d.hxx
- * fg{Cartesian,Polar}Point3d consolodated.
- * Added some initial support for calculating local current ground elevation.
- *
- * Revision 1.2 1998/05/02 01:52:16 curt
- * Playing around with texture coordinates.
- *
- * Revision 1.1 1998/04/30 12:35:31 curt
- * Added a command line rendering option specify smooth/flat shading.
- *
- * Revision 1.21 1998/04/25 22:06:31 curt
- * Edited cvs log messages in source files ... bad bad bad!
- *
- * Revision 1.20 1998/04/22 13:22:45 curt
- * C++ - ifing the code a bit.
- *
- * Revision 1.19 1998/04/21 17:02:43 curt
- * Prepairing for C++ integration.
- *
- * Revision 1.18 1998/03/14 00:30:51 curt
- * Beginning initial terrain texturing experiments.
- *
- * Revision 1.17 1998/02/20 00:16:24 curt
- * Thursday's tweaks.
- *
- * Revision 1.16 1998/01/27 00:48:03 curt
- * Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
- * system and commandline/config file processing code.
- *
- * Revision 1.15 1998/01/22 02:59:41 curt
- * Changed #ifdef FILE_H to #ifdef _FILE_H
- *
- * Revision 1.14 1998/01/19 19:27:17 curt
- * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
- * This should simplify things tremendously.
- *
- * Revision 1.13 1998/01/19 18:40:38 curt
- * Tons of little changes to clean up the code and to remove fatal errors
- * when building with the c++ compiler.
- *
- * Revision 1.12 1997/12/15 23:55:03 curt
- * Add xgl wrappers for debugging.
- * Generate terrain normals on the fly.
- *
- * Revision 1.11 1997/12/10 22:37:52 curt
- * Prepended "fg" on the name of all global structures that didn't have it yet.
- * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
- *
- * Revision 1.10 1997/09/04 02:17:37 curt
- * Shufflin' stuff.
- *
- * Revision 1.9 1997/08/27 03:30:33 curt
- * Changed naming scheme of basic shared structures.
- *
- * Revision 1.8 1997/08/06 00:24:30 curt
- * Working on correct real time sun lighting.
- *
- * Revision 1.7 1997/07/23 21:52:27 curt
- * Put comments around the text after an #endif for increased portability.
- *
- * Revision 1.6 1997/07/11 01:30:03 curt
- * More tweaking of terrian floor.
- *
- * Revision 1.5 1997/06/26 22:14:57 curt
- * Beginning work on a scenery management system.
- *
- * Revision 1.4 1997/06/21 17:57:21 curt
- * directory shuffling ...
- *
- * Revision 1.2 1997/05/23 15:40:43 curt
- * Added GNU copyright headers.
- *
- * Revision 1.1 1997/05/16 16:07:07 curt
- * Initial revision.
- *
- */
+#endif // _SCENERY_HXX
+
+
+// $Log$
+// Revision 1.6 1998/10/16 23:27:59 curt
+// C++-ifying.
+//
+// Revision 1.5 1998/10/16 00:55:44 curt
+// Converted to Point3D class.
+//
+// Revision 1.4 1998/07/12 03:18:28 curt
+// Added ground collision detection. This involved:
+// - saving the entire vertex list for each tile with the tile records.
+// - saving the face list for each fragment with the fragment records.
+// - code to intersect the current vertical line with the proper face in
+// an efficient manner as possible.
+// Fixed a bug where the tiles weren't being shifted to "near" (0,0,0)
+//
+// Revision 1.3 1998/07/08 14:47:22 curt
+// Fix GL_MODULATE vs. GL_DECAL problem introduced by splash screen.
+// polare3d.h renamed to polar3d.hxx
+// fg{Cartesian,Polar}Point3d consolodated.
+// Added some initial support for calculating local current ground elevation.
+//
+// Revision 1.2 1998/05/02 01:52:16 curt
+// Playing around with texture coordinates.
+//
+// Revision 1.1 1998/04/30 12:35:31 curt
+// Added a command line rendering option specify smooth/flat shading.
+//
+// Revision 1.21 1998/04/25 22:06:31 curt
+// Edited cvs log messages in source files ... bad bad bad!
+//
+// Revision 1.20 1998/04/22 13:22:45 curt
+// C++ - ifing the code a bit.
+//
+// Revision 1.19 1998/04/21 17:02:43 curt
+// Prepairing for C++ integration.
+//
+// Revision 1.18 1998/03/14 00:30:51 curt
+// Beginning initial terrain texturing experiments.
+//
+// Revision 1.17 1998/02/20 00:16:24 curt
+// Thursday's tweaks.
+//
+// Revision 1.16 1998/01/27 00:48:03 curt
+// Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
+// system and commandline/config file processing code.
+//
+// Revision 1.15 1998/01/22 02:59:41 curt
+// Changed #ifdef FILE_H to #ifdef _FILE_H
+//
+// Revision 1.14 1998/01/19 19:27:17 curt
+// Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+// This should simplify things tremendously.
+//
+// Revision 1.13 1998/01/19 18:40:38 curt
+// Tons of little changes to clean up the code and to remove fatal errors
+// when building with the c++ compiler.
+//
+// Revision 1.12 1997/12/15 23:55:03 curt
+// Add xgl wrappers for debugging.
+// Generate terrain normals on the fly.
+//
+// Revision 1.11 1997/12/10 22:37:52 curt
+// Prepended "fg" on the name of all global structures that didn't have it yet.
+// i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
+//
+// Revision 1.10 1997/09/04 02:17:37 curt
+// Shufflin' stuff.
+//
+// Revision 1.9 1997/08/27 03:30:33 curt
+// Changed naming scheme of basic shared structures.
+//
+// Revision 1.8 1997/08/06 00:24:30 curt
+// Working on correct real time sun lighting.
+//
+// Revision 1.7 1997/07/23 21:52:27 curt
+// Put comments around the text after an #endif for increased portability.
+//
+// Revision 1.6 1997/07/11 01:30:03 curt
+// More tweaking of terrian floor.
+//
+// Revision 1.5 1997/06/26 22:14:57 curt
+// Beginning work on a scenery management system.
+//
+// Revision 1.4 1997/06/21 17:57:21 curt
+// directory shuffling ...
+//
+// Revision 1.2 1997/05/23 15:40:43 curt
+// Added GNU copyright headers.
+//
+// Revision 1.1 1997/05/16 16:07:07 curt
+// Initial revision.
+//
+
noinst_LIBRARIES = libSlew.a
-libSlew_a_SOURCES = slew.c slew.h
+libSlew_a_SOURCES = slew.cxx slew.hxx
INCLUDES += -I$(top_builddir) -I$(top_builddir)/Simulator
+++ /dev/null
-/**************************************************************************
- * slew.c -- the "slew" flight model
- *
- * Written by Curtis Olson, started May 1997.
- *
- * Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- * (Log is kept at end of this file)
- **************************************************************************/
-
-
-#include <math.h>
-
-#include <Flight/Slew/slew.h>
-#include <Flight/flight.h>
-#include <Aircraft/aircraft.h>
-#include <Controls/controls.h>
-#include <Include/fg_constants.h>
-
-
-/* reset flight params to a specific position */
-void fgSlewInit(double pos_x, double pos_y, double pos_z, double heading) {
- fgFLIGHT *f;
-
- f = current_aircraft.flight;
-
- /*
- f->pos_x = pos_x;
- f->pos_y = pos_y;
- f->pos_z = pos_z;
-
- f->vel_x = 0.0;
- f->vel_y = 0.0;
- f->vel_z = 0.0;
-
- f->Phi = 0.0;
- f->Theta = 0.0;
- f->Psi = 0.0;
-
- f->vel_Phi = 0.0;
- f->vel_Theta = 0.0;
- f->vel_Psi = 0.0;
-
- f->Psi = heading;
- */
-}
-
-
-/* update position based on inputs, positions, velocities, etc. */
-void fgSlewUpdate( void ) {
- fgFLIGHT *f;
- fgCONTROLS *c;
-
- f = current_aircraft.flight;
- c = current_aircraft.controls;
-
- /* f->Psi += ( c->aileron / 8 );
- if ( f->Psi > FG_2PI ) {
- f->Psi -= FG_2PI;
- } else if ( f->Psi < 0 ) {
- f->Psi += FG_2PI;
- }
-
- f->vel_x = -c->elev;
-
- f->pos_x = f->pos_x + (cos(f->Psi) * f->vel_x);
- f->pos_y = f->pos_y + (sin(f->Psi) * f->vel_x); */
-}
-
-
-/* $Log$
-/* Revision 1.13 1998/04/25 22:06:29 curt
-/* Edited cvs log messages in source files ... bad bad bad!
-/*
- * Revision 1.12 1998/04/08 23:35:30 curt
- * Tweaks to Gnu automake/autoconf system.
- *
- * Revision 1.11 1998/02/07 15:29:39 curt
- * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
- * <chotchkiss@namg.us.anritsu.com>
- *
- * Revision 1.10 1998/01/27 00:47:53 curt
- * Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
- * system and commandline/config file processing code.
- *
- * Revision 1.9 1998/01/19 19:27:06 curt
- * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
- * This should simplify things tremendously.
- *
- * Revision 1.8 1998/01/19 18:40:30 curt
- * Tons of little changes to clean up the code and to remove fatal errors
- * when building with the c++ compiler.
- *
- * Revision 1.7 1997/12/15 23:54:42 curt
- * Add xgl wrappers for debugging.
- * Generate terrain normals on the fly.
- *
- * Revision 1.6 1997/08/27 03:30:11 curt
- * Changed naming scheme of basic shared structures.
- *
- * Revision 1.5 1997/07/19 22:35:06 curt
- * Moved fiddled with PI to avoid compiler warnings.
- *
- * Revision 1.4 1997/06/21 17:12:51 curt
- * Capitalized subdirectory names.
- *
- * Revision 1.3 1997/05/29 22:40:00 curt
- * Working on incorporating the LaRCsim flight model.
- *
- * Revision 1.2 1997/05/29 12:30:19 curt
- * Some initial mods to work better in a timer environment.
- *
- * Revision 1.1 1997/05/29 02:29:42 curt
- * Moved to their own directory.
- *
- * Revision 1.2 1997/05/23 15:40:37 curt
- * Added GNU copyright headers.
- *
- * Revision 1.1 1997/05/16 16:04:45 curt
- * Initial revision.
- *
- */
--- /dev/null
+/**************************************************************************
+ * slew.cxx -- the "slew" flight model
+ *
+ * Written by Curtis Olson, started May 1997.
+ *
+ * Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id$
+ * (Log is kept at end of this file)
+ **************************************************************************/
+
+
+#include <math.h>
+
+#include "slew.hxx"
+
+#include <Flight/flight.hxx>
+#include <Aircraft/aircraft.hxx>
+#include <Controls/controls.h>
+#include <Include/fg_constants.h>
+
+
+/* reset flight params to a specific position */
+void fgSlewInit(double pos_x, double pos_y, double pos_z, double heading) {
+ fgFLIGHT *f;
+
+ f = current_aircraft.flight;
+
+ /*
+ f->pos_x = pos_x;
+ f->pos_y = pos_y;
+ f->pos_z = pos_z;
+
+ f->vel_x = 0.0;
+ f->vel_y = 0.0;
+ f->vel_z = 0.0;
+
+ f->Phi = 0.0;
+ f->Theta = 0.0;
+ f->Psi = 0.0;
+
+ f->vel_Phi = 0.0;
+ f->vel_Theta = 0.0;
+ f->vel_Psi = 0.0;
+
+ f->Psi = heading;
+ */
+}
+
+
+/* update position based on inputs, positions, velocities, etc. */
+void fgSlewUpdate( void ) {
+ fgFLIGHT *f;
+ fgCONTROLS *c;
+
+ f = current_aircraft.flight;
+ c = current_aircraft.controls;
+
+ /* f->Psi += ( c->aileron / 8 );
+ if ( f->Psi > FG_2PI ) {
+ f->Psi -= FG_2PI;
+ } else if ( f->Psi < 0 ) {
+ f->Psi += FG_2PI;
+ }
+
+ f->vel_x = -c->elev;
+
+ f->pos_x = f->pos_x + (cos(f->Psi) * f->vel_x);
+ f->pos_y = f->pos_y + (sin(f->Psi) * f->vel_x); */
+}
+
+
+/* $Log$
+/* Revision 1.1 1998/10/16 23:27:50 curt
+/* C++-ifying.
+/*
+ * Revision 1.13 1998/04/25 22:06:29 curt
+ * Edited cvs log messages in source files ... bad bad bad!
+ *
+ * Revision 1.12 1998/04/08 23:35:30 curt
+ * Tweaks to Gnu automake/autoconf system.
+ *
+ * Revision 1.11 1998/02/07 15:29:39 curt
+ * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
+ * <chotchkiss@namg.us.anritsu.com>
+ *
+ * Revision 1.10 1998/01/27 00:47:53 curt
+ * Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
+ * system and commandline/config file processing code.
+ *
+ * Revision 1.9 1998/01/19 19:27:06 curt
+ * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+ * This should simplify things tremendously.
+ *
+ * Revision 1.8 1998/01/19 18:40:30 curt
+ * Tons of little changes to clean up the code and to remove fatal errors
+ * when building with the c++ compiler.
+ *
+ * Revision 1.7 1997/12/15 23:54:42 curt
+ * Add xgl wrappers for debugging.
+ * Generate terrain normals on the fly.
+ *
+ * Revision 1.6 1997/08/27 03:30:11 curt
+ * Changed naming scheme of basic shared structures.
+ *
+ * Revision 1.5 1997/07/19 22:35:06 curt
+ * Moved fiddled with PI to avoid compiler warnings.
+ *
+ * Revision 1.4 1997/06/21 17:12:51 curt
+ * Capitalized subdirectory names.
+ *
+ * Revision 1.3 1997/05/29 22:40:00 curt
+ * Working on incorporating the LaRCsim flight model.
+ *
+ * Revision 1.2 1997/05/29 12:30:19 curt
+ * Some initial mods to work better in a timer environment.
+ *
+ * Revision 1.1 1997/05/29 02:29:42 curt
+ * Moved to their own directory.
+ *
+ * Revision 1.2 1997/05/23 15:40:37 curt
+ * Added GNU copyright headers.
+ *
+ * Revision 1.1 1997/05/16 16:04:45 curt
+ * Initial revision.
+ *
+ */
+++ /dev/null
-/**************************************************************************
- * slew.h -- the "slew" flight model
- *
- * Written by Curtis Olson, started May 1997.
- *
- * Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- * (Log is kept at end of this file)
- **************************************************************************/
-
-
-#ifndef _SLEW_H
-#define _SLEW_H
-
-
-/* reset flight params to a specific position */
-void fgSlewInit(double pos_x, double pos_y, double pos_z, double heading);
-
-/* update position based on inputs, positions, velocities, etc. */
-void fgSlewUpdate( void );
-
-
-#endif /* _SLEW_H */
-
-
-/* $Log$
-/* Revision 1.4 1998/01/22 02:59:34 curt
-/* Changed #ifdef FILE_H to #ifdef _FILE_H
-/*
- * Revision 1.3 1998/01/19 18:40:30 curt
- * Tons of little changes to clean up the code and to remove fatal errors
- * when building with the c++ compiler.
- *
- * Revision 1.2 1997/07/23 21:52:20 curt
- * Put comments around the text after an #endif for increased portability.
- *
- * Revision 1.1 1997/05/29 02:29:43 curt
- * Moved to their own directory.
- *
- * Revision 1.2 1997/05/23 15:40:38 curt
- * Added GNU copyright headers.
- *
- * Revision 1.1 1997/05/16 16:04:46 curt
- * Initial revision.
- *
- */
--- /dev/null
+/**************************************************************************
+ * slew.hxx -- the "slew" flight model
+ *
+ * Written by Curtis Olson, started May 1997.
+ *
+ * Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id$
+ * (Log is kept at end of this file)
+ **************************************************************************/
+
+
+#ifndef _SLEW_HXX
+#define _SLEW_HXX
+
+
+#ifndef __cplusplus
+# error This library requires C++
+#endif
+
+
+/* reset flight params to a specific position */
+void fgSlewInit(double pos_x, double pos_y, double pos_z, double heading);
+
+/* update position based on inputs, positions, velocities, etc. */
+void fgSlewUpdate( void );
+
+
+#endif /* _SLEW_HXX */
+
+
+/* $Log$
+/* Revision 1.1 1998/10/16 23:27:52 curt
+/* C++-ifying.
+/*
+ * Revision 1.4 1998/01/22 02:59:34 curt
+ * Changed #ifdef FILE_H to #ifdef _FILE_H
+ *
+ * Revision 1.3 1998/01/19 18:40:30 curt
+ * Tons of little changes to clean up the code and to remove fatal errors
+ * when building with the c++ compiler.
+ *
+ * Revision 1.2 1997/07/23 21:52:20 curt
+ * Put comments around the text after an #endif for increased portability.
+ *
+ * Revision 1.1 1997/05/29 02:29:43 curt
+ * Moved to their own directory.
+ *
+ * Revision 1.2 1997/05/23 15:40:38 curt
+ * Added GNU copyright headers.
+ *
+ * Revision 1.1 1997/05/16 16:04:46 curt
+ * Initial revision.
+ *
+ */
#include <GL/glut.h>
#include <time.h>
-#include <Flight/flight.h>
+#include <Flight/flight.hxx>
// Define a structure containing global time parameters
// $Log$
+// Revision 1.8 1998/10/16 23:28:00 curt
+// C++-ifying.
+//
// Revision 1.7 1998/10/16 00:56:09 curt
// Converted to Point3D class.
//