QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
geometry
qgsray3d.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsray3d.h
3
--------------------------------------
4
Date : January 2021
5
Copyright : (C) 2021 by Belgacem Nedjima
6
Email : belgacem dot nedjima at gmail dot com
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
#ifndef QGSRAY3D_H
16
#define QGSRAY3D_H
17
18
#include "
qgsbox3d.h
"
19
20
#include <QVector3D>
21
30
class
CORE_EXPORT
QgsRay3D
31
{
32
public
:
37
QgsRay3D
(
const
QVector3D &
origin
,
const
QVector3D &
direction
);
38
43
QVector3D
origin
()
const
{
return
mOrigin; }
44
49
QVector3D
direction
()
const
{
return
mDirection; }
50
56
QVector3D
directionInversed
()
const
{
return
mDirectionInversed; }
57
62
void
setOrigin(
const
QVector3D &origin );
63
69
void
setDirection(
const
QVector3D direction );
70
75
QVector3D projectedPoint(
const
QVector3D &point )
const
;
76
80
float
projectedDistance(
const
QVector3D &point )
const
;
81
83
bool
isInFront(
const
QVector3D &point )
const
;
85
double
angleToPoint(
const
QVector3D &point )
const
;
86
88
QVector3D point(
float
distance )
const
;
89
90
private
:
91
QVector3D mOrigin;
92
QVector3D mDirection;
93
QVector3D mDirectionInversed;
94
};
95
96
#endif
// QGSRAY3D_H
QgsRay3D::origin
QVector3D origin() const
Returns the origin of the ray.
Definition
qgsray3d.h:43
QgsRay3D::QgsRay3D
QgsRay3D(const QVector3D &origin, const QVector3D &direction)
Constructor.
Definition
qgsray3d.cpp:19
QgsRay3D::direction
QVector3D direction() const
Returns the direction of the ray see setDirection().
Definition
qgsray3d.h:49
QgsRay3D::directionInversed
QVector3D directionInversed() const
Returns a vector with the direction components inversed ( 1/x, 1/y, 1/z) This can be used as an optim...
Definition
qgsray3d.h:56
qgsbox3d.h
Generated on
for QGIS API Documentation by
1.17.0