Improve documentation for QgsGeometry::closestVertex

This commit is contained in:
Nyall Dawson 2016-04-06 17:07:02 +10:00
parent 5247673cda
commit 3a1f6c429d
2 changed files with 20 additions and 2 deletions

View File

@ -171,8 +171,17 @@ class QgsGeometry
/**
* Returns the vertex closest to the given point, the corresponding vertex index, squared distance snap point / target point
* and the indices of the vertices before/after. The vertices before/after are -1 if not present
* and the indices of the vertices before and after the closest vertex.
* @param point point to search for
* @param atVertex will be set to the vertex index of the closest found vertex
* @param beforeVertex will be set to the vertex index of the previous vertex from the closest one. Will be set to -1 if
* not present.
* @param afterVertex will be set to the vertex index of the next vertex after the closest one. Will be set to -1 if
* not present.
* @param sqrDist will be set to the square distance between the closest vertex and the specified point
* @returns closest point in geometry
*/
//TODO QGIS 3.0 - rename beforeVertex to previousVertex, afterVertex to nextVertex
QgsPoint closestVertex( const QgsPoint& point, int& atVertex /Out/, int& beforeVertex /Out/, int& afterVertex /Out/, double& sqrDist /Out/ ) const;
/**

View File

@ -213,8 +213,17 @@ class CORE_EXPORT QgsGeometry
/**
* Returns the vertex closest to the given point, the corresponding vertex index, squared distance snap point / target point
* and the indices of the vertices before/after. The vertices before/after are -1 if not present
* and the indices of the vertices before and after the closest vertex.
* @param point point to search for
* @param atVertex will be set to the vertex index of the closest found vertex
* @param beforeVertex will be set to the vertex index of the previous vertex from the closest one. Will be set to -1 if
* not present.
* @param afterVertex will be set to the vertex index of the next vertex after the closest one. Will be set to -1 if
* not present.
* @param sqrDist will be set to the square distance between the closest vertex and the specified point
* @returns closest point in geometry
*/
//TODO QGIS 3.0 - rename beforeVertex to previousVertex, afterVertex to nextVertex
QgsPoint closestVertex( const QgsPoint& point, int& atVertex, int& beforeVertex, int& afterVertex, double& sqrDist ) const;
/**