Type-ified fgTIME and fgVIEW
This commit is contained in:
parent
8929f4e1ee
commit
c0f121ab00
10 changed files with 71 additions and 40 deletions
|
@ -57,7 +57,7 @@ static GLint moon = 0;
|
||||||
----------------------------------------------------------------*/
|
----------------------------------------------------------------*/
|
||||||
struct CelestialCoord fgCalculateMoon(struct OrbElements params,
|
struct CelestialCoord fgCalculateMoon(struct OrbElements params,
|
||||||
struct OrbElements sunParams,
|
struct OrbElements sunParams,
|
||||||
struct fgTIME t)
|
fgTIME t)
|
||||||
{
|
{
|
||||||
struct CelestialCoord
|
struct CelestialCoord
|
||||||
geocCoord, topocCoord;
|
geocCoord, topocCoord;
|
||||||
|
@ -216,9 +216,12 @@ void fgMoonRender( void ) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.3 1998/04/25 22:06:24 curt
|
/* Revision 1.4 1998/04/28 01:18:59 curt
|
||||||
/* Edited cvs log messages in source files ... bad bad bad!
|
/* Type-ified fgTIME and fgVIEW
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.3 1998/04/25 22:06:24 curt
|
||||||
|
* Edited cvs log messages in source files ... bad bad bad!
|
||||||
|
*
|
||||||
* Revision 1.2 1998/04/24 00:45:00 curt
|
* Revision 1.2 1998/04/24 00:45:00 curt
|
||||||
* Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
|
* Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
|
||||||
* Fixed a bug when generating sky colors.
|
* Fixed a bug when generating sky colors.
|
||||||
|
|
|
@ -46,7 +46,7 @@ void fgMoonRender( void );
|
||||||
|
|
||||||
struct CelestialCoord fgCalculateMoon(struct OrbElements Params,
|
struct CelestialCoord fgCalculateMoon(struct OrbElements Params,
|
||||||
struct OrbElements sunParams,
|
struct OrbElements sunParams,
|
||||||
struct fgTIME t);
|
fgTIME t);
|
||||||
|
|
||||||
extern struct OrbElements pltOrbElements[9];
|
extern struct OrbElements pltOrbElements[9];
|
||||||
|
|
||||||
|
@ -55,10 +55,13 @@ extern struct OrbElements pltOrbElements[9];
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.2 1998/04/24 00:45:00 curt
|
/* Revision 1.3 1998/04/28 01:19:00 curt
|
||||||
/* Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
|
/* Type-ified fgTIME and fgVIEW
|
||||||
/* Fixed a bug when generating sky colors.
|
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.2 1998/04/24 00:45:00 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:28 curt
|
* Revision 1.1 1998/04/22 13:21:28 curt
|
||||||
* C++ - ifing the code a bit.
|
* C++ - ifing the code a bit.
|
||||||
*
|
*
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
struct OrbElements pltOrbElements[9];
|
struct OrbElements pltOrbElements[9];
|
||||||
|
|
||||||
|
|
||||||
double fgCalcActTime(struct fgTIME t)
|
double fgCalcActTime(fgTIME t)
|
||||||
{
|
{
|
||||||
return (t.mjd - 36523.5);
|
return (t.mjd - 36523.5);
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ int fgReadOrbElements(struct OrbElements *dest, FILE *src)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int fgSolarSystemInit(struct fgTIME t)
|
int fgSolarSystemInit(fgTIME t)
|
||||||
{
|
{
|
||||||
fgGENERAL *g;
|
fgGENERAL *g;
|
||||||
char path[80];
|
char path[80];
|
||||||
|
@ -152,7 +152,7 @@ int fgSolarSystemInit(struct fgTIME t)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fgSolarSystemUpdate(struct OrbElements *planet, struct fgTIME t)
|
void fgSolarSystemUpdate(struct OrbElements *planet, fgTIME t)
|
||||||
{
|
{
|
||||||
double
|
double
|
||||||
actTime;
|
actTime;
|
||||||
|
@ -170,9 +170,12 @@ void fgSolarSystemUpdate(struct OrbElements *planet, struct fgTIME t)
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.3 1998/04/25 22:06:25 curt
|
/* Revision 1.4 1998/04/28 01:19:00 curt
|
||||||
/* Edited cvs log messages in source files ... bad bad bad!
|
/* Type-ified fgTIME and fgVIEW
|
||||||
/*
|
/*
|
||||||
|
* 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:01 curt
|
* Revision 1.2 1998/04/24 00:45:01 curt
|
||||||
* Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
|
* Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
|
||||||
* Fixed a bug when generating sky colors.
|
* Fixed a bug when generating sky colors.
|
||||||
|
|
|
@ -77,21 +77,24 @@ struct CelestialCoord {
|
||||||
|
|
||||||
|
|
||||||
double fgCalcEccAnom(double M, double e);
|
double fgCalcEccAnom(double M, double e);
|
||||||
double fgCalcActTime(struct fgTIME t);
|
double fgCalcActTime(fgTIME t);
|
||||||
|
|
||||||
int fgReadOrbElements (struct OrbElements *dest, FILE * src);
|
int fgReadOrbElements (struct OrbElements *dest, FILE * src);
|
||||||
int fgSolarSystemInit(struct fgTIME t);
|
int fgSolarSystemInit(fgTIME t);
|
||||||
void fgSolarSystemUpdate(struct OrbElements *planets, struct fgTIME t);
|
void fgSolarSystemUpdate(struct OrbElements *planets, fgTIME t);
|
||||||
|
|
||||||
|
|
||||||
#endif /* _ORBITS_HXX */
|
#endif /* _ORBITS_HXX */
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.2 1998/04/24 00:45:01 curt
|
/* Revision 1.3 1998/04/28 01:19:01 curt
|
||||||
/* Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
|
/* Type-ified fgTIME and fgVIEW
|
||||||
/* Fixed a bug when generating sky colors.
|
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.2 1998/04/24 00:45:01 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:30 curt
|
* Revision 1.1 1998/04/22 13:21:30 curt
|
||||||
* C++ - ifing the code a bit.
|
* C++ - ifing the code a bit.
|
||||||
*
|
*
|
||||||
|
|
|
@ -47,7 +47,7 @@ GLint planets = 0;
|
||||||
|
|
||||||
struct CelestialCoord fgCalculatePlanet(struct OrbElements planet,
|
struct CelestialCoord fgCalculatePlanet(struct OrbElements planet,
|
||||||
struct OrbElements theSun,
|
struct OrbElements theSun,
|
||||||
struct fgTIME t, int idx)
|
fgTIME t, int idx)
|
||||||
{
|
{
|
||||||
struct CelestialCoord result;
|
struct CelestialCoord result;
|
||||||
|
|
||||||
|
@ -210,9 +210,12 @@ void fgPlanetsRender( void ) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.4 1998/04/26 05:10:01 curt
|
/* Revision 1.5 1998/04/28 01:19:01 curt
|
||||||
/* "struct fgLIGHT" -> "fgLIGHT" because fgLIGHT is typedef'd.
|
/* 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
|
* Revision 1.3 1998/04/25 22:06:25 curt
|
||||||
* Edited cvs log messages in source files ... bad bad bad!
|
* Edited cvs log messages in source files ... bad bad bad!
|
||||||
*
|
*
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
|
|
||||||
|
|
||||||
struct CelestialCoord fgCalculatePlanet(struct OrbElements planet,
|
struct CelestialCoord fgCalculatePlanet(struct OrbElements planet,
|
||||||
struct OrbElements theSun,
|
struct OrbElements theSun,
|
||||||
struct fgTIME t, int idx);
|
fgTIME t, int idx);
|
||||||
|
|
||||||
|
|
||||||
void fgPlanetsInit( void );
|
void fgPlanetsInit( void );
|
||||||
|
@ -45,9 +45,12 @@ void fgPlanetsRender( void );
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.1 1998/04/22 13:21:32 curt
|
/* Revision 1.2 1998/04/28 01:19:02 curt
|
||||||
/* C++ - ifing the code a bit.
|
/* Type-ified fgTIME and fgVIEW
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.1 1998/04/22 13:21:32 curt
|
||||||
|
* C++ - ifing the code a bit.
|
||||||
|
*
|
||||||
* Revision 1.5 1998/04/21 17:02:31 curt
|
* Revision 1.5 1998/04/21 17:02:31 curt
|
||||||
* Prepairing for C++ integration.
|
* Prepairing for C++ integration.
|
||||||
*
|
*
|
||||||
|
|
|
@ -261,7 +261,7 @@ void fgSkyInit( void ) {
|
||||||
void fgSkyRender( void ) {
|
void fgSkyRender( void ) {
|
||||||
fgFLIGHT *f;
|
fgFLIGHT *f;
|
||||||
fgLIGHT *l;
|
fgLIGHT *l;
|
||||||
struct fgVIEW *v;
|
fgVIEW *v;
|
||||||
float /* inner_color[4], middle_color[4], diff, */ east_dot, dot, angle;
|
float /* inner_color[4], middle_color[4], diff, */ east_dot, dot, angle;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -373,9 +373,12 @@ void fgSkyRender( void ) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.4 1998/04/26 05:10:01 curt
|
/* Revision 1.5 1998/04/28 01:19:02 curt
|
||||||
/* "struct fgLIGHT" -> "fgLIGHT" because fgLIGHT is typedef'd.
|
/* 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
|
* Revision 1.3 1998/04/25 22:06:25 curt
|
||||||
* Edited cvs log messages in source files ... bad bad bad!
|
* Edited cvs log messages in source files ... bad bad bad!
|
||||||
*
|
*
|
||||||
|
|
|
@ -223,9 +223,9 @@ int fgStarsInit( void ) {
|
||||||
/* Draw the Stars */
|
/* Draw the Stars */
|
||||||
void fgStarsRender( void ) {
|
void fgStarsRender( void ) {
|
||||||
fgFLIGHT *f;
|
fgFLIGHT *f;
|
||||||
struct fgVIEW *v;
|
fgVIEW *v;
|
||||||
fgLIGHT *l;
|
fgLIGHT *l;
|
||||||
struct fgTIME *t;
|
fgTIME *t;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
f = current_aircraft.flight;
|
f = current_aircraft.flight;
|
||||||
|
@ -260,9 +260,12 @@ void fgStarsRender( void ) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.4 1998/04/26 05:10:02 curt
|
/* Revision 1.5 1998/04/28 01:19:03 curt
|
||||||
/* "struct fgLIGHT" -> "fgLIGHT" because fgLIGHT is typedef'd.
|
/* Type-ified fgTIME and fgVIEW
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.4 1998/04/26 05:10:02 curt
|
||||||
|
* "struct fgLIGHT" -> "fgLIGHT" because fgLIGHT is typedef'd.
|
||||||
|
*
|
||||||
* Revision 1.3 1998/04/25 22:06:26 curt
|
* Revision 1.3 1998/04/25 22:06:26 curt
|
||||||
* Edited cvs log messages in source files ... bad bad bad!
|
* Edited cvs log messages in source files ... bad bad bad!
|
||||||
*
|
*
|
||||||
|
|
|
@ -42,17 +42,21 @@ int fgStarsInit( void );
|
||||||
|
|
||||||
/* Draw the Stars */
|
/* Draw the Stars */
|
||||||
void fgStarsRender( void );
|
void fgStarsRender( void );
|
||||||
|
|
||||||
extern struct OrbElements pltOrbElements[9];
|
extern struct OrbElements pltOrbElements[9];
|
||||||
extern struct fgTIME cur_time_params;
|
extern fgTIME cur_time_params;
|
||||||
|
|
||||||
|
|
||||||
#endif /* _STARS_HXX */
|
#endif /* _STARS_HXX */
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.1 1998/04/22 13:21:35 curt
|
/* Revision 1.2 1998/04/28 01:19:03 curt
|
||||||
/* C++ - ifing the code a bit.
|
/* Type-ified fgTIME and fgVIEW
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.1 1998/04/22 13:21:35 curt
|
||||||
|
* C++ - ifing the code a bit.
|
||||||
|
*
|
||||||
* Revision 1.5 1998/04/21 17:02:33 curt
|
* Revision 1.5 1998/04/21 17:02:33 curt
|
||||||
* Prepairing for C++ integration.
|
* Prepairing for C++ integration.
|
||||||
*
|
*
|
||||||
|
|
|
@ -76,7 +76,7 @@ void fgCalcSunPos(struct OrbElements params)
|
||||||
|
|
||||||
|
|
||||||
struct CelestialCoord fgCalculateSun (struct OrbElements params,
|
struct CelestialCoord fgCalculateSun (struct OrbElements params,
|
||||||
struct fgTIME t)
|
fgTIME t)
|
||||||
{
|
{
|
||||||
struct CelestialCoord result;
|
struct CelestialCoord result;
|
||||||
double xe, ye, ze, ecl, actTime;
|
double xe, ye, ze, ecl, actTime;
|
||||||
|
@ -105,8 +105,8 @@ struct CelestialCoord fgCalculateSun (struct OrbElements params,
|
||||||
/* Initialize the Sun */
|
/* Initialize the Sun */
|
||||||
void fgSunInit( void ) {
|
void fgSunInit( void ) {
|
||||||
fgLIGHT *l;
|
fgLIGHT *l;
|
||||||
struct fgTIME *t;
|
fgTIME *t;
|
||||||
struct fgVIEW *v;
|
fgVIEW *v;
|
||||||
float xSun, ySun, zSun;
|
float xSun, ySun, zSun;
|
||||||
|
|
||||||
/* GLfloat color[4] = { 1.00, 1.00, 1.00, 1.00 }; */
|
/* GLfloat color[4] = { 1.00, 1.00, 1.00, 1.00 }; */
|
||||||
|
@ -192,9 +192,12 @@ void fgSunRender( void ) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.4 1998/04/26 05:10:02 curt
|
/* Revision 1.5 1998/04/28 01:19:04 curt
|
||||||
/* "struct fgLIGHT" -> "fgLIGHT" because fgLIGHT is typedef'd.
|
/* Type-ified fgTIME and fgVIEW
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.4 1998/04/26 05:10:02 curt
|
||||||
|
* "struct fgLIGHT" -> "fgLIGHT" because fgLIGHT is typedef'd.
|
||||||
|
*
|
||||||
* Revision 1.3 1998/04/25 22:06:26 curt
|
* Revision 1.3 1998/04/25 22:06:26 curt
|
||||||
* Edited cvs log messages in source files ... bad bad bad!
|
* Edited cvs log messages in source files ... bad bad bad!
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue