Removed references to Point3D from FGViewers interface.
This commit is contained in:
parent
470ee55fb7
commit
83ad798898
3 changed files with 8 additions and 14 deletions
|
@ -442,12 +442,6 @@ void fgRenderFrame( void ) {
|
||||||
|
|
||||||
// update the sky dome
|
// update the sky dome
|
||||||
if ( globals->get_options()->get_skyblend() ) {
|
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 = "
|
/* cout << "thesky->repaint() sky_color = "
|
||||||
<< cur_light_params.sky_color[0] << " "
|
<< cur_light_params.sky_color[0] << " "
|
||||||
<< cur_light_params.sky_color[1] << " "
|
<< cur_light_params.sky_color[1] << " "
|
||||||
|
@ -484,7 +478,7 @@ void fgRenderFrame( void ) {
|
||||||
<< " moon dec = " << globals->get_ephem()->getMoonDeclination() << endl; */
|
<< " moon dec = " << globals->get_ephem()->getMoonDeclination() << endl; */
|
||||||
|
|
||||||
thesky->reposition( globals->get_current_view()->get_view_pos(),
|
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(),
|
globals->get_current_view()->get_local_up(),
|
||||||
cur_fdm_state->get_Longitude(),
|
cur_fdm_state->get_Longitude(),
|
||||||
cur_fdm_state->get_Latitude(),
|
cur_fdm_state->get_Latitude(),
|
||||||
|
|
|
@ -170,7 +170,7 @@ static void print_sgMat4( sgMat4 &in) {
|
||||||
|
|
||||||
// Update the view parameters
|
// Update the view parameters
|
||||||
void FGViewer::update() {
|
void FGViewer::update() {
|
||||||
|
Point3D tmp;
|
||||||
sgVec3 minus_z, forward;
|
sgVec3 minus_z, forward;
|
||||||
sgMat4 VIEWo;
|
sgMat4 VIEWo;
|
||||||
|
|
||||||
|
@ -179,7 +179,8 @@ void FGViewer::update() {
|
||||||
geod_view_pos[1],
|
geod_view_pos[1],
|
||||||
sea_level_radius );
|
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
|
// calculate view position in current FG view coordinate system
|
||||||
// p.lon & p.lat are already defined earlier, p.radius was set to
|
// 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 );
|
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] );
|
sgdSetVec3( abs_view_pos, tmp[0], tmp[1], tmp[2] );
|
||||||
|
|
||||||
sgdVec3 sc;
|
sgdVec3 sc;
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
#include <simgear/math/point3d.hxx>
|
|
||||||
#include <simgear/timing/sg_time.hxx>
|
#include <simgear/timing/sg_time.hxx>
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
@ -87,7 +86,7 @@ private:
|
||||||
|
|
||||||
// cartesion coordinates of current lon/lat if at sea level
|
// cartesion coordinates of current lon/lat if at sea level
|
||||||
// translated to scenery.center
|
// translated to scenery.center
|
||||||
Point3D cur_zero_elev;
|
sgVec3 zero_elev;
|
||||||
|
|
||||||
// vector in cartesian coordinates from current position to the
|
// vector in cartesian coordinates from current position to the
|
||||||
// postion on the earth's surface the sun is directly over
|
// postion on the earth's surface the sun is directly over
|
||||||
|
@ -202,9 +201,9 @@ public:
|
||||||
if ( dirty ) { update(); }
|
if ( dirty ) { update(); }
|
||||||
return view_pos;
|
return view_pos;
|
||||||
}
|
}
|
||||||
inline Point3D get_cur_zero_elev() {
|
inline float *get_zero_elev() {
|
||||||
if ( dirty ) { update(); }
|
if ( dirty ) { update(); }
|
||||||
return cur_zero_elev;
|
return zero_elev;
|
||||||
}
|
}
|
||||||
inline float *get_surface_south() {
|
inline float *get_surface_south() {
|
||||||
if ( dirty ) { update(); }
|
if ( dirty ) { update(); }
|
||||||
|
|
Loading…
Add table
Reference in a new issue