OpenWalnut  1.2.5
Public Member Functions
WLine Class Reference

A line is an ordered sequence of WPositions. More...

#include <WLine.h>

+ Inheritance diagram for WLine:

List of all members.

Public Member Functions

 WLine (const std::vector< WPosition > &points)
 Generates a new line out of a sequence of points.
 WLine ()
 Creates an empty line.
void resampleByNumberOfPoints (size_t numPoints)
 Resample this line so it has a number of given points afterwards.
void resampleBySegmentLength (double newSegementLength)
void reverseOrder ()
 Reverses the order of the points.
void removeAdjacentDuplicates ()
 Collapse samplepoints which are equal and neighboured.
void unifyDirectionBy (const WLine &other)
 Put the line into reverse ordering if the reverse ordering would have a similar direction to the given line.

Detailed Description

A line is an ordered sequence of WPositions.

Definition at line 43 of file WLine.h.


Constructor & Destructor Documentation

WLine::WLine ( const std::vector< WPosition > &  points) [explicit]

Generates a new line out of a sequence of points.

Parameters:
pointsPoint sequence

Definition at line 42 of file WLine.cpp.

Creates an empty line.

Definition at line 47 of file WLine.cpp.


Member Function Documentation

void WLine::resampleByNumberOfPoints ( size_t  numPoints)
void WLine::resampleBySegmentLength ( double  newSegementLength)

Reverses the order of the points.

(mirroring)

Definition at line 61 of file WLine.cpp.

References WMixinVector< WPosition >::begin(), and WMixinVector< WPosition >::end().

Referenced by WLineTest::testReverseOrdering(), and unifyDirectionBy().

void WLine::unifyDirectionBy ( const WLine other)

Put the line into reverse ordering if the reverse ordering would have a similar direction to the given line.

That means if the start point (or multiple selected sample points) of the given line will better match to end point (or multiple selected sample points) of this line (in term of direction) the line is reordered.

Parameters:
otherThe line giving the direction to align this line to.

Definition at line 249 of file WLine.cpp.

References WMixinVector< ValueT >::at(), WMixinVector< WPosition >::at(), reverseOrder(), WMixinVector< ValueT >::size(), and WMixinVector< WPosition >::size().


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends