16#ifndef QGSRAYCASTINGUTILS_P_H
17#define QGSRAYCASTINGUTILS_P_H
42 class QGeometryRenderer;
58 explicit Ray3D( QVector3D origin, QVector3D direction = QVector3D( 0.0f, 0.0f, 1.0f ),
float distance = 1.0f );
60 QVector3D origin()
const;
61 void setOrigin( QVector3D value );
63 QVector3D direction()
const;
64 void setDirection( QVector3D value );
66 float distance()
const;
67 void setDistance(
float distance );
69 bool contains( QVector3D point )
const;
70 bool contains(
const Ray3D &ray )
const;
72 QVector3D point(
float t )
const;
73 float projectedDistance( QVector3D point )
const;
75 QVector3D project( QVector3D vector )
const;
77 float distance( QVector3D point )
const;
79 Ray3D &transform(
const QMatrix4x4 &matrix );
80 Ray3D transformed(
const QMatrix4x4 &matrix )
const;
88 QVector3D m_direction;
89 float m_distance = 1.0f;
98 bool rayBoxIntersection(
const Ray3D &r,
const QgsAABB &aabb );
105 bool rayTriangleIntersection(
const Ray3D &ray,
118 bool rayMeshIntersection( Qt3DRender::QGeometryRenderer *geometryRenderer,
119 const QgsRayCastingUtils::Ray3D &r,
120 const QMatrix4x4 &worldTransform,
122 int &triangleIndex );
130 RayHit(
const float distance,
const QVector3D pos,
const QgsFeatureId fid =
FID_NULL,
const QVariantMap attributes = QVariantMap() )
131 : distance( distance )
134 , attributes( attributes )
140 QVariantMap attributes;
146 struct RayCastContext
148 RayCastContext(
bool singleResult =
true, QSize screenSize = QSize(),
float maxDistance = 0.f )
149 : singleResult( singleResult )
150 , screenSize( screenSize )
151 , maxDistance( maxDistance )
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)