21 , mDirection( direction.normalized() )
38 return mOrigin + QVector3D::dotProduct( point - mOrigin, mDirection ) * mDirection;
43 return QVector3D::dotProduct( ( point - mOrigin ).normalized(), mDirection ) >= 0.0;
52 QVector3D v1 = projPoint - mOrigin ;
53 QVector3D v2 = point - projPoint;
54 return qRadiansToDegrees( std::atan2( v2.length(), v1.length() ) );
QVector3D origin() const
Returns the origin of the ray.
QgsRay3D(const QVector3D &origin, const QVector3D &direction)
Constructor.
void setDirection(const QVector3D direction)
Sets the direction 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)
QVector3D direction() const
Returns the direction of the ray see setDirection()
double angleToPoint(const QVector3D &point) const
Returns the angle between the ray and the vector from the ray's origin and the point point.
void setOrigin(const QVector3D &origin)
Sets the origin of the ray.
bool isInFront(const QVector3D &point) const
Checks whether the point is in front of the ray.