QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
3d
qgscrosssection.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgscrosssection.h
3
---------------------
4
begin : January 2026
5
copyright : (C) 2026 by Dominik Cindrić
6
email : viper dot miniq 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
16
#ifndef QGSCROSSSECTION_H
17
#define QGSCROSSSECTION_H
18
19
#include "qgis_3d.h"
20
#include "
qgsgeometry.h
"
21
#include "
qgspointxy.h
"
22
23
class
QgsCoordinateTransform
;
24
32
class
_3D_EXPORT
QgsCrossSection
33
{
34
public
:
36
QgsCrossSection
() =
default
;
37
39
QgsCrossSection
(
const
QgsPoint
&p1,
const
QgsPoint
&p2,
double
halfWidth
);
40
45
bool
isValid
()
const
;
46
48
QgsPoint
startPoint
()
const
{
return
mStartPoint; }
49
51
QgsPoint
endPoint
()
const
{
return
mEndPoint; }
52
54
double
halfWidth
()
const
{
return
mHalfWidth; }
55
57
void
setHalfWidth
(
const
double
halfWidth
) { mHalfWidth =
halfWidth
; }
58
64
QgsGeometry
asGeometry(
const
QgsCoordinateTransform
*ct =
nullptr
)
const
;
65
67
void
nudgeLeft(
double
distance );
68
70
void
nudgeRight(
double
distance );
71
72
private
:
73
QgsPoint
mStartPoint;
74
QgsPoint
mEndPoint;
75
double
mHalfWidth = 0.0;
76
77
void
nudge(
double
distance );
78
};
79
80
#endif
// QGSCROSSSECTION_H
QgsCoordinateTransform
Handles coordinate transforms between two coordinate systems.
Definition
qgscoordinatetransform.h:63
QgsCrossSection::halfWidth
double halfWidth() const
Returns the half-width of the cross section.
Definition
qgscrosssection.h:54
QgsCrossSection::endPoint
QgsPoint endPoint() const
Returns the end point of the cross section.
Definition
qgscrosssection.h:51
QgsCrossSection::setHalfWidth
void setHalfWidth(const double halfWidth)
Sets the half-width of the cross section.
Definition
qgscrosssection.h:57
QgsCrossSection::QgsCrossSection
QgsCrossSection()=default
Constructs an invalid cross section.
QgsCrossSection::isValid
bool isValid() const
Returns cross section validity.
Definition
qgscrosssection.cpp:92
QgsCrossSection::startPoint
QgsPoint startPoint() const
Returns the start point of the cross section.
Definition
qgscrosssection.h:48
QgsGeometry
A geometry is the spatial representation of a feature.
Definition
qgsgeometry.h:267
QgsPoint
Point geometry type, with support for z-dimension and m-values.
Definition
qgspoint.h:53
qgsgeometry.h
qgspointxy.h
Generated on
for QGIS API Documentation by
1.17.0