#include <terrain_roetger.h>
Inherits TerrainClient.
Inheritance diagram for TerrainRoetger:


Public Member Functions | |
| TerrainRoetger () | |
| ~TerrainRoetger () | |
| virtual void | render (void) |
| Performs rendering. [CLIENT]. | |
| virtual void | update (const class Camera *camera) |
| Data update (LOD-related things). [CLIENT]. | |
| virtual void | init (void) |
| preprocessing step - offline calculations for LOD | |
| void | set_minimum_quality (float minimum_global_res) |
| void | set_desired_quality (float desired_global_res) |
| float | get_minimum_quality (void) |
| float | get_desired_quality (void) |
| void | calculate_roughness (void) |
| void | build_quadtree (const Quadtree::QuadtreeNode &node) |
| void | build_quadtree (void) |
| void | render_quadtree (const Quadtree::QuadtreeNode &node) |
| void | render_quadtree (void) |
| bool | subdivision_criterium (const Quadtree::QuadtreeNode &node) |
| void | init_faces_counter (void) |
| int | faces_counter (void) |
| void | set_location (GLVector3d loc) |
Protected Member Functions | |
| virtual bool | allocateHeightmap (int sizeX, int sizeY) |
| allocates memory and sets the heightmap pointer. | |
Private Member Functions | |
| double | metricsL1 (GLVector3d a, GLVector3d b) |
| int | index (int x, int y) |
| void | add_height_error (int x1, int y1, int x2, int y2, float *max_error) |
| void | emit_vertices (const GLVector3d &v1, const GLVector3d &v2, const GLVector3d &v3) |
Private Attributes | |
| Quadtree | m_qt |
| Quad tree over this terrain, root node size is m_size. | |
| float | m_minimum_global_res |
| float | m_desired_global_res |
| GLVector3d | m_location |
| int | m_faces_rendered |
| the number of faces rendered | |
| float * | m_roughness |
| Frustum | mFrustum |
Definition at line 17 of file terrain_roetger.h.
|
|
Definition at line 6 of file terrain_roetger.cpp. |
|
|
Definition at line 14 of file terrain_roetger.cpp. References m_roughness. |
|
||||||||||||||||||||||||
|
Definition at line 118 of file terrain_roetger.cpp. References TerrainBase::getScaledHeight(). Referenced by calculate_roughness(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
allocates memory and sets the heightmap pointer.
Reimplemented from TerrainBase. Definition at line 24 of file terrain_roetger.cpp. References Quadtree::Alloc(), TerrainBase::allocateHeightmap(), m_qt, and m_roughness. Here is the call graph for this function: ![]() |
|
|
Recursively builds the quadtree of this terrain.
Definition at line 43 of file terrain_roetger.h. References Quadtree::get_root(), and m_qt. Referenced by build_quadtree(), set_minimum_quality(), and update(). Here is the call graph for this function: ![]() |
|
|
Recursively builds the quadtree of this terrain. Works top-down, uses
Definition at line 190 of file terrain_roetger.cpp. References build_quadtree(), Frustum::classifyPoint(), Quadtree::get_subnodes(), Frustum::getPlane(), m_qt, mFrustum, Frustum::NEGATIVE, Frustum::PL_BOTTOM, Frustum::PL_TOP, Quadtree::set_leaf(), Quadtree::set_node(), subdivision_criterium(), Quadtree::QuadtreeNode::width, Quadtree::QuadtreeNode::x, and Quadtree::QuadtreeNode::y. Here is the call graph for this function: ![]() |
|
|
Definition at line 130 of file terrain_roetger.cpp. References add_height_error(), TerrainBase::getExtents(), index(), m_minimum_global_res, and m_roughness. Referenced by init(), and set_minimum_quality(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Definition at line 235 of file terrain_roetger.cpp. References m_faces_rendered. Referenced by render_quadtree(). |
|
|
Definition at line 61 of file terrain_roetger.h. References m_faces_rendered. |
|
|
Definition at line 30 of file terrain_roetger.h. References m_desired_global_res. |
|
|
Definition at line 29 of file terrain_roetger.h. References m_minimum_global_res. |
|
||||||||||||
|
Definition at line 73 of file terrain_roetger.h. References TerrainBase::getExtents(). Referenced by calculate_roughness(), and subdivision_criterium(). Here is the call graph for this function: ![]() |
|
|
preprocessing step - offline calculations for LOD
Reimplemented from TerrainClient. Definition at line 19 of file terrain_roetger.cpp. References calculate_roughness(). Here is the call graph for this function: ![]() |
|
|
Definition at line 60 of file terrain_roetger.h. References m_faces_rendered. |
|
||||||||||||
|
Definition at line 70 of file terrain_roetger.h. Referenced by subdivision_criterium(). |
|
|
Performs rendering. [CLIENT]. Possibly "only" sends data to OpenGL API. Implements TerrainClient. Definition at line 51 of file terrain_roetger.cpp. References TerrainBase::getExtents(), TerrainBase::getRealScale(), TerrainClient::mGlobalTexture, and render_quadtree(). Here is the call graph for this function: ![]() |
|
|
Definition at line 47 of file terrain_roetger.h. References Quadtree::get_root(), and m_qt. Referenced by render(), and render_quadtree(). Here is the call graph for this function: ![]() |
|
|
Definition at line 243 of file terrain_roetger.cpp. References emit_vertices(), Quadtree::get_neighbor(), Quadtree::get_subnodes(), TerrainBase::getTrueHeight(), Quadtree::is_subdivided(), m_qt, Quadtree::n_left, Quadtree::n_up, render_quadtree(), Quadtree::QuadtreeNode::width, Quadtree::QuadtreeNode::x, and Quadtree::QuadtreeNode::y. Here is the call graph for this function: ![]() |
|
|
Definition at line 113 of file terrain_roetger.cpp. References m_desired_global_res. |
|
|
Definition at line 63 of file terrain_roetger.h. References m_location. |
|
|
Definition at line 102 of file terrain_roetger.cpp. References build_quadtree(), calculate_roughness(), and m_minimum_global_res. Here is the call graph for this function: ![]() |
|
|
Computes subdivision criterium of the given node.
Definition at line 53 of file terrain_roetger.h. References index(), m_desired_global_res, m_location, m_minimum_global_res, m_roughness, metricsL1(), Quadtree::QuadtreeNode::width, Quadtree::QuadtreeNode::x, and Quadtree::QuadtreeNode::y. Referenced by build_quadtree(). Here is the call graph for this function: ![]() |
|
|
Data update (LOD-related things). [CLIENT]. This is usually a *very* time consuming task. However, it should be performed once a frame, because it takes care about LOD. In good implementation, it should be time-constrained, for example by the maximal number of used triangles. Reimplemented from TerrainClient. Definition at line 32 of file terrain_roetger.cpp. References build_quadtree(), TerrainBase::getRealScale(), TerrainBase::getRealScaleInv(), m_location, mFrustum, and Frustum::transform(). Here is the call graph for this function: ![]() |
|
|
Definition at line 84 of file terrain_roetger.h. Referenced by get_desired_quality(), set_desired_quality(), and subdivision_criterium(). |
|
|
the number of faces rendered
Definition at line 87 of file terrain_roetger.h. Referenced by emit_vertices(), faces_counter(), and init_faces_counter(). |
|
|
Definition at line 85 of file terrain_roetger.h. Referenced by set_location(), subdivision_criterium(), and update(). |
|
|
Definition at line 83 of file terrain_roetger.h. Referenced by calculate_roughness(), get_minimum_quality(), set_minimum_quality(), and subdivision_criterium(). |
|
|
Quad tree over this terrain, root node size is m_size.
Definition at line 81 of file terrain_roetger.h. Referenced by allocateHeightmap(), build_quadtree(), and render_quadtree(). |
|
|
Definition at line 88 of file terrain_roetger.h. Referenced by allocateHeightmap(), calculate_roughness(), subdivision_criterium(), and ~TerrainRoetger(). |
|
|
Definition at line 90 of file terrain_roetger.h. Referenced by build_quadtree(), and update(). |
1.4.5