vrecko
virtual reality framework
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
vrecko
Vrecko - the Virtual Reality Engine
Dynamic Art module
L-system plant modeler - module for Vrecko
Head Up Display module
Space Partitioning - module for Vrecko
Todo List
Deprecated List
Namespaces
Classes
Files
File List
include
base
helpers
vrecko
vreckoAP
ArtificialWorld
behindO
Boids
CableEditor
CameraMovement
CameraPath
CarSim
ConnectEditor
ConstrainedMovement
DynamicArt
EditorController
EditorQAbilities
FFDEditor
Filter
games
Garden
GUI
HeadTracking
HelloWorld
HUD
InputConnector
LightsEditor
Menu
Nature
Clouds
Grass
Terrain
Algorithms
MidpointDisplacementAlgorithm.h
PerlinNoiseAlgorithm.h
RandomFaultsAlgorithm.h
TerrainAlgorithm.h
Properties
Terrain2D.h
Terrain2DSegment.h
TerrainAbility.h
TerrainRandom.h
TerrainUtility.h
Weather
_AP_Atmospheric.h
AP_Nature.h
navigation
ObjectUtils
ODE
RoomEdit
ShootingSimulation
SpacePartitioning
TextOutput
vreckoDP
vreckoUtils
src
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
TerrainAlgorithm.h
Go to the documentation of this file.
1
9
#ifndef VRECKO_NATURE_TERRAIN_TERRAINALGORITHM_H
10
#define VRECKO_NATURE_TERRAIN_TERRAINALGORITHM_H
11
12
#include "../TerrainUtility.h"
13
#include <osg/Array>
14
15
namespace
APNature
16
{
17
class
TerrainAlgorithm
18
{
19
protected
:
20
21
float
*
_terrain
;
22
int
_width
,
_height
;
23
24
public
:
25
31
// TODO: Add TerrainSurface and make TerrainAlgorithm abstract by inheriting from TerrainSurface. (?)
32
TerrainAlgorithm
(
int
width,
int
height);
33
34
~TerrainAlgorithm
();
35
42
inline
unsigned
int
PointIndex
(
int
x,
int
y)
const
{
return
y * this->
_width
+ x;}
43
48
float
GetLowestValue
()
const
;
49
54
float
GetHighestValue
()
const
;
55
56
protected
:
57
64
float
*
Allocate
(
int
width,
int
height);
65
69
void
Release
();
70
74
void
Zero
();
75
80
void
Flatten
(
float
height);
81
88
inline
float
GetPointHeight
(
int
x,
int
y)
const
{
return
this->
_terrain
[
PointIndex
(x, y)]; }
89
96
inline
void
SetPointHeight
(
int
x,
int
y,
float
height) { this->
_terrain
[
PointIndex
(x, y)] = height;}
97
98
};
99
}
100
101
#endif
include
vreckoAP
Nature
Terrain
Algorithms
TerrainAlgorithm.h
Generated on Tue Feb 19 2013 10:23:44 for vrecko by
1.8.3.1