Skip to content

Commit

Permalink
fix code_layout
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 f363877 commit 6caf1bf
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 6 deletions.
Expand Up @@ -90,7 +90,7 @@ the number of points returned to ``pointsLimit`` points
%End


SIP_PYLIST getPointsOnRay( const QVector3D &rayOrigin, const QVector3D &rayDirection, double maxScreenError, double cameraFov, int screenSizePx, double pointAngle, int pointsLimit = 1000 );
SIP_PYLIST getPointsOnRay( const QgsRay3D &ray, double maxScreenError, double cameraFov, int screenSizePx, double pointAngle, int pointsLimit = 1000 );
%Docstring
Returns the points that are on a ray

Expand All @@ -108,7 +108,7 @@ Returns the points that are on a ray
%End
%MethodCode
{
QVector<QMap<QString, QVariant>> res = sipCpp->getPointsOnRay( *a0, *a1, a2, a3, a4, a5, a6 );
QVector<QMap<QString, QVariant>> res = sipCpp->getPointsOnRay( *a0, a2, a3, a4, a5, a6 );
sipRes = PyList_New( res.size() );
for ( int i = 0; i < res.size(); ++i )
{
Expand Down
14 changes: 14 additions & 0 deletions src/core/geometry/qgsray3d.cpp
@@ -1,3 +1,17 @@
/***************************************************************************
qgsray3d.cpp
--------------------------------------
Date : January 2021
Copyright : (C) 2021 by Belgacem Nedjima
Email : belgacem dot nedjima at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "qgsray3d.h"

#include "qgsrange.h"
Expand Down
14 changes: 14 additions & 0 deletions src/core/geometry/qgsray3d.h
@@ -1,3 +1,17 @@
/***************************************************************************
qgsray3d.h
--------------------------------------
Date : January 2021
Copyright : (C) 2021 by Belgacem Nedjima
Email : belgacem dot nedjima at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSRAY3D_H
#define QGSRAY3D_H

Expand Down
7 changes: 3 additions & 4 deletions src/core/pointcloud/qgspointclouddataprovider.h
Expand Up @@ -129,8 +129,7 @@ class CORE_EXPORT QgsPointCloudDataProvider: public QgsDataProvider
/**
* 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 ray : 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
Expand All @@ -157,10 +156,10 @@ class CORE_EXPORT QgsPointCloudDataProvider: public QgsDataProvider
*
* \since QGIS 3.18
*/
SIP_PYLIST getPointsOnRay( const QVector3D &rayOrigin, const QVector3D &rayDirection, double maxScreenError, double cameraFov, int screenSizePx, double pointAngle, int pointsLimit = 1000 );
SIP_PYLIST getPointsOnRay( const QgsRay3D &ray, double maxScreenError, double cameraFov, int screenSizePx, double pointAngle, int pointsLimit = 1000 );
% MethodCode
{
QVector<QMap<QString, QVariant>> res = sipCpp->getPointsOnRay( *a0, *a1, a2, a3, a4, a5, a6 );
QVector<QMap<QString, QVariant>> res = sipCpp->getPointsOnRay( *a0, a2, a3, a4, a5, a6 );
sipRes = PyList_New( res.size() );
for ( int i = 0; i < res.size(); ++i )
{
Expand Down

0 comments on commit 6caf1bf

Please sign in to comment.