libsurf
Programmer's Documentation

wingtiparc.h (r6227/r5385)
1 
2 /* Copyright (C) 2015 David Eller <david@larosterna.com>
3  *
4  * Commercial License Usage
5  * Licensees holding valid commercial licenses may use this file in accordance
6  * with the terms contained in their respective non-exclusive license agreement.
7  * For further information contact david@larosterna.com .
8  *
9  * GNU General Public License Usage
10  * Alternatively, this file may be used under the terms of the GNU General
11  * Public License version 3.0 as published by the Free Software Foundation and
12  * appearing in the file gpl.txt included in the packaging of this file.
13  */
14 
15 #ifndef SURF_WINGTIPARC_H
16 #define SURF_WINGTIPARC_H
17 
18 #include "skinsurf.h"
19 
37 class WingTipArc : public Surface
38 {
39  public:
40 
42  WingTipArc(const std::string & s) : Surface(s), skin(s) {}
43 
49  void init(const Surface & srf, Real vpos, Real s);
50 
52  Vct3 eval(Real u, Real v) const {
53  return skin.eval(u,v);
54  }
55 
57  Vct3 derive(Real u, Real v, uint ku, uint kv) const {
58  return skin.derive(u,v,ku,kv);
59  }
60 
62  void apply() {
63  skin.apply();
64  }
65 
67  XmlElement toXml(bool share=false) const {
68  return skin.toXml(share);
69  }
70 
72  void fromXml(const XmlElement & xe) {
73  skin.fromXml(xe);
74  }
75 
77  WingTipArc *clone() const {return new WingTipArc(*this);}
78 
79  private:
80 
82  void initDimensions(const Surface & srf, Real pos, Real s,
83  PointList<3> & pts);
84 
86  void scaleShift(Real sfc, Real sfh, Real db, Real y,
87  PointList<3> & pts) const;
88 
89  private:
90 
93 
95  Vct3 ple, rnormal, back, up;
96 
98  Real rchord, radius, alpha, gamma;
99 
101  bool vfwd;
102 };
103 
104 #endif
SkinSurf skin
tip arc is implemented using a specialized lofted surface
Definition: wingtiparc.h:92
Vct3 ple
directions needed for initialization
Definition: wingtiparc.h:95
void apply()
coordinate transformation
Definition: skinsurf.cpp:120
Skinned surface.
Definition: skinsurf.h:42
XmlElement toXml(bool share=false) const
XML output.
Definition: skinsurf.cpp:451
Real rchord
dimensions needed for initialization
Definition: wingtiparc.h:98
Vct3 derive(Real u, Real v, uint ku, uint kv) const
evaluate tangents
Definition: wingtiparc.h:57
Vct3 eval(Real u, Real v) const
evaluate spline surface
Definition: skinsurf.cpp:42
bool vfwd
flag: true if v=1 is at the tip and v=0 connects to the wing
Definition: wingtiparc.h:101
Vct3 derive(Real u, Real v, uint ku, uint kv) const
derive spline surface
Definition: skinsurf.cpp:60
void fromXml(const XmlElement &xe)
XML input.
Definition: skinsurf.cpp:470
void init(const Surface &srf, Real vpos, Real s)
Create arc.
Definition: wingtiparc.cpp:166
WingTipArc * clone() const
generate clone
Definition: wingtiparc.h:77
void apply()
apply coordinate transformation
Definition: wingtiparc.h:62
Vct3 eval(Real u, Real v) const
evaluate position
Definition: wingtiparc.h:52
XmlElement toXml(bool share=false) const
write to xml representation (SkinSurf)
Definition: wingtiparc.h:67
Splined wing-tip arc.
Definition: wingtiparc.h:37
WingTipArc(const std::string &s)
create named surface
Definition: wingtiparc.h:42
void initDimensions(const Surface &srf, Real pos, Real s, PointList< 3 > &pts)
initialize dimensions required for initialization
Definition: wingtiparc.cpp:103
Surface interface.
Definition: surface.h:37
void fromXml(const XmlElement &xe)
read from xml representation (SkinSurf)
Definition: wingtiparc.h:72
void scaleShift(Real sfc, Real sfh, Real db, Real y, PointList< 3 > &pts) const
scale and shift a set of points
Definition: wingtiparc.cpp:153
Generated on Wed Jan 19 2022 03:03:15 for libsurf by   doxygen 1.8.5