• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • geodata
  • data
GeoDataViewVolume.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2013 Mohammed Nafees <nafees.technocool@gmail.com>
9 //
10 
11 #include "GeoDataViewVolume.h"
12 
13 #include "GeoDataTypes.h"
14 
15 namespace Marble
16 {
17 
18 class GeoDataViewVolumePrivate
19 {
20 public:
21  GeoDataViewVolumePrivate();
22 
23  qreal m_leftFov;
24  qreal m_rightFov;
25  qreal m_bottomFov;
26  qreal m_topFov;
27  qreal m_near;
28 };
29 
30 GeoDataViewVolumePrivate::GeoDataViewVolumePrivate() :
31  m_leftFov(),
32  m_rightFov(),
33  m_bottomFov(),
34  m_topFov(),
35  m_near()
36 {
37  // nothing to do
38 }
39 
40 GeoDataViewVolume::GeoDataViewVolume() : d( new GeoDataViewVolumePrivate )
41 {
42  // nothing to do
43 }
44 
45 GeoDataViewVolume::GeoDataViewVolume( const Marble::GeoDataViewVolume &other ) :
46  GeoDataObject(), d( new GeoDataViewVolumePrivate( *other.d ) )
47 {
48  // nothing to do
49 }
50 
51 GeoDataViewVolume &GeoDataViewVolume::operator=( const GeoDataViewVolume &other )
52 {
53  GeoDataObject::operator=( other );
54  *d = *other.d;
55  return *this;
56 }
57 
58 bool GeoDataViewVolume::operator==(const GeoDataViewVolume& other) const
59 {
60  return equals(other)
61  && d->m_leftFov == other.d->m_leftFov
62  && d->m_rightFov == other.d->m_rightFov
63  && d->m_topFov == other.d->m_topFov
64  && d->m_bottomFov == other.d->m_bottomFov
65  && d->m_near == other.d->m_near;
66 }
67 
68 bool GeoDataViewVolume::operator!=(const GeoDataViewVolume& other) const
69 {
70  return !this->operator==(other);
71 }
72 
73 GeoDataViewVolume::~GeoDataViewVolume()
74 {
75  delete d;
76 }
77 
78 const char *GeoDataViewVolume::nodeType() const
79 {
80  return GeoDataTypes::GeoDataViewVolumeType;
81 }
82 
83 qreal GeoDataViewVolume::leftFov() const
84 {
85  return d->m_leftFov;
86 }
87 
88 void GeoDataViewVolume::setLeftFov( const qreal &leftFov )
89 {
90  d->m_leftFov = leftFov;
91 }
92 
93 qreal GeoDataViewVolume::rightFov() const
94 {
95  return d->m_rightFov;
96 }
97 
98 void GeoDataViewVolume::setRightFov( const qreal &rightFov )
99 {
100  d->m_rightFov = rightFov;
101 }
102 
103 qreal GeoDataViewVolume::bottomFov() const
104 {
105  return d->m_bottomFov;
106 }
107 
108 void GeoDataViewVolume::setBottomFov( const qreal &bottomFov )
109 {
110  d->m_bottomFov = bottomFov;
111 }
112 
113 qreal GeoDataViewVolume::topFov() const
114 {
115  return d->m_topFov;
116 }
117 
118 void GeoDataViewVolume::setTopFov( const qreal &topFov )
119 {
120  d->m_topFov = topFov;
121 }
122 
123 qreal GeoDataViewVolume::near() const
124 {
125  return d->m_near;
126 }
127 
128 void GeoDataViewVolume::setNear( const qreal &near )
129 {
130  d->m_near = near;
131 }
132 
133 }
Marble::GeoDataViewVolume::setTopFov
void setTopFov(const qreal &topFov)
Definition: GeoDataViewVolume.cpp:118
Marble::GeoDataObject
A base class for all geodata objects.
Definition: GeoDataObject.h:48
Marble::GeoDataObject::equals
virtual bool equals(const GeoDataObject &other) const
Compares the value of id and targetId of the two objects.
Definition: GeoDataObject.cpp:126
Marble::GeoDataViewVolume::topFov
qreal topFov() const
Definition: GeoDataViewVolume.cpp:113
Marble::GeoDataViewVolume::operator=
GeoDataViewVolume & operator=(const GeoDataViewVolume &other)
Definition: GeoDataViewVolume.cpp:51
Marble::GeoDataViewVolume
Definition: GeoDataViewVolume.h:22
Marble::GeoDataViewVolume::rightFov
qreal rightFov() const
Definition: GeoDataViewVolume.cpp:93
Marble::GeoDataViewVolume::~GeoDataViewVolume
~GeoDataViewVolume()
Definition: GeoDataViewVolume.cpp:73
Marble::GeoDataViewVolume::operator==
bool operator==(const GeoDataViewVolume &other) const
Definition: GeoDataViewVolume.cpp:58
Marble::GeoDataViewVolume::nodeType
virtual const char * nodeType() const
Provides type information for downcasting a GeoNode.
Definition: GeoDataViewVolume.cpp:78
Marble::GeoDataViewVolume::setNear
void setNear(const qreal &near)
Definition: GeoDataViewVolume.cpp:128
Marble::GeoDataViewVolume::setBottomFov
void setBottomFov(const qreal &bottomFov)
Definition: GeoDataViewVolume.cpp:108
Marble::GeoDataViewVolume::GeoDataViewVolume
GeoDataViewVolume()
Definition: GeoDataViewVolume.cpp:40
Marble::GeoDataViewVolume::near
qreal near() const
Definition: GeoDataViewVolume.cpp:123
GeoDataViewVolume.h
Marble::GeoDataViewVolume::setLeftFov
void setLeftFov(const qreal &leftFov)
Definition: GeoDataViewVolume.cpp:88
Marble::GeoDataObject::operator=
GeoDataObject & operator=(const GeoDataObject &)
Definition: GeoDataObject.cpp:54
Marble::GeoDataViewVolume::operator!=
bool operator!=(const GeoDataViewVolume &other) const
Definition: GeoDataViewVolume.cpp:68
Marble::GeoDataViewVolume::bottomFov
qreal bottomFov() const
Definition: GeoDataViewVolume.cpp:103
Marble::GeoDataViewVolume::setRightFov
void setRightFov(const qreal &rightFov)
Definition: GeoDataViewVolume.cpp:98
GeoDataTypes.h
Marble::GeoDataViewVolume::leftFov
qreal leftFov() const
Definition: GeoDataViewVolume.cpp:83
Marble::GeoDataTypes::GeoDataViewVolumeType
const char * GeoDataViewVolumeType
Definition: GeoDataTypes.cpp:93
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal