126 return _pathPoints->getPosAt(_pointIndex);
131 return _pathPoints->getPosValueAt(_pointIndex);
136 return _pathPoints->getValueAt(_pointIndex);
142 _pathPoints->setPosAt(p, _pointIndex);
147 _pathPoints->setPosValueAt(p, _pointIndex);
152 _pathPoints->setValueAt(
static_cast<float>(v), _pointIndex);
164 return mlAbs(_pointCounterInc - _pointCounterDec);
170 return isEnd() ? _pointCounterInc + _pointCounterDec : _pointCounterInc + _pointCounterDec + 1;
178 _pointCounterInc = _pointCounterDec = 0;
189 return (_pathIndex == INVALID_INDEX) && (_pointIndex == INVALID_INDEX);
206 bool _findValidPathPointList();
214 unsigned int _pathIndex;
216 unsigned int _pointIndex;
219 unsigned int _numPathPointLists;
221 unsigned int _numPoints;
224 unsigned int _startPathIndex;
226 unsigned int _startPointIndex;
229 unsigned int _pointCounterInc;
232 unsigned int _pointCounterDec;
327 return _pathPoints->getPosAt(_pointIndex);
332 return _pathPoints->getPosValueAt(_pointIndex);
337 return _pathPoints->getValueAt(_pointIndex);
349 return mlAbs(_pointCounterInc - _pointCounterDec);
355 return isEnd() ? _pointCounterInc + _pointCounterDec : _pointCounterInc + _pointCounterDec + 1;
363 _pointCounterInc = _pointCounterDec = 0;
374 return (_pathIndex == INVALID_INDEX) && (_pointIndex == INVALID_INDEX);
391 bool _findValidPathPointList();
399 unsigned int _pathIndex;
401 unsigned int _pointIndex;
404 unsigned int _numPathPointLists;
406 unsigned int _numPoints;
409 unsigned int _startPathIndex;
411 unsigned int _startPointIndex;
414 unsigned int _pointCounterInc;
417 unsigned int _pointCounterDec;
#define MLCSO_EXPORT
Defines export symbols for classes, so they can be used in other DLLs.
CSOPathPointConstIterator & operator++()
Steps to the next point on the CSO (prefix).
bool operator!=(const CSOPathPointConstIterator &rhs) const
Comparison operator.
void makeEnd()
Makes this iterator pointing to the "end" of the CSO.
bool isEnd() const
Returns whether this iterator points to the end of the CSO.
unsigned int numTotalProcessedPoints() const
Returns the total number of processed points (i.e., using both increments and decrements).
CSOPathPointConstIterator & operator-=(int offset)
Steps to the previous point by the given offset.
CSOPathPointConstIterator prev() const
Returns an iterator to the prev path point if available; otherwise, it returns a CSOPathPointIterator...
CSOPathPointConstIterator(const CSO *cso, const CSOPathPoints *pathPoints, unsigned int startPointIndex=0)
Constructor.
unsigned int getPointIndex() const
Returns the index of the current point.
CSOPathPointConstIterator & operator--()
Steps to the previous point on the CSO (prefix).
Vector3 getPos() const
Returns the current point.
CSOPathPointConstIterator(const CSO *cso, unsigned int startPathIndex=0, unsigned int startPointIndex=0)
Constructor.
~CSOPathPointConstIterator()=default
Default destructor.
CSOPathPointConstIterator & operator=(const CSOPathPointConstIterator &rhs)
Assignment operator.
CSOPathPointConstIterator operator--(int dummy)
Steps to the previous point on the CSO (postfix).
const Vector4 & getPosValue() const
Returns the current point including its value.
unsigned int numPoints() const
Returns the total number of points of the CSO.
CSOPathPointConstIterator operator++(int dummy)
Steps to the next point on the CSO (postfix).
CSOPathPointConstIterator(const CSOPathPointConstIterator &rhs)
Copy constructor.
CSOPathPointConstIterator operator+(int offset) const
Steps to the next point by the given offset.
bool operator>(const CSOPathPointConstIterator &rhs) const
Comparison operator.
CSOPathPointConstIterator()
Default constructor.
bool operator>=(const CSOPathPointConstIterator &rhs) const
Comparison operator.
static const unsigned int INVALID_INDEX
const CSOPathPoints * getPathPoints() const
unsigned int numProcessedPoints() const
Returns the number of processed points (relative to the start).
CSOPathPointConstIterator & operator+=(int offset)
Steps to the next point by the given offset.
unsigned int getPathIndex() const
Returns the index of the current path.
bool operator<(const CSOPathPointConstIterator &rhs) const
Comparison operator.
const CSO * getCSO() const
Returns the CSO.
bool operator==(const CSOPathPointConstIterator &rhs) const
Comparison operator.
void resetCounters()
Resets the internal counters that define the number of processed points.
CSOPathPointConstIterator(const CSO *cso, const CSOSeedPoint *startSeedPoint)
Constructor.
bool operator<=(const CSOPathPointConstIterator &rhs) const
Comparison operator.
CSOPathPointConstIterator operator-(int offset) const
Steps to the previous point by the given offset.
CSOPathPointConstIterator next() const
Returns an iterator to the next path point if available; otherwise, it returns a CSOPathPointIterator...
CSOPathPointConstIterator(const CSO *cso, const CSOPathPoints *pathPoints, unsigned int startPathIndex, unsigned int startPointIndex=0)
Constructor.
double getValue() const
Returns the value of the current point.
void setPos(const Vector3 &p)
Sets the current point to the given value.
CSOPathPointIterator & operator--()
Steps to the previous point on the CSO (prefix).
const CSOPathPoints * getPathPoints() const
double getValue() const
Returns the value of the current point.
CSOPathPointIterator & operator=(const CSOPathPointIterator &rhs)
Assignment operator.
CSOPathPointIterator(const CSOPathPointIterator &rhs)
Copy constructor.
unsigned int getPathIndex() const
Returns the index of the current path.
bool isEnd() const
Returns if this iterator points to the end of the CSO.
void setPosValue(const Vector4 &p)
Sets the current point and its value to the given value.
CSOPathPointIterator operator--(int dummy)
Steps to the previous point on the CSO (postfix).
CSOPathPointIterator next() const
Returns an iterator to the next path point if available; otherwise, it returns a CSOPathPointIterator...
CSOPathPointIterator(CSO *cso, CSOSeedPoint *startSeedPoint)
Constructor.
CSOPathPointIterator operator++(int dummy)
Steps to the next point on the CSO (postfix).
static const unsigned int INVALID_INDEX
CSOPathPointIterator(CSO *cso, CSOPathPoints *pathPoints, unsigned int startPathIndex, unsigned int startPointIndex)
Constructor.
bool operator<(const CSOPathPointIterator &rhs) const
Comparison operator.
bool operator<=(const CSOPathPointIterator &rhs) const
Comparison operator.
CSO * getCSO()
Returns the CSO.
~CSOPathPointIterator()=default
Default destructor.
CSOPathPoints * getPathPoints()
void resetCounters()
Resets the internal counters that define the number of processed points.
unsigned int numProcessedPoints() const
Returns the number of processed points (relative to the start).
bool operator>(const CSOPathPointIterator &rhs) const
Comparison operator.
bool operator==(const CSOPathPointIterator &rhs) const
Comparison operator.
void makeEnd()
Makes this iterator pointing to the "end" of the CSO.
CSOPathPointIterator & operator-=(int offset)
Steps to the previous point by the given offset.
CSOPathPointIterator & operator+=(int offset)
Steps to the next point by the given offset.
CSOPathPointIterator prev() const
Returns an iterator to the prev path point if available; otherwise, it returns a CSOPathPointIterator...
unsigned int getPointIndex() const
Returns the index of the current point.
const Vector4 & getPosValue() const
Returns the current point including its value.
CSOPathPointIterator & operator++()
Steps to the next point on the CSO (prefix).
bool operator!=(const CSOPathPointIterator &rhs) const
Comparison operator.
CSOPathPointIterator(CSO *cso, CSOPathPoints *pathPoints, unsigned int startPointIndex)
Constructor.
CSOPathPointIterator(CSO *cso, unsigned int startPathIndex=0, unsigned int startPointIndex=0)
Constructor.
CSOPathPointIterator operator+(int offset) const
Steps to the next point by the given offset.
Vector3 getPos() const
Returns the current point.
unsigned int numTotalProcessedPoints() const
Returns the total number of processed points (i.e., using both increments and decrements).
CSOPathPointIterator()
Default constructor.
CSOPathPointIterator operator-(int offset) const
Steps to the previous point by the given offset.
void setValue(const double &v)
Sets the value of the current point to the given value.
unsigned int numPoints() const
Returns the total number of points of the CSO.
bool operator>=(const CSOPathPointIterator &rhs) const
Comparison operator.
const CSO * getCSO() const
Returns the CSO.
The CSOPathPoints is a list of world coordinates that are interpolated by a certain interpolation sch...
The CSOSeedPoint can be interactively set and modified, and is the framework for contours.
The CSO represents a contour segmentation object.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
T mlAbs(T a)
Defines ML specific abs template since only type-dependent library functions exists.
const CSOPathPointIterator CSOPathPointIteratorEnd
A symbolic iterator that indicates that a CSOPathPointIterator has reached the end of a CSO.
const CSOPathPointConstIterator CSOPathPointConstIteratorEnd
A symbolic iterator that indicates that a CSOPathPointConstIterator has reached the end of a CSO.