Skip to content

Commit

Permalink
fix SIP
Browse files Browse the repository at this point in the history
  • Loading branch information
NEDJIMAbelgacem authored and wonder-sk committed Jan 13, 2021
1 parent 432f29b commit b5e6033
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
Expand Up @@ -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
Expand All @@ -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<QMap<QString, QVariant>> res = sipCpp->identify( *a0, *a1, a2, a3, a4, a5, a6 );
QVector<QMap<QString, QVariant>> res = sipCpp->getPointsOnRay( *a0, *a1, a2, a3, a4, a5, a6 );
sipRes = PyList_New( res.size() );
for ( int i = 0; i < res.size(); ++i )
{
Expand Down
4 changes: 3 additions & 1 deletion src/core/geometry/qgsbox3d.h
Expand Up @@ -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 );

/**
Expand Down
14 changes: 7 additions & 7 deletions src/core/pointcloud/qgspointclouddataprovider.h
Expand Up @@ -125,24 +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 list of the identified points
* \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<QVariantMap> 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
* 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
Expand All @@ -151,14 +151,14 @@ class CORE_EXPORT QgsPointCloudDataProvider: public QgsDataProvider
* \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
* \return a list 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<QMap<QString, QVariant>> res = sipCpp->identify( *a0, *a1, a2, a3, a4, a5, a6 );
QVector<QMap<QString, QVariant>> res = sipCpp->getPointsOnRay( *a0, *a1, a2, a3, a4, a5, a6 );
sipRes = PyList_New( res.size() );
for ( int i = 0; i < res.size(); ++i )
{
Expand Down

0 comments on commit b5e6033

Please sign in to comment.