-\f
-////////////////////////////////////////////////////////////////////////
-// Abstract base class for an instrument layer.
-//
-// The FGLayeredInstrument class builds up instruments by using layers
-// of textures or text. Each layer can have zero or more
-// transformations applied to it: for example, a needle layer can
-// rotate to show the altitude or airspeed.
-////////////////////////////////////////////////////////////////////////
-
-/**
- * A single layer of a multi-layered instrument.
- *
- * Each layer can be subject to a series of transformations based
- * on current FGFS instrument readings: for example, a texture
- * representing a needle can rotate to show the airspeed.
- */
-class FGInstrumentLayer
-{
-public:
- typedef enum {
- XSHIFT,
- YSHIFT,
- ROTATION
- } transform_type;
-
- typedef double (*transform_func)();
-
-
- FGInstrumentLayer ();
- FGInstrumentLayer (int w, int h);
- virtual ~FGInstrumentLayer ();
-
- virtual void draw () const = 0;
- virtual void transform () const;
-
- virtual void addTransformation (transform_type type, transform_func func,
- double min, double max,
- double factor = 1.0, double offset = 0.0);
-
-protected:
- int _w, _h;
-
- typedef struct {
- transform_type type;
- transform_func func;
- double min;
- double max;
- double factor;
- double offset;
- } transformation;
- typedef vector<transformation *> transformation_list;
- transformation_list _transformations;
-};
-
-
-\f
-////////////////////////////////////////////////////////////////////////
-// An instrument composed of layers.
-//
-// This class represents an instrument which is simply a series of
-// layers piled one on top of the other, each one undergoing its own
-// set of transformations. For example, one layer can represent
-// the instrument's face (which doesn't move), while the next layer
-// can represent a needle that rotates depending on an FGFS variable.
-////////////////////////////////////////////////////////////////////////
-
-