diff --git a/python/core/auto_generated/pointcloud/qgspointclouddataprovider.sip.in b/python/core/auto_generated/pointcloud/qgspointclouddataprovider.sip.in index 3b0262d01d0..d2a2413fe6f 100644 --- a/python/core/auto_generated/pointcloud/qgspointclouddataprovider.sip.in +++ b/python/core/auto_generated/pointcloud/qgspointclouddataprovider.sip.in @@ -92,7 +92,7 @@ the number of points returned to ``pointsLimit`` points SIP_PYLIST getPointsOnRay( const QVector3D &rayOrigin, const QVector3D &rayDirection, double maxScreenError, double cameraFov, int screenSizePx, double pointAngle, int pointsLimit = 1000 ); %Docstring -Returns the Points that are on a ray +Returns the points that are on a ray :param rayOrigin: : The origin of the ray in layer coordinates :param rayDirection: : The direction of the ray in layer coordinates @@ -102,13 +102,13 @@ Returns the Points that are on a ray :param pointAngle: : the maximum accepted angle between the point and it's projected point on the ray in degrees :param pointsLimit: : the maximum number of points returned -:return: a vector of the identified points +:return: a list of the identified points .. versionadded:: 3.18 %End %MethodCode { - QVector> res = sipCpp->identify( *a0, *a1, a2, a3, a4, a5, a6 ); + QVector> res = sipCpp->getPointsOnRay( *a0, *a1, a2, a3, a4, a5, a6 ); sipRes = PyList_New( res.size() ); for ( int i = 0; i < res.size(); ++i ) { diff --git a/src/core/geometry/qgsbox3d.h b/src/core/geometry/qgsbox3d.h index 0e280fe0ce9..a6cccca1bbf 100644 --- a/src/core/geometry/qgsbox3d.h +++ b/src/core/geometry/qgsbox3d.h @@ -198,7 +198,9 @@ class CORE_EXPORT QgsBox3d */ bool contains( const QgsPoint &point ) const; - //! Returns shortest distance from the box to a point + /** + * Returns shortest distance from the box to a point + */ float distanceFromPoint( double x, double y, double z ); /** diff --git a/src/core/pointcloud/qgspointclouddataprovider.h b/src/core/pointcloud/qgspointclouddataprovider.h index 3b549c12c0e..e8d4b3b84b6 100644 --- a/src/core/pointcloud/qgspointclouddataprovider.h +++ b/src/core/pointcloud/qgspointclouddataprovider.h @@ -125,7 +125,24 @@ class CORE_EXPORT QgsPointCloudDataProvider: public QgsDataProvider #ifndef SIP_RUN /** - * Returns the Points that are on a ray + * Returns the points that are on a ray + * + * \param rayOrigin : The origin of the ray in layer coordinates + * \param rayDirection : The direction of the ray in layer coordinates + * \param maxScreenError : Maximum screen error (as taken from the 3D point cloud layer renderer) + * \param cameraFov : The field of view of the camera in degrees + * \param screenSizePx : The size of the screen's viewport in pixels + * \param pointAngle : The maximum accepted angle between the point and it's projected point on the ray in degrees + * \param pointsLimit : The maximum number of points returned + * \return a vector of the identified points + * + * \since QGIS 3.18 + */ + QVector getPointsOnRay( const QVector3D &rayOrigin, const QVector3D &rayDirection, double maxScreenError, double cameraFov, int screenSizePx, double pointAngle, int pointsLimit = 1000 ); +#else + + /** + * Returns the points that are on a ray * * \param rayOrigin : The origin of the ray in layer coordinates * \param rayDirection : The direction of the ray in layer coordinates @@ -138,27 +155,10 @@ class CORE_EXPORT QgsPointCloudDataProvider: public QgsDataProvider * * \since QGIS 3.18 */ - QVector getPointsOnRay( const QVector3D &rayOrigin, const QVector3D &rayDirection, double maxScreenError, double cameraFov, int screenSizePx, double pointAngle, int pointsLimit = 1000 ); -#else - - /** - * Returns the Points that are on a ray - * - * \param rayOrigin : The origin of the ray in layer coordinates - * \param rayDirection : The direction of the ray in layer coordinates - * \param maxScreenError : Maximum screen error (as taken from the 3D point cloud layer renderer) - * \param cameraFov : The field of view of the camera in degrees - * \param screenSizePx : The size of the screen's viewport in pixels - * \param pointAngle : the maximum accepted angle between the point and it's projected point on the ray in degrees - * \param pointsLimit : the maximum number of points returned - * \return a vector of the identified points - * - * \since QGIS 3.18 - */ SIP_PYLIST getPointsOnRay( const QVector3D &rayOrigin, const QVector3D &rayDirection, double maxScreenError, double cameraFov, int screenSizePx, double pointAngle, int pointsLimit = 1000 ); % MethodCode { - QVector> res = sipCpp->identify( *a0, *a1, a2, a3, a4, a5, a6 ); + QVector> res = sipCpp->getPointsOnRay( *a0, *a1, a2, a3, a4, a5, a6 ); sipRes = PyList_New( res.size() ); for ( int i = 0; i < res.size(); ++i ) {