A.I.M.S


aims::Polyline Class Reference

#include <aims/curve/curve.h>

Public Types

typedef float Scalar_t
 
typedef AimsVector< Scalar_t, 3 > Point_t
 
typedef std::vector< Point_t >
::const_iterator 
const_iterator
 

Public Member Functions

size_t size () const
 Return the number of points. More...
 
bool push_back (const Point_t &)
 Add a point if it is different from the last point. More...
 
const_iterator begin () const
 Forward iterator on the first point. More...
 
const_iterator end () const
 Forward iterator after the last point. More...
 
const Point_toperator[] (size_t) const
 Return the point corresponding to an index. More...
 
void reserve (size_t)
 Reserve space for the points (does not change the points in the line). More...
 
void clear ()
 Remove all points. More...
 
Scalar_t length () const
 Compute the line's length (sum of every segment's length) More...
 
void resample (size_t numberOfPoints, std::vector< Point_t > &)
 Resample the Polyline and fills a vector with result. More...
 

Detailed Description

Definition at line 50 of file curve.h.

Member Typedef Documentation

Definition at line 56 of file curve.h.

Definition at line 55 of file curve.h.

typedef float aims::Polyline::Scalar_t

Definition at line 54 of file curve.h.

Member Function Documentation

Polyline::const_iterator aims::Polyline::begin ( ) const
inline

Forward iterator on the first point.

Definition at line 174 of file curve.h.

void aims::Polyline::clear ( )
inline

Remove all points.

Definition at line 202 of file curve.h.

Polyline::const_iterator aims::Polyline::end ( ) const
inline

Forward iterator after the last point.

Definition at line 181 of file curve.h.

Scalar_t aims::Polyline::length ( ) const

Compute the line's length (sum of every segment's length)

const Polyline::Point_t & aims::Polyline::operator[] ( size_t  index) const
inline

Return the point corresponding to an index.

Definition at line 188 of file curve.h.

bool aims::Polyline::push_back ( const Point_t )

Add a point if it is different from the last point.

Return true if the point has been added.

void aims::Polyline::resample ( size_t  numberOfPoints,
std::vector< Point_t > &   
)

Resample the Polyline and fills a vector with result.

void aims::Polyline::reserve ( size_t  space)
inline

Reserve space for the points (does not change the points in the line).

There is no read/write (i.e. non const) version of this method because it is important to check that two identical points are not added in the polyline. It avoids possible crash when interpolating the polyline.

Definition at line 195 of file curve.h.

size_t aims::Polyline::size ( ) const
inline

Return the number of points.

Definition at line 167 of file curve.h.


The documentation for this class was generated from the following file: