11 #ifndef VRECKO_NATURE_TERRAIN_TERRAINPROPERTIES_H
12 #define VRECKO_NATURE_TERRAIN_TERRAINPROPERTIES_H
21 static class TerrainProperties
29 static osg::Vec2f _fieldSize;
30 static float _heightMin, _heightMax;
32 static int _segmentSize;
33 static int _resolutionX, _resolutionY;
46 static inline void AlignmentX(
TerrainAlignment alignmentX) { _alignmentX = alignmentX; }
52 static inline void AlignmentY(
TerrainAlignment alignmentY) { _alignmentY = alignmentY; }
57 static inline osg::Vec2f FieldSize() {
return _fieldSize; }
58 static void FieldSize(osg::Vec2f fieldSize);
67 static void HeightRange(
float heightMin,
float heightMax);
69 static inline float HeightMin() {
return _heightMin; }
70 static inline float HeightMax() {
return _heightMax; }
77 static inline int SegmentSize() {
return _segmentSize; }
78 static inline void SegmentSize(
int segmentSize) { _segmentSize = (segmentSize >= 2 ? segmentSize : 2); }
83 static inline int ResolutionX() {
return _resolutionX; }
84 static inline void ResolutionX(
int resolutionX) { _resolutionX = (resolutionX >= 1 ? resolutionX : 1); }
89 static inline int ResolutionY() {
return _resolutionY; }
90 static inline void ResolutionY(
int resolutionY) { _resolutionY = (resolutionY >= 1 ? resolutionY : 1); }
98 static inline DataSourceType SourceType() {
return _dataSourceType; }
99 static inline void SourceType(
DataSourceType dataSourceType) { _dataSourceType = dataSourceType; }
108 static inline int VerticesX() {
return _segmentSize * _resolutionX; }
112 static inline int VerticesY() {
return _segmentSize * _resolutionY; }
117 static inline float SizeX() {
return (VerticesX() - 1) * _fieldSize.x(); }
121 static inline float SizeY() {
return (VerticesY() - 1) * _fieldSize.y(); }
131 static void LoadXMLParameters(XERCES_CPP_NAMESPACE_QUALIFIER
DOMNode *
node);
137 static void LoadDataSourceNodeParameters(XERCES_CPP_NAMESPACE_QUALIFIER
DOMNode *parameters);