1
0
Fork 0

Smarter vasi/papi coloring.

This commit is contained in:
curt 2003-12-30 07:04:40 +00:00
parent 3d7f467c61
commit a80b033104

View file

@ -398,9 +398,9 @@ void FGTileEntry::prep_ssg_node( const Point3D& p, sgVec3 up, float vis) {
} }
if ( general.get_glDepthBits() > 16 ) { if ( general.get_glDepthBits() > 16 ) {
sgScaleVec3( lift_vec, 0.0 + agl / 500.0 ); sgScaleVec3( lift_vec, 0.25 + agl / 400.0 + agl*agl / 5000000.0 );
} else { } else {
sgScaleVec3( lift_vec, 0.0 + agl / 150.0 ); sgScaleVec3( lift_vec, 0.25 + agl / 150.0 );
} }
sgVec3 lt_trans; sgVec3 lt_trans;
@ -432,9 +432,9 @@ void FGTileEntry::prep_ssg_node( const Point3D& p, sgVec3 up, float vis) {
} }
if ( general.get_glDepthBits() > 16 ) { if ( general.get_glDepthBits() > 16 ) {
sgScaleVec3( lift_vec, 0.0 + agl / 500.0 ); sgScaleVec3( lift_vec, 0.01 + agl / 400.0 + agl*agl / 5000000.0 );
} else { } else {
sgScaleVec3( lift_vec, 0.0 + agl / 150.0 ); sgScaleVec3( lift_vec, 0.25 + agl / 150.0 );
} }
sgVec3 lt_trans; sgVec3 lt_trans;
@ -472,9 +472,9 @@ void FGTileEntry::prep_ssg_node( const Point3D& p, sgVec3 up, float vis) {
} }
if ( general.get_glDepthBits() > 16 ) { if ( general.get_glDepthBits() > 16 ) {
sgScaleVec3( lift_vec, 0.0 + agl / 500.0 ); sgScaleVec3( lift_vec, 0.01 + agl / 400.0 + agl*agl / 5000000.0 );
} else { } else {
sgScaleVec3( lift_vec, 0.0 + agl / 150.0 ); sgScaleVec3( lift_vec, 0.25 + agl / 150.0 );
} }
sgVec3 lt_trans; sgVec3 lt_trans;
@ -514,7 +514,10 @@ void FGTileEntry::prep_ssg_node( const Point3D& p, sgVec3 up, float vis) {
double dist = sgdDistanceVec3( s, d ); double dist = sgdDistanceVec3( s, d );
double cur_alt = globals->get_current_view()->getAltitudeASL_ft() * SG_FEET_TO_METER; if ( dist < 10000 ) {
double cur_alt
= globals->get_current_view()->getAltitudeASL_ft()
* SG_FEET_TO_METER;
double y = cur_alt - vasi->get_alt_m(); double y = cur_alt - vasi->get_alt_m();
@ -525,10 +528,7 @@ void FGTileEntry::prep_ssg_node( const Point3D& p, sgVec3 up, float vis) {
angle = 0.0; angle = 0.0;
} }
if ( angle * SG_RADIANS_TO_DEGREES < 3.0 ) { vasi->set_color(angle * SG_RADIANS_TO_DEGREES);
vasi->set_color(0.0);
} else {
vasi->set_color(1.0);
} }
// cout << " dist = " << dist // cout << " dist = " << dist
// << " angle = " << angle * SG_RADIANS_TO_DEGREES // << " angle = " << angle * SG_RADIANS_TO_DEGREES