Umasoft
Main Page
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Groups
Pages
TerrainSDK
vtlib
core
TerrainLayers.h
1
//
2
// TerrainLayers.h
3
//
4
// Copyright (c) 2006-2011 Virtual Terrain Project
5
// Free for all uses, see license.txt for details.
6
//
7
8
#ifndef TERRAINLAYERSH
9
#define TERRAINLAYERSH
10
11
#include "Structure3d.h"
// for vtStructureArray3d
12
15
19
class
vtLayer
:
public
osg::Referenced
20
{
21
public
:
22
virtual
~
vtLayer
() {}
23
24
virtual
void
SetLayerName(
const
vtString
&fname) = 0;
25
virtual
vtString
GetLayerName() = 0;
26
virtual
void
SetVisible(
bool
vis) = 0;
27
virtual
bool
GetVisible() = 0;
28
};
29
typedef
osg::ref_ptr<vtLayer>
vtLayerPtr
;
30
34
class
vtStructureLayer
:
public
vtStructureArray3d
,
public
vtLayer
35
{
36
public
:
37
void
SetLayerName(
const
vtString
&fname) { SetFilename(fname); }
38
vtString
GetLayerName() {
return
GetFilename(); }
39
void
SetVisible(
bool
vis)
40
{
41
SetEnabled
(vis);
42
}
43
bool
GetVisible()
44
{
45
return
GetEnabled();
46
}
47
};
48
52
class
vtImageLayer
:
public
vtLayer
53
{
54
public
:
55
vtImageLayer
();
56
~
vtImageLayer
();
57
58
void
SetLayerName(
const
vtString
&fname) {
/* not applicable */
}
59
vtString
GetLayerName() {
return
m_pImage->
GetFilename
().c_str(); }
60
void
SetVisible(
bool
vis);
61
bool
GetVisible();
62
63
vtImageGeoPtr m_pImage;
64
vtMultiTexture
*m_pMultiTexture;
65
};
66
68
class
LayerSet
:
public
std::vector<vtLayerPtr>
69
{
70
public
:
71
void
Remove(
vtLayer
*lay);
72
vtLayer
*FindByName(
const
vtString
&name);
73
vtStructureLayer
*FindStructureFromNode(osg::Node *pNode,
int
&iOffset);
74
};
75
// Group terrain
77
78
#endif // TERRAINLAYERSH
79
Generated on Fri Jun 7 2013 16:07:53 for Umasoft by
1.8.4