libsurf
Programmer's Documentation

transurf.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_TRANSURF_H
16 #define SURF_TRANSURF_H
17 
18 #include "surface.h"
19 #include "curve.h"
20 
29 class TranSurf : public Surface
30 {
31  public:
32 
34  TranSurf(const std::string & s) : Surface(s) {}
35 
37  virtual ~TranSurf() {}
38 
40  void init(const SurfacePtr & s0, const CurvePtr & c0,
41  const SurfacePtr & s1, const CurvePtr & c1, Real lenf=0.5);
42 
44  void init(const Vct3 & slope0, const CurvePtr & c0,
45  const SurfacePtr & s1, const CurvePtr & c1, Real lenf=0.5);
46 
48  void init(const SurfacePtr & s0, const CurvePtr & c0,
49  const Vct3 & slope1, const CurvePtr & c1, Real lenf=0.5);
50 
52  Vct3 eval(Real u, Real v) const;
53 
55  Vct3 derive(Real u, Real v, uint du, uint dv) const;
56 
58  void plane(Real u, Real v, Vct3 & S, Vct3 & Su, Vct3 & Sv) const;
59 
61  void apply();
62 
64  virtual XmlElement toXml(bool share=false) const;
65 
67  virtual void fromXml(const XmlElement & xe);
68 
70  int toIges(IgesFile & file, int tfi = 0) const;
71 
73  virtual Surface *clone() const {return new TranSurf(*this);}
74 
75  protected:
76 
78  uint initOuterCols(const CurvePtr & c0, const CurvePtr & c1, Vector & upar);
79 
80  protected:
81 
84 
87 };
88 
89 #endif
Vct3 eval(Real u, Real v) const
evaluation interface
Definition: transurf.cpp:122
virtual ~TranSurf()
enable inheritance
Definition: transurf.h:37
void apply()
coordinate transformation
Definition: transurf.cpp:184
virtual Surface * clone() const
generate a clone
Definition: transurf.h:73
virtual XmlElement toXml(bool share=false) const
XML output.
Definition: transurf.cpp:192
Main interface to IGES files.
Definition: igesfile.h:32
void init(const SurfacePtr &s0, const CurvePtr &c0, const SurfacePtr &s1, const CurvePtr &c1, Real lenf=0.5)
initialize with surfaces and boundary curves
Definition: transurf.cpp:20
uint initOuterCols(const CurvePtr &c0, const CurvePtr &c1, Vector &upar)
initialize outer control point columns (first and last)
Definition: transurf.cpp:71
void plane(Real u, Real v, Vct3 &S, Vct3 &Su, Vct3 &Sv) const
compute point and tangent derivatives at (u,v), for efficiency
Definition: transurf.cpp:163
int toIges(IgesFile &file, int tfi=0) const
append to IGES file and return the directory entry index, if implemented
Definition: transurf.cpp:237
SplineBasis ub
spline bases
Definition: transurf.h:83
Vct3 derive(Real u, Real v, uint du, uint dv) const
derive at (u,v)
Definition: transurf.cpp:140
PointGrid< 3 > cp
control point grid
Definition: transurf.h:86
virtual void fromXml(const XmlElement &xe)
XML input.
Definition: transurf.cpp:214
Cubic transition patch.
Definition: transurf.h:29
Surface interface.
Definition: surface.h:37
TranSurf(const std::string &s)
create undefined transition surface
Definition: transurf.h:34
Generated on Wed Jan 19 2022 03:03:15 for libsurf by   doxygen 1.8.5