mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -04:00
fix sip and add Nyall suggestions
This commit is contained in:
parent
6caf1bfe32
commit
fa7e3d4f7d
74
python/core/auto_generated/geometry/qgsray3d.sip.in
Normal file
74
python/core/auto_generated/geometry/qgsray3d.sip.in
Normal file
@ -0,0 +1,74 @@
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/geometry/qgsray3d.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
class QgsRay3D
|
||||
{
|
||||
%Docstring
|
||||
A representation of a ray in 3D.
|
||||
|
||||
A ray is composed of an origin point (the start of the ray) and a direction vector.
|
||||
|
||||
.. versionadded:: 3.18
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgsray3d.h"
|
||||
%End
|
||||
public:
|
||||
QgsRay3D( const QVector3D &origin, const QVector3D &direction );
|
||||
%Docstring
|
||||
Constructor
|
||||
%End
|
||||
|
||||
QVector3D origin() const;
|
||||
%Docstring
|
||||
Returns the origin of the ray
|
||||
%End
|
||||
QVector3D direction() const;
|
||||
%Docstring
|
||||
Returns the direction of the ray
|
||||
%End
|
||||
|
||||
void setOrigin( const QVector3D &origin );
|
||||
%Docstring
|
||||
Sets the origin of the ray
|
||||
%End
|
||||
void setDirection( const QVector3D direction );
|
||||
%Docstring
|
||||
Sets the direction of the ray
|
||||
%End
|
||||
|
||||
QVector3D projectedPoint( const QVector3D &point ) const;
|
||||
%Docstring
|
||||
Returns the projection of the point on the ray
|
||||
(which is the closest point of the ray to ``point``)
|
||||
%End
|
||||
bool intersectsWith( const QgsBox3d &box ) const;
|
||||
%Docstring
|
||||
Checks whether the ray intersects with ``box``
|
||||
%End
|
||||
bool isInFront( const QVector3D &point ) const;
|
||||
%Docstring
|
||||
Checks whether the point is in front of the ray
|
||||
%End
|
||||
double angleToPoint( const QVector3D &point ) const;
|
||||
%Docstring
|
||||
Returns the angle between the ray and the vector from the ray's origin and the point ``point``
|
||||
%End
|
||||
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/core/geometry/qgsray3d.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
@ -316,6 +316,7 @@
|
||||
%Include auto_generated/geometry/qgstriangle.sip
|
||||
%Include auto_generated/geometry/qgswkbptr.sip
|
||||
%Include auto_generated/geometry/qgswkbtypes.sip
|
||||
%Include auto_generated/geometry/qgsray3d.sip
|
||||
%Include auto_generated/gps/qgsgpsconnection.sip
|
||||
%Include auto_generated/gps/qgsgpsdconnection.sip
|
||||
%Include auto_generated/gps/qgsgpsdetector.sip
|
||||
|
@ -130,16 +130,6 @@ Returns a pointer to the identify menu which will be used in layer selection mod
|
||||
this menu can also be customized
|
||||
%End
|
||||
|
||||
static void fromPointCloudIdentificationToIdentifyResults( QgsPointCloudLayer *layer, const QVector<QVariantMap> &identified, QList<QgsMapToolIdentify::IdentifyResult> &results );
|
||||
%Docstring
|
||||
Converts point cloud identification results from variant maps to QgsMapToolIdentify.IdentifyResult and apply some formatting
|
||||
|
||||
.. note::
|
||||
|
||||
: the converted variant maps are pushed at the back of ``results`` without cleaning what's in it previously
|
||||
|
||||
.. versionadded:: 3.18
|
||||
%End
|
||||
|
||||
public slots:
|
||||
void formatChanged( QgsRasterLayer *layer );
|
||||
|
@ -1120,12 +1120,12 @@ void Qgs3DMapScene::identifyPointCloudOnRay( QVector<QPair<QgsMapLayer *, QVecto
|
||||
{
|
||||
if ( layer->type() != QgsMapLayerType::PointCloudLayer )
|
||||
continue;
|
||||
if ( QgsPointCloudLayer *pc = dynamic_cast<QgsPointCloudLayer *>( layer ) )
|
||||
if ( QgsPointCloudLayer *pc = qobject_cast<QgsPointCloudLayer *>( layer ) )
|
||||
{
|
||||
QgsPointCloudLayer3DRenderer *renderer = dynamic_cast<QgsPointCloudLayer3DRenderer *>( pc->renderer3D() );
|
||||
const QgsPointCloud3DSymbol *symbol = renderer->symbol();
|
||||
// Symbol can be null in case of no rendering enabled
|
||||
if ( symbol == nullptr )
|
||||
if ( !symbol )
|
||||
continue;
|
||||
double maxScreenError = renderer->maximumScreenError();
|
||||
double pointSize = symbol->pointSize();
|
||||
|
@ -98,7 +98,7 @@ void Qgs3DMapToolIdentify::mouseReleaseEvent( QMouseEvent *event )
|
||||
QList<QgsMapToolIdentify::IdentifyResult> identifyResults;
|
||||
for ( int i = 0; i < layerPoints.size(); ++i )
|
||||
{
|
||||
QgsPointCloudLayer *pcLayer = dynamic_cast< QgsPointCloudLayer * >( layerPoints[i].first );
|
||||
QgsPointCloudLayer *pcLayer = qobject_cast< QgsPointCloudLayer * >( layerPoints[i].first );
|
||||
QgsMapToolIdentify::fromPointCloudIdentificationToIdentifyResults( pcLayer, layerPoints[i].second, identifyResults );
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,7 @@
|
||||
class CORE_EXPORT QgsRay3D
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
QgsRay3D( const QVector3D &origin, const QVector3D &direction );
|
||||
|
||||
//! Returns the origin of the ray
|
||||
|
@ -457,7 +457,7 @@ QVector<QVariantMap> QgsPointCloudDataProvider::getPointsOnRay( const QgsRay3D &
|
||||
pointAttr[ QStringLiteral( "X" ) ] = x;
|
||||
pointAttr[ QStringLiteral( "Y" ) ] = y;
|
||||
pointAttr[ QStringLiteral( "Z" ) ] = z;
|
||||
pointAttr[ QStringLiteral( "Distance to camera" ) ] = ( point - ray.origin() ).length();
|
||||
pointAttr[ tr( "Distance to camera" ) ] = ( point - ray.origin() ).length();
|
||||
points.push_back( pointAttr );
|
||||
}
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ class GUI_EXPORT QgsMapToolIdentify : public QgsMapTool
|
||||
* \note : the converted variant maps are pushed at the back of \a results without cleaning what's in it previously
|
||||
* \since QGIS 3.18
|
||||
*/
|
||||
static void fromPointCloudIdentificationToIdentifyResults( QgsPointCloudLayer *layer, const QVector<QVariantMap> &identified, QList<QgsMapToolIdentify::IdentifyResult> &results );
|
||||
static void fromPointCloudIdentificationToIdentifyResults( QgsPointCloudLayer *layer, const QVector<QVariantMap> &identified, QList<QgsMapToolIdentify::IdentifyResult> &results ) SIP_SKIP;
|
||||
|
||||
public slots:
|
||||
void formatChanged( QgsRasterLayer *layer );
|
||||
|
Loading…
x
Reference in New Issue
Block a user