QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
A representation of a ray in 3D. More...
#include <qgsray3d.h>
Public Member Functions | |
QgsRay3D (const QVector3D &origin, const QVector3D &direction) | |
Constructor. | |
double | angleToPoint (const QVector3D &point) const |
Returns the angle between the ray and the vector from the ray's origin and the point point. | |
QVector3D | direction () const |
Returns the direction of the ray see setDirection() | |
bool | isInFront (const QVector3D &point) const |
Checks whether the point is in front of the ray. | |
QVector3D | origin () const |
Returns the origin of the ray. | |
QVector3D | projectedPoint (const QVector3D &point) const |
Returns the projection of the point on the ray (which is the closest point of the ray to point) | |
void | setDirection (const QVector3D direction) |
Sets the direction of the ray. | |
void | setOrigin (const QVector3D &origin) |
Sets the origin of the ray. | |
A representation of a ray in 3D.
A ray is composed of an origin point (the start of the ray) and a direction vector.
Definition at line 30 of file qgsray3d.h.
QgsRay3D::QgsRay3D | ( | const QVector3D & | origin, |
const QVector3D & | direction | ||
) |
Constructor.
Definition at line 19 of file qgsray3d.cpp.
double QgsRay3D::angleToPoint | ( | const QVector3D & | point | ) | const |
Returns the angle between the ray and the vector from the ray's origin and the point point.
Definition at line 46 of file qgsray3d.cpp.
|
inline |
Returns the direction of the ray see setDirection()
Definition at line 50 of file qgsray3d.h.
bool QgsRay3D::isInFront | ( | const QVector3D & | point | ) | const |
Checks whether the point is in front of the ray.
Definition at line 41 of file qgsray3d.cpp.
|
inline |
QVector3D QgsRay3D::projectedPoint | ( | const QVector3D & | point | ) | const |
Returns the projection of the point on the ray (which is the closest point of the ray to point)
Definition at line 36 of file qgsray3d.cpp.
void QgsRay3D::setDirection | ( | const QVector3D | direction | ) |
Sets the direction of the ray.
Definition at line 31 of file qgsray3d.cpp.
void QgsRay3D::setOrigin | ( | const QVector3D & | origin | ) |