VR-Forces 4.7 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
osgdb_osgearth_model_cdb
DtCDBTileKey.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright(c) 2017 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
#pragma once
10
11
#include <string>
12
13
#include <osgEarth/GeoData>
14
15
namespace
osgEarth
16
{
17
class
Map;
18
}
19
20
namespace
makVrv {
namespace
oe {
namespace
CDB
21
{
22
class
CDBTileCache;
23
28
class
CDBTileKey
29
{
30
public
:
31
34
CDBTileKey
(
int
lod,
int
lon,
int
lat,
int
rref,
int
uref);
35
37
CDBTileKey
(
const
CDBTileKey
& rhs);
38
40
std::string
str
()
const
;
41
43
int
getLon
()
const
;
44
46
int
getLat
()
const
;
47
49
int
getURef
()
const
;
50
52
int
getRRef
()
const
;
53
55
int
getLOD
()
const
;
56
58
const
osgEarth::GeoExtent&
getExtent
()
const
;
59
61
bool
getChildren
( std::vector< CDBTileKey >& children )
const
;
62
64
static
int
calcDLonZone
(
double
coord_y);
65
67
static
void
getTileDimensions
(
int
lod,
int
lon,
int
lat,
int
rref,
int
uref,
double
& out_width,
double
& out_height);
68
70
static
void
createRootKeys
(
const
CDBTileCache
& tileCache, std::vector< CDBTileKey >& rootKeys);
71
73
static
double
getApproximateLodGridSpacing
(
int
lod);
74
76
osg::BoundingSphere
getBounds
(
const
osgEarth::Map* map)
const
;
77
79
bool
equals
(
int
lod,
int
uref,
int
rref)
const
;
80
82
bool
equals
(
const
CDBTileKey
& key)
const
;
83
85
size_t
getLatLongHash
(
void
)
const
;
86
87
size_t
getFullHash
(
void
)
const
;
88
protected
:
89
91
int
myLod
;
92
94
int
myURef
;
95
97
int
myRRef
;
98
100
int
myLon
;
101
103
int
myLat
;
104
106
osgEarth::GeoExtent
myExtent
;
107
};
108
110
std::ostream&
operator<<
(std::ostream& os,
const
CDBTileKey
& key);
111
113
struct
LatLongTileKeyHasher
114
{
115
size_t
operator()
(
const
makVrv::oe::CDB::CDBTileKey
& tileKey)
const
{
return
tileKey.
getLatLongHash
(); }
116
};
117
119
struct
LatLongEqualTo
120
{
121
bool
operator()
(
const
makVrv::oe::CDB::CDBTileKey
& lhs,
const
makVrv::oe::CDB::CDBTileKey
& rhs)
const
122
{
123
return
lhs.
getLatLongHash
() == rhs.
getLatLongHash
();
124
}
125
};
126
128
struct
FullTileKeyHasher
129
{
130
size_t
operator()
(
const
makVrv::oe::CDB::CDBTileKey
& tileKey)
const
{
return
tileKey.
getFullHash
(); }
131
};
132
134
struct
FullTileKeyEqualTo
135
{
136
bool
operator()
(
const
makVrv::oe::CDB::CDBTileKey
& lhs,
const
makVrv::oe::CDB::CDBTileKey
& rhs)
const
137
{
138
if
(lhs.
getLat
() != rhs.
getLat
())
return
false
;
139
if
(lhs.
getLon
() != rhs.
getLon
())
return
false
;
140
if
(lhs.
getLOD
() != rhs.
getLOD
())
return
false
;
141
if
(lhs.
getURef
() != rhs.
getURef
())
return
false
;
142
if
(lhs.
getRRef
() != rhs.
getRRef
())
return
false
;
143
return
true
;
144
}
145
};
146
147
} } }
// namespace makVrv::oe::CDB
Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)