From: curt Date: Fri, 16 Jan 2004 17:37:05 +0000 (+0000) Subject: Oops, I originally had ramped the vasi/papi color transition the wrong way. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=65a49bb6e4bc6cbd14feb065f55b798b4c1db362;p=simgear.git Oops, I originally had ramped the vasi/papi color transition the wrong way. So as you passed through the target glide slope from low to high it would be colored: red -> white -> small range of transition to red -> white. Now it goes the right way so you get: red -> smooth transition to -> white. You can tell you are getting high if you see the bottom vasi start to turn pink ... etc. etc. hopefully just like in real life. --- diff --git a/simgear/scene/tgdb/vasi.hxx b/simgear/scene/tgdb/vasi.hxx index f36271a9..d86162d8 100644 --- a/simgear/scene/tgdb/vasi.hxx +++ b/simgear/scene/tgdb/vasi.hxx @@ -82,7 +82,7 @@ public: if ( angle_deg < ref - trans ) { color = 0.0; } else if ( angle_deg < ref + trans ) { - color = (ref + trans - angle_deg) * (1 / (2 * trans) ); + color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) ); } else { color = 1.0; } @@ -97,7 +97,7 @@ public: if ( angle_deg < ref - trans ) { color = 0.0; } else if ( angle_deg < ref + trans ) { - color = (ref + trans - angle_deg) * (1 / (2 * trans) ); + color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) ); } else { color = 1.0; } @@ -112,7 +112,7 @@ public: if ( angle_deg < ref - trans ) { color = 0.0; } else if ( angle_deg < ref + trans ) { - color = (ref + trans - angle_deg) * (1 / (2 * trans) ); + color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) ); } else { color = 1.0; } @@ -127,7 +127,7 @@ public: if ( angle_deg < ref - trans ) { color = 0.0; } else if ( angle_deg < ref + trans ) { - color = (ref + trans - angle_deg) * (1 / (2 * trans) ); + color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) ); } else { color = 1.0; } @@ -142,7 +142,7 @@ public: if ( angle_deg < ref - trans ) { color = 0.0; } else if ( angle_deg < ref + trans ) { - color = (ref + trans - angle_deg) * (1 / (2 * trans) ); + color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) ); } else { color = 1.0; } @@ -157,7 +157,7 @@ public: if ( angle_deg < ref - trans ) { color = 0.0; } else if ( angle_deg < ref + trans ) { - color = (ref + trans - angle_deg) * (1 / (2 * trans) ); + color = 1.0 - (ref + trans - angle_deg) * (1 / (2 * trans) ); } else { color = 1.0; }