1 #ifndef _CONTROL_MAP_HPP
2 #define _CONTROL_MAP_HPP
12 enum OutputType { THROTTLE, MIXTURE, ADVANCE, REHEAT, PROP,
14 INCIDENCE, FLAP0, FLAP1, SLAT, SPOILER, VECTOR,
17 enum { OPT_SPLIT = 0x01,
21 // Returns a new, not-yet-used "input handle" for addMapping and
22 // setInput. This typically corresponds to one user axis.
25 // Adds a mapping to between input handle and a particular setting
26 // on an output object. The value of output MUST match the type
28 void addMapping(int input, int output, void* object, int options=0);
30 // An additional form to specify a mapping range. Input values
31 // outside of [src0:src1] are clamped, and are then mapped to
32 // [dst0:dst1] before being set on the object.
33 void addMapping(int input, int output, void* object, int options,
34 float src0, float src1, float dst0, float dst1);
36 // Resets our accumulated input values. Call before any
37 // setInput() invokations.
40 // Sets the specified input (as returned by newInput) to the
42 void setInput(int input, float value);
44 // Calculates and applies the settings received since the last reset().
48 struct OutRec { int type; void* object; Vector maps; };
49 struct MapRec { OutRec* out; int idx; int opt; float val;
50 float src0; float src1; float dst0; float dst1; };
52 // A list of (sub)Vectors containing a bunch of MapRec objects for
56 // An unordered list of output settings.
61 #endif // _CONTROL_MAP_HPP