16 #ifndef QGSRAYCASTINGUTILS_P_H
17 #define QGSRAYCASTINGUTILS_P_H
42 namespace QgsRayCastingUtils
54 explicit Ray3D( QVector3D origin, QVector3D direction = QVector3D( 0.0f, 0.0f, 1.0f ),
float distance = 1.0f );
56 QVector3D origin()
const;
57 void setOrigin( QVector3D value );
59 QVector3D direction()
const;
60 void setDirection( QVector3D value );
62 float distance()
const;
63 void setDistance(
float distance );
65 bool contains( QVector3D point )
const;
66 bool contains(
const Ray3D &ray )
const;
68 QVector3D point(
float t )
const;
69 float projectedDistance( QVector3D point )
const;
71 QVector3D project( QVector3D vector )
const;
73 float distance( QVector3D point )
const;
75 Ray3D &transform(
const QMatrix4x4 &matrix );
76 Ray3D transformed(
const QMatrix4x4 &matrix )
const;
84 QVector3D m_direction;
85 float m_distance = 1.0f;
94 bool rayBoxIntersection(
const Ray3D &r,
const QgsAABB &aabb );
101 bool rayTriangleIntersection(
const Ray3D &ray,
111 #endif // QGSRAYCASTINGUTILS_P_H