16#ifndef QGSRAYCASTINGUTILS_P_H
17#define QGSRAYCASTINGUTILS_P_H
57 explicit Ray3D( QVector3D origin, QVector3D direction = QVector3D( 0.0f, 0.0f, 1.0f ),
float distance = 1.0f );
59 QVector3D origin()
const;
60 void setOrigin( QVector3D value );
62 QVector3D direction()
const;
63 void setDirection( QVector3D value );
65 float distance()
const;
66 void setDistance(
float distance );
68 bool contains( QVector3D point )
const;
69 bool contains(
const Ray3D &ray )
const;
71 QVector3D point(
float t )
const;
72 float projectedDistance( QVector3D point )
const;
74 QVector3D project( QVector3D vector )
const;
76 float distance( QVector3D point )
const;
78 Ray3D &transform(
const QMatrix4x4 &matrix );
79 Ray3D transformed(
const QMatrix4x4 &matrix )
const;
87 QVector3D m_direction;
88 float m_distance = 1.0f;
97 bool rayBoxIntersection(
const Ray3D &r,
const QgsAABB &aabb );
104 bool rayTriangleIntersection(
const Ray3D &ray,
117 RayHit(
const float distance,
const QVector3D pos,
const QgsFeatureId fid =
FID_NULL,
const QVariantMap attributes = QVariantMap() )
118 : distance( distance )
121 , attributes( attributes )
127 QVariantMap attributes;
133 struct RayCastContext
135 RayCastContext(
bool singleResult =
true, QSize screenSize = QSize(),
float maxDistance = 0.f )
136 : singleResult( singleResult )
137 , screenSize( screenSize )
138 , 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)