Marble

GeoDataViewVolume.cpp
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2013 Mohammed Nafees <[email protected]>
4 //
5 
6 #include "GeoDataViewVolume.h"
7 
8 #include "GeoDataTypes.h"
9 
10 namespace Marble
11 {
12 
13 class GeoDataViewVolumePrivate
14 {
15 public:
16  GeoDataViewVolumePrivate();
17 
18  qreal m_leftFov;
19  qreal m_rightFov;
20  qreal m_bottomFov;
21  qreal m_topFov;
22  qreal m_near;
23 };
24 
25 GeoDataViewVolumePrivate::GeoDataViewVolumePrivate() :
26  m_leftFov(),
27  m_rightFov(),
28  m_bottomFov(),
29  m_topFov(),
30  m_near()
31 {
32  // nothing to do
33 }
34 
35 GeoDataViewVolume::GeoDataViewVolume() : d( new GeoDataViewVolumePrivate )
36 {
37  // nothing to do
38 }
39 
40 GeoDataViewVolume::GeoDataViewVolume( const Marble::GeoDataViewVolume &other ) :
41  GeoDataObject(), d( new GeoDataViewVolumePrivate( *other.d ) )
42 {
43  // nothing to do
44 }
45 
46 GeoDataViewVolume &GeoDataViewVolume::operator=( const GeoDataViewVolume &other )
47 {
48  GeoDataObject::operator=( other );
49  *d = *other.d;
50  return *this;
51 }
52 
53 bool GeoDataViewVolume::operator==(const GeoDataViewVolume& other) const
54 {
55  return equals(other)
56  && d->m_leftFov == other.d->m_leftFov
57  && d->m_rightFov == other.d->m_rightFov
58  && d->m_topFov == other.d->m_topFov
59  && d->m_bottomFov == other.d->m_bottomFov
60  && d->m_near == other.d->m_near;
61 }
62 
63 bool GeoDataViewVolume::operator!=(const GeoDataViewVolume& other) const
64 {
65  return !this->operator==(other);
66 }
67 
68 GeoDataViewVolume::~GeoDataViewVolume()
69 {
70  delete d;
71 }
72 
73 const char *GeoDataViewVolume::nodeType() const
74 {
75  return GeoDataTypes::GeoDataViewVolumeType;
76 }
77 
78 qreal GeoDataViewVolume::leftFov() const
79 {
80  return d->m_leftFov;
81 }
82 
83 void GeoDataViewVolume::setLeftFov(qreal leftFov)
84 {
85  d->m_leftFov = leftFov;
86 }
87 
88 qreal GeoDataViewVolume::rightFov() const
89 {
90  return d->m_rightFov;
91 }
92 
93 void GeoDataViewVolume::setRightFov(qreal rightFov)
94 {
95  d->m_rightFov = rightFov;
96 }
97 
98 qreal GeoDataViewVolume::bottomFov() const
99 {
100  return d->m_bottomFov;
101 }
102 
103 void GeoDataViewVolume::setBottomFov(qreal bottomFov)
104 {
105  d->m_bottomFov = bottomFov;
106 }
107 
108 qreal GeoDataViewVolume::topFov() const
109 {
110  return d->m_topFov;
111 }
112 
113 void GeoDataViewVolume::setTopFov(qreal topFov)
114 {
115  d->m_topFov = topFov;
116 }
117 
118 qreal GeoDataViewVolume::near() const
119 {
120  return d->m_near;
121 }
122 
123 void GeoDataViewVolume::setNear(qreal near)
124 {
125  d->m_near = near;
126 }
127 
128 }
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:12:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.