31 #ifndef ATBPOLYLINE_HH 32 #define ATBPOLYLINE_HH 58 typedef blitz::TinyVector<double,Dim>
PointT;
60 typedef typename std::map<double,PointT>::const_iterator
121 double distance(PointT
const &point,
double &uOpt)
const;
135 double curveIntegral(
double uStart = 0.0,
double uEnd = 1.0)
const;
169 void save(std::string
const &fileName, std::string
const &groupName,
170 bool throwExceptions =
false)
const;
188 void load(std::string
const &fileName, std::string
const &groupName,
189 bool throwExceptions =
false);
220 std::map< double, blitz::TinyVector<double,Dim> > _points;
223 friend std::ostream &operator<<(std::ostream &, Polyline<Dim1>
const &);
238 std::ostream &operator<<(std::ostream &os, Polyline<Dim>
const &polyline);
242 #include "ATBPolyline.icc" Polyline< Dim > & operator=(Polyline< Dim > const &polyline)
Copy assignment operator.
The Polyline class provides a simple polyline representation of a BSpline for fast point to spline di...
PointT operator()(double u) const
Get the polyline position at curve length u.
The BSpline class provides functions for fitting B-Splines to point clouds and evaluating them at arb...
void load(std::string const &fileName, std::string const &groupName, bool throwExceptions=false)
Load the polyline with corresponding meta-data from an hdf5 file with given name, using the groupName...
double distance(PointT const &point, double &uOpt) const
Project the given point onto the polyline and get the distance to the polyline and the projected posi...
blitz::TinyVector< double, Dim > PointT
void fitToSpline(BSpline< PointT > const &spline, double eps=1e-4)
Make this polyline optimally fit the given BSpline.
Polyline()
Default constructor.
std::map< double, PointT >::const_iterator PointConstIteratorT
std::map< double, PointT >::iterator PointIteratorT
double curveIntegral(double uStart=0.0, double uEnd=1.0) const
Compute the curve integral along the poly line.
void save(std::string const &fileName, std::string const &groupName, bool throwExceptions=false) const
Save the polyline with corresponding meta-data to an hdf5 file with given name, using the groupName p...