libsurf
Programmer's Documentation

uvpolyline.h (r6227/r5398)
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_UVPOLYLINE_H
16 #define SURF_UVPOLYLINE_H
17 
18 #include "abstractuvcurve.h"
19 #include "uvsplinecurve.h"
20 #include <genua/xmlelement.h>
21 
30 class UvPolyline : public UvSplineCurve<1>
31 {
32 public:
33 
35  explicit UvPolyline(SurfacePtr psf) : UvSplineCurve<1>(psf) {}
36 
38  UvPolyline(SurfacePtr psf, const PointList<2> &pts);
39 
41  UvPolyline(SurfacePtr psf, const Vector &u, const PointList<2> &pts);
42 
44  UvPolyline(SurfacePtr psf, const Vct2 &a, const Vct2 &b);
45 
47  UvPolyline *clone() const;
48 
50  void interpolate(const Vct2 &a, const Vct2 &b);
51 
53  const Vector &interpolate(const PointList<2> &pts) {
55  }
56 
58  const Vector& uBoundary(Real u, const Vector &v, bool flip=false);
59 
61  const Vector &vBoundary(Real v, const Vector &u, bool flip=false);
62 
64  AbstractUvCurvePair split(Real t) const;
65 
67  XmlElement toXml(bool share) const;
68 
70  void fromXml(const XmlElement &xe);
71 };
72 
73 #endif // UVPOLYLINE_H
const Vector & uBoundary(Real u, const Vector &v, bool flip=false)
generate a boundary curve
Definition: uvpolyline.cpp:52
UvPolyline * clone() const
clone object
Definition: uvpolyline.cpp:35
const Vector & vBoundary(Real v, const Vector &u, bool flip=false)
generate a boundary curve
Definition: uvpolyline.cpp:63
AbstractUvCurvePair split(Real t) const
split curve at t
Definition: uvpolyline.cpp:74
void interpolate(const Vct2 &a, const Vct2 &b)
generate simplest possible parameter-space curve
Definition: uvpolyline.cpp:40
Parameter-space spline curve with compile-time degree.
Definition: forward.h:220
XmlElement toXml(bool share) const
generate xml representation
Definition: uvpolyline.cpp:87
const Vector & interpolate(const PointList< 2 > &pts)
forward to help compiler
Definition: uvpolyline.h:53
Straight-segment line in parameter space.
Definition: uvpolyline.h:30
UvPolyline(SurfacePtr psf)
initialize with surface
Definition: uvpolyline.h:35
void fromXml(const XmlElement &xe)
recover from xml representation
Definition: uvpolyline.cpp:100
const Vector & interpolate(const PointList< 2 > &pts)
contruct so that points are interpolated exactly
Definition: uvsplinecurve.h:42
Generated on Wed Jan 19 2022 03:03:15 for libsurf by   doxygen 1.8.5