Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
TerrainLayer.h
Go to the documentation of this file.
1
/* Project Starshatter 4.5
2
Destroyer Studios LLC
3
Copyright © 1997-2005. All Rights Reserved.
4
5
SUBSYSTEM: Stars.exe
6
FILE: TerrainLayer.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
A blended detail texture applied to a terrain patch
13
through a specific range of altitudes
14
*/
15
16
#ifndef TerrainLayer_h
17
#define TerrainLayer_h
18
19
#include "
Types.h
"
20
#include "
Bitmap.h
"
21
22
// +--------------------------------------------------------------------+
23
24
class
Terrain
;
25
class
TerrainRegion
;
26
27
// +--------------------------------------------------------------------+
28
29
class
TerrainLayer
30
{
31
friend
class
Terrain
;
32
friend
class
TerrainRegion
;
33
34
public
:
35
static
const
char
*
TYPENAME
() {
return
"TerrainLayer"
; }
36
37
TerrainLayer
() : tile_texture(0), detail_texture(0), min_height(0), max_height(-1) { }
38
~TerrainLayer
() { }
39
40
int
operator <
(
const
TerrainLayer
& t)
const
{
return
min_height < t.min_height; }
41
int
operator <=
(
const
TerrainLayer
& t)
const
{
return
min_height <= t.min_height; }
42
int
operator ==
(
const
TerrainLayer
& t)
const
{
return
min_height == t.min_height; }
43
44
// accessors:
45
const
char
*
GetTileName
()
const
{
return
tile_name; }
46
const
char
*
GetDetailName
()
const
{
return
detail_name; }
47
Bitmap
*
GetTileTexture
()
const
{
return
tile_texture; }
48
Bitmap
*
GetDetailTexture
()
const
{
return
detail_texture; }
49
double
GetMinHeight
()
const
{
return
min_height; }
50
double
GetMaxHeight
()
const
{
return
max_height; }
51
52
private
:
53
Text
tile_name;
54
Text
detail_name;
55
Bitmap
* tile_texture;
56
Bitmap
* detail_texture;
57
double
min_height;
58
double
max_height;
59
};
60
61
62
#endif TerrainLayer_h
63
Stars45
TerrainLayer.h
Generated on Tue Jun 5 2012 20:47:16 for Starshatter_Open by
1.8.1