QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgsraycastingutils.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsraycastingutils.h
3 --------------------------------------
4 Date : April 2024
5 Copyright : (C) 2024 by Matthias Kuhn
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSRAYCASTINGUTILS_H
17#define QGSRAYCASTINGUTILS_H
18
19#include <QMatrix4x4>
20#include <QVector3D>
21
22#define SIP_NO_FILE
23
24class QgsAABB;
25class QgsRay3D;
26
27namespace Qt3DRender
28{
29 class QGeometryRenderer;
30} // namespace Qt3DRender
31
33{
34
39 bool rayBoxIntersection( const QgsRay3D &ray, const QgsAABB &nodeBbox );
40
45 bool rayTriangleIntersection( const QgsRay3D &ray, float maxDist, const QVector3D &a, const QVector3D &b, const QVector3D &c, QVector3D &uvw, float &t );
46
53 bool rayMeshIntersection( Qt3DRender::QGeometryRenderer *geometryRenderer, const QgsRay3D &r, float maxDist, const QMatrix4x4 &worldTransform, QVector3D &intPt, int &triangleIndex );
54
55} // namespace QgsRayCastingUtils
56
57#endif // QGSRAYCASTINGUTILS_H
Axis-aligned bounding box - in world coords.
Definition qgsaabb.h:35
A representation of a ray in 3D.
Definition qgsray3d.h:31
bool rayBoxIntersection(const QgsRay3D &ray, const QgsAABB &nodeBbox)
Tests whether an axis aligned box is intersected by a ray.
bool rayMeshIntersection(Qt3DRender::QGeometryRenderer *geometryRenderer, const QgsRay3D &r, float maxDist, const QMatrix4x4 &worldTransform, QVector3D &intPt, int &triangleIndex)
Tests whether a triangular mesh is intersected by a ray.
bool rayTriangleIntersection(const QgsRay3D &ray, float maxDist, const QVector3D &a, const QVector3D &b, const QVector3D &c, QVector3D &uvw, float &t)
Tests whether a triangle is intersected by a ray.
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