1
0
Fork 0

Updates from David Megginson.

This commit is contained in:
curt 2001-05-15 23:08:25 +00:00
parent a0d50000ba
commit b1af3904c8
2 changed files with 8 additions and 2 deletions

View file

@ -476,6 +476,7 @@ FGToggleAction::doAction ()
////////////////////////////////////////////////////////////////////////
FGPanelTransformation::FGPanelTransformation ()
: table(0)
{
}
@ -664,7 +665,11 @@ FGInstrumentLayer::transform () const
} else if (val > t->max) {
val = t->max;
}
val = val * t->factor + t->offset;
if(t->table==0) {
val = val * t->factor + t->offset;
} else {
val = t->table->interpolate(val) * t->factor + t->offset;
}
switch (t->type) {
case FGPanelTransformation::XSHIFT:

View file

@ -39,6 +39,7 @@
#include <GL/glut.h>
#include <plib/ssg.h>
#include <simgear/math/interpolater.hxx>
#include <simgear/misc/props.hxx>
#include <simgear/timing/timestamp.hxx>
@ -48,7 +49,6 @@
#include <Main/fgfs.hxx>
SG_USING_STD(vector);
SG_USING_STD(map);
@ -383,6 +383,7 @@ public:
float max;
float factor;
float offset;
SGInterpTable * table;
};