QGIS API Documentation
3.4.15-Madeira (e83d02e274)
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
core
geometry
qgslinesegment.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgslinesegment.cpp
3
-----------------
4
begin : April 2018
5
copyright : (C) 2018 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#include "
qgslinesegment.h
"
19
#include "
qgsgeometryutils.h
"
20
21
int
QgsLineSegment2D::pointLeftOfLine
(
const
QgsPointXY
&point )
const
22
{
23
return
QgsGeometryUtils::leftOfLine
( point.
x
(), point.
y
(), mStart.
x
(), mStart.
y
(), mEnd.
x
(), mEnd.
y
() );
24
}
25
QgsPointXY::y
double y
Definition:
qgspointxy.h:48
QgsPointXY
A class to represent a 2D point.
Definition:
qgspointxy.h:43
qgslinesegment.h
QgsLineSegment2D::pointLeftOfLine
int pointLeftOfLine(const QgsPointXY &point) const
Tests if a point is to the left of the line segment.
Definition:
qgslinesegment.cpp:21
qgsgeometryutils.h
QgsPointXY::x
double x
Definition:
qgspointxy.h:47
QgsGeometryUtils::leftOfLine
static int leftOfLine(double x, double y, double x1, double y1, double x2, double y2)
Returns a value < 0 if the point (x, y) is left of the line from (x1, y1) -> ( x2, y2).
Definition:
qgsgeometryutils.cpp:534
Generated on Sun Jan 19 2020 15:27:13 for QGIS API Documentation by
1.8.11