CartoType C++ API 7.8.2, 2022-03-25
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | List of all members
CartoType::TPathIterator Class Reference

#include <cartotype_path.h>

Public Member Functions

 TPathIterator (const MPath &aPath)
bool Forward (double aDistance)
bool NextContour ()
void MoveToNearestPoint (const TPointFP &aPoint)
size_t ContourIndex () const
TContour Contour () const
size_t LineIndex () const
double PositionOnLine () const
const TPointPosition () const
double Direction () const

Detailed Description

An iterator to traverse a path. Limitation: for the moment it works with straight lines only; it treats all points as on-curve points.

Constructor & Destructor Documentation

◆ TPathIterator()

CartoType::TPathIterator::TPathIterator ( const MPath aPath)

Creates a path iterator over aPath and sets it to the start of aPath.

Member Function Documentation

◆ Contour()

TContour CartoType::TPathIterator::Contour ( ) const

Returns the current contour.

◆ ContourIndex()

size_t CartoType::TPathIterator::ContourIndex ( ) const

Returns the current contour index.

◆ Direction()

double CartoType::TPathIterator::Direction ( ) const

Returns the current direction in radians, clockwise from straight up, as an angle on the map, not a geodetic azimuth.

◆ Forward()

bool CartoType::TPathIterator::Forward ( double  aDistance)

Moves forwards by aDistance. Returns false if already at the end of the path, true if not.

◆ LineIndex()

size_t CartoType::TPathIterator::LineIndex ( ) const

Returns the current line index.

◆ MoveToNearestPoint()

void CartoType::TPathIterator::MoveToNearestPoint ( const TPointFP aPoint)

Set the path iterator's current position to the nearest point to aPoint.

◆ NextContour()

bool CartoType::TPathIterator::NextContour ( )

Moves to the start of the next contour of the path. Returns true if the move was possible.

◆ Position()

const TPoint & CartoType::TPathIterator::Position ( ) const

Returns the current position.

◆ PositionOnLine()

double CartoType::TPathIterator::PositionOnLine ( ) const

Returns the current position along the current line.

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