Updates from David Megginson.
This commit is contained in:
parent
a0d50000ba
commit
b1af3904c8
2 changed files with 8 additions and 2 deletions
|
@ -476,6 +476,7 @@ FGToggleAction::doAction ()
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
FGPanelTransformation::FGPanelTransformation ()
|
FGPanelTransformation::FGPanelTransformation ()
|
||||||
|
: table(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -664,7 +665,11 @@ FGInstrumentLayer::transform () const
|
||||||
} else if (val > t->max) {
|
} else if (val > t->max) {
|
||||||
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) {
|
switch (t->type) {
|
||||||
case FGPanelTransformation::XSHIFT:
|
case FGPanelTransformation::XSHIFT:
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
#include <plib/ssg.h>
|
#include <plib/ssg.h>
|
||||||
|
|
||||||
|
#include <simgear/math/interpolater.hxx>
|
||||||
#include <simgear/misc/props.hxx>
|
#include <simgear/misc/props.hxx>
|
||||||
#include <simgear/timing/timestamp.hxx>
|
#include <simgear/timing/timestamp.hxx>
|
||||||
|
|
||||||
|
@ -48,7 +49,6 @@
|
||||||
|
|
||||||
#include <Main/fgfs.hxx>
|
#include <Main/fgfs.hxx>
|
||||||
|
|
||||||
|
|
||||||
SG_USING_STD(vector);
|
SG_USING_STD(vector);
|
||||||
SG_USING_STD(map);
|
SG_USING_STD(map);
|
||||||
|
|
||||||
|
@ -383,6 +383,7 @@ public:
|
||||||
float max;
|
float max;
|
||||||
float factor;
|
float factor;
|
||||||
float offset;
|
float offset;
|
||||||
|
SGInterpTable * table;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue