File indexing completed on 2025-01-05 03:59:01
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2013 Mohammed Nafees <nafees.technocool@gmail.com> 0004 // 0005 0006 #include "GeoDataViewVolume.h" 0007 0008 #include "GeoDataTypes.h" 0009 0010 namespace Marble 0011 { 0012 0013 class GeoDataViewVolumePrivate 0014 { 0015 public: 0016 GeoDataViewVolumePrivate(); 0017 0018 qreal m_leftFov; 0019 qreal m_rightFov; 0020 qreal m_bottomFov; 0021 qreal m_topFov; 0022 qreal m_near; 0023 }; 0024 0025 GeoDataViewVolumePrivate::GeoDataViewVolumePrivate() : 0026 m_leftFov(), 0027 m_rightFov(), 0028 m_bottomFov(), 0029 m_topFov(), 0030 m_near() 0031 { 0032 // nothing to do 0033 } 0034 0035 GeoDataViewVolume::GeoDataViewVolume() : d( new GeoDataViewVolumePrivate ) 0036 { 0037 // nothing to do 0038 } 0039 0040 GeoDataViewVolume::GeoDataViewVolume( const Marble::GeoDataViewVolume &other ) : 0041 GeoDataObject(), d( new GeoDataViewVolumePrivate( *other.d ) ) 0042 { 0043 // nothing to do 0044 } 0045 0046 GeoDataViewVolume &GeoDataViewVolume::operator=( const GeoDataViewVolume &other ) 0047 { 0048 GeoDataObject::operator=( other ); 0049 *d = *other.d; 0050 return *this; 0051 } 0052 0053 bool GeoDataViewVolume::operator==(const GeoDataViewVolume& other) const 0054 { 0055 return equals(other) 0056 && d->m_leftFov == other.d->m_leftFov 0057 && d->m_rightFov == other.d->m_rightFov 0058 && d->m_topFov == other.d->m_topFov 0059 && d->m_bottomFov == other.d->m_bottomFov 0060 && d->m_near == other.d->m_near; 0061 } 0062 0063 bool GeoDataViewVolume::operator!=(const GeoDataViewVolume& other) const 0064 { 0065 return !this->operator==(other); 0066 } 0067 0068 GeoDataViewVolume::~GeoDataViewVolume() 0069 { 0070 delete d; 0071 } 0072 0073 const char *GeoDataViewVolume::nodeType() const 0074 { 0075 return GeoDataTypes::GeoDataViewVolumeType; 0076 } 0077 0078 qreal GeoDataViewVolume::leftFov() const 0079 { 0080 return d->m_leftFov; 0081 } 0082 0083 void GeoDataViewVolume::setLeftFov(qreal leftFov) 0084 { 0085 d->m_leftFov = leftFov; 0086 } 0087 0088 qreal GeoDataViewVolume::rightFov() const 0089 { 0090 return d->m_rightFov; 0091 } 0092 0093 void GeoDataViewVolume::setRightFov(qreal rightFov) 0094 { 0095 d->m_rightFov = rightFov; 0096 } 0097 0098 qreal GeoDataViewVolume::bottomFov() const 0099 { 0100 return d->m_bottomFov; 0101 } 0102 0103 void GeoDataViewVolume::setBottomFov(qreal bottomFov) 0104 { 0105 d->m_bottomFov = bottomFov; 0106 } 0107 0108 qreal GeoDataViewVolume::topFov() const 0109 { 0110 return d->m_topFov; 0111 } 0112 0113 void GeoDataViewVolume::setTopFov(qreal topFov) 0114 { 0115 d->m_topFov = topFov; 0116 } 0117 0118 qreal GeoDataViewVolume::near() const 0119 { 0120 return d->m_near; 0121 } 0122 0123 void GeoDataViewVolume::setNear(qreal near) 0124 { 0125 d->m_near = near; 0126 } 0127 0128 }