CartoType C++ API 8.8-7-gb35e4dc71
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | List of all members
CartoTypeCore::PathIterator Class Reference

#include <cartotype_path.h>

Public Member Functions

 PathIterator (const MPath &aPath)
 
bool Forward (double aDistance)
 
bool NextContour ()
 
void MoveToNearestPoint (const PointFP &aPoint)
 
size_t ContourIndex () const
 
ContourView ContourByIndex () const
 
size_t LineIndex () const
 
double PositionOnLine () const
 
const PointPosition () 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

◆ PathIterator()

CartoTypeCore::PathIterator::PathIterator ( const MPath aPath)

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

Member Function Documentation

◆ ContourByIndex()

ContourView CartoTypeCore::PathIterator::ContourByIndex ( ) const
inline

Returns the current contour.

◆ ContourIndex()

size_t CartoTypeCore::PathIterator::ContourIndex ( ) const
inline

Returns the current contour index.

◆ Direction()

double CartoTypeCore::PathIterator::Direction ( ) const
inline

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

◆ Forward()

bool CartoTypeCore::PathIterator::Forward ( double  aDistance)

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

◆ LineIndex()

size_t CartoTypeCore::PathIterator::LineIndex ( ) const
inline

Returns the current line index.

◆ MoveToNearestPoint()

void CartoTypeCore::PathIterator::MoveToNearestPoint ( const PointFP aPoint)

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

◆ NextContour()

bool CartoTypeCore::PathIterator::NextContour ( )

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

◆ Position()

const Point & CartoTypeCore::PathIterator::Position ( ) const
inline

Returns the current position.

◆ PositionOnLine()

double CartoTypeCore::PathIterator::PositionOnLine ( ) const
inline

Returns the current position along the current line.


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