11 // FIXME: need to handle "inverted" controls for mirrored wings.
14 Wing( Version * version );
17 // Do we mirror ourselves about the XZ plane?
18 void setMirror(bool mirror);
21 void setBase(float* base); // in local coordinates
22 void setLength(float length); // dist. ALONG wing (not span!)
23 void setChord(float chord); // at base, measured along X axis
24 void setTaper(float taper); // fraction, 0-1
25 void setSweep(float sweep); // radians
26 void setDihedral(float dihedral); // radians, positive is "up"
28 void setStall(float aoa);
29 void setStallWidth(float angle);
30 void setStallPeak(float fraction);
31 void setTwist(float angle);
32 void setCamber(float camber);
33 void setIncidence(float incidence);
34 void setInducedDrag(float drag) { _inducedDrag = drag; }
36 void setFlap0(float start, float end, float lift, float drag);
37 void setFlap1(float start, float end, float lift, float drag);
38 void setSpoiler(float start, float end, float lift, float drag);
39 void setSlat(float start, float end, float aoa, float drag);
41 // Set the control axes for the sub-surfaces
42 void setFlap0(float lval, float rval);
43 void setFlap1(float lval, float rval);
44 void setSpoiler(float lval, float rval);
45 void setSlat(float val);
46 void setFlap0Effectiveness(float lval);
47 void setFlap1Effectiveness(float lval);
49 // Compile the thing into a bunch of Surface objects
52 void getTip(float* tip);
56 // Ground effect information
57 float getGroundEffect(float* posOut);
59 // Query the list of Surface objects
61 Surface* getSurface(int n);
62 float getSurfaceWeight(int n);
64 // The overall drag coefficient for the wing as a whole. Units are
66 void setDragScale(float scale);
69 // The ratio of force along the Z (lift) direction of each wing
70 // segment to that along the X (drag) direction.
71 void setLiftRatio(float ratio);
75 void interp(float* v1, float* v2, float frac, float* out);
76 Surface* newSurface(float* pos, float* orient, float chord,
77 bool flap0, bool flap1, bool slat, bool spoiler);
79 struct SurfRec { Surface * surface; float weight; };
130 }; // namespace yasim