1
0
Fork 0

Removed references to Point3D from FGViewers interface.

This commit is contained in:
curt 2000-10-25 19:46:43 +00:00
parent 470ee55fb7
commit 83ad798898
3 changed files with 8 additions and 14 deletions

View file

@ -442,12 +442,6 @@ void fgRenderFrame( void ) {
// update the sky dome
if ( globals->get_options()->get_skyblend() ) {
sgVec3 zero_elev;
sgSetVec3( zero_elev,
globals->get_current_view()->get_cur_zero_elev().x(),
globals->get_current_view()->get_cur_zero_elev().y(),
globals->get_current_view()->get_cur_zero_elev().z() );
/* cout << "thesky->repaint() sky_color = "
<< cur_light_params.sky_color[0] << " "
<< cur_light_params.sky_color[1] << " "
@ -484,7 +478,7 @@ void fgRenderFrame( void ) {
<< " moon dec = " << globals->get_ephem()->getMoonDeclination() << endl; */
thesky->reposition( globals->get_current_view()->get_view_pos(),
zero_elev,
globals->get_current_view()->get_zero_elev(),
globals->get_current_view()->get_local_up(),
cur_fdm_state->get_Longitude(),
cur_fdm_state->get_Latitude(),

View file

@ -170,7 +170,7 @@ static void print_sgMat4( sgMat4 &in) {
// Update the view parameters
void FGViewer::update() {
Point3D tmp;
sgVec3 minus_z, forward;
sgMat4 VIEWo;
@ -179,7 +179,8 @@ void FGViewer::update() {
geod_view_pos[1],
sea_level_radius );
cur_zero_elev = sgPolarToCart3d(p) - scenery.center;
tmp = sgPolarToCart3d(p) - scenery.center;
sgSetVec3( zero_elev, tmp[0], tmp[1], tmp[2] );
// calculate view position in current FG view coordinate system
// p.lon & p.lat are already defined earlier, p.radius was set to
@ -190,7 +191,7 @@ void FGViewer::update() {
p.setz( p.radius() + scenery.cur_elev + 0.5 * METER_TO_FEET );
}
Point3D tmp = sgPolarToCart3d(p);
tmp = sgPolarToCart3d(p);
sgdSetVec3( abs_view_pos, tmp[0], tmp[1], tmp[2] );
sgdVec3 sc;

View file

@ -31,7 +31,6 @@
#endif
#include <simgear/compiler.h>
#include <simgear/math/point3d.hxx>
#include <simgear/timing/sg_time.hxx>
#include <list>
@ -87,7 +86,7 @@ private:
// cartesion coordinates of current lon/lat if at sea level
// translated to scenery.center
Point3D cur_zero_elev;
sgVec3 zero_elev;
// vector in cartesian coordinates from current position to the
// postion on the earth's surface the sun is directly over
@ -202,9 +201,9 @@ public:
if ( dirty ) { update(); }
return view_pos;
}
inline Point3D get_cur_zero_elev() {
inline float *get_zero_elev() {
if ( dirty ) { update(); }
return cur_zero_elev;
return zero_elev;
}
inline float *get_surface_south() {
if ( dirty ) { update(); }