Definition at line 78 of file large_lithosphere.cpp.
Public Member Functions | |
virtual void | draw (gsgl::scenegraph::context *c) |
bool | is_a_leaf () const |
lithosphere_qt_node (lithosphere_quadtree *parent_quadtree, sph_qt_node *parent) | |
virtual | ~lithosphere_qt_node () |
Protected Attributes | |
sph_qt_node * | adjacent_nodes [4] |
Pointers to the nodes at the quad's sides. | |
gsgl::platform::buffer_pool::object_record | buffer_pool_rec |
sph_qt_node * | children [4] |
bool | dirty |
unsigned long | last_merge_frame |
The frame at which we last merged the node. | |
unsigned long | last_radius_frame |
The frame for which we last calculated the radius of the node. | |
unsigned long | last_split_frame |
The frame at which we last split the node. | |
int | level |
The level of detail of this node. | |
int | num_indices_in_quadrants [4] |
Counts how many indices are used by each subquadrant. | |
sph_qt_node * | parent_node |
spherical_quadtree * | parent_quadtree |
gsgl::index_t | pos_in_leaf_node_array |
gsgl::index_t | pos_in_merge_node_array |
gsgl::real_t | radius_in_screen_space |
The "thickness" of the node in screen space. | |
gsgl::real_t | radius_in_world_space |
The "thickness" of the node in world space. | |
gsgl::data::simple_array < gsgl::index_t > | triangle_fan_indices |
Temporary for storing indices used by the quadrant. | |
gsgl::index_t | vertex_indices [25] |
Stores the indices into the global buffers. | |
Private Attributes | |
gsgl::platform::texture * | current_heightmap |
This is the heightmap that the node is using; it may be a parent's. | |
gsgl::platform::texture * | current_texture |
This is the texture that the node is using; it may be a parent's. | |
gsgl::real_t | heightmap_bounds [4] |
gsgl::platform::texture * | own_heightmap |
If this node has generated its own heightmap, this is it. | |
gsgl::platform::texture * | own_texture |
If this node has generated its own texture, this is it. | |
gsgl::real_t | texture_bounds [4] |
Stores minimum longitude and latitude, and maximum longitude and latitude, of the quad's texture. |
lithosphere_qt_node | ( | lithosphere_quadtree * | parent_quadtree, | |
sph_qt_node * | parent | |||
) |
Definition at line 103 of file large_lithosphere.cpp.
References lithosphere_qt_node::current_texture, and lithosphere_qt_node::texture_bounds.
~lithosphere_qt_node | ( | ) | [virtual] |
Definition at line 121 of file large_lithosphere.cpp.
void draw | ( | gsgl::scenegraph::context * | c | ) | [virtual] |
Reimplemented from sph_qt_node.
Definition at line 126 of file large_lithosphere.cpp.
References assert, texture::bind(), lithosphere_qt_node::current_texture, sph_qt_node::draw(), lithosphere_quadtree::get_shader(), sph_qt_node::parent_quadtree, shader_program::set_uniform(), and lithosphere_qt_node::texture_bounds.
bool is_a_leaf | ( | ) | const [inherited] |
Definition at line 163 of file spherical_quadtree.cpp.
References sph_qt_node::children.
Referenced by sph_qt_node::draw(), spherical_quadtree::merge_node(), spherical_quadtree::neighbor_allows_merge(), spherical_quadtree::split_node(), and sph_qt_node::update_fan_indices().
sph_qt_node* adjacent_nodes[4] [protected, inherited] |
Pointers to the nodes at the quad's sides.
Definition at line 74 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::init_root_nodes(), spherical_quadtree::merge_node(), spherical_quadtree::merge_node_aux(), sph_qt_node::sph_qt_node(), spherical_quadtree::split_node(), spherical_quadtree::split_node_aux(), and sph_qt_node::update_fan_indices().
gsgl::platform::buffer_pool::object_record buffer_pool_rec [protected, inherited] |
Definition at line 78 of file spherical_quadtree.hpp.
Referenced by sph_qt_node::draw(), sph_qt_node::sph_qt_node(), sph_qt_node::update_fan_indices(), and sph_qt_node::~sph_qt_node().
sph_qt_node* children[4] [protected, inherited] |
Definition at line 73 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::cleanup(), sph_qt_node::draw(), sph_qt_node::is_a_leaf(), spherical_quadtree::merge_node(), spherical_quadtree::merge_node_aux(), spherical_quadtree::neighbor_allows_merge(), sph_qt_node::sph_qt_node(), spherical_quadtree::split_node_aux(), sph_qt_node::update_fan_indices(), and sph_qt_node::~sph_qt_node().
gsgl::platform::texture* current_heightmap [private] |
This is the heightmap that the node is using; it may be a parent's.
Definition at line 89 of file large_lithosphere.cpp.
Referenced by lithosphere_quadtree::init().
gsgl::platform::texture* current_texture [private] |
This is the texture that the node is using; it may be a parent's.
Definition at line 82 of file large_lithosphere.cpp.
Referenced by lithosphere_qt_node::draw(), lithosphere_quadtree::init(), and lithosphere_qt_node::lithosphere_qt_node().
bool dirty [protected, inherited] |
Definition at line 70 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::merge_node(), spherical_quadtree::merge_node_aux(), spherical_quadtree::split_node_aux(), and sph_qt_node::update_fan_indices().
gsgl::real_t heightmap_bounds[4] [private] |
unsigned long last_merge_frame [protected, inherited] |
The frame at which we last merged the node.
Definition at line 85 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::merge_node(), and spherical_quadtree::update().
unsigned long last_radius_frame [protected, inherited] |
The frame for which we last calculated the radius of the node.
Definition at line 84 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::node_radius().
unsigned long last_split_frame [protected, inherited] |
The frame at which we last split the node.
Definition at line 86 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::merge_node(), spherical_quadtree::split_node(), and spherical_quadtree::update().
int level [protected, inherited] |
The level of detail of this node.
Definition at line 69 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::add_leaf_node(), spherical_quadtree::add_merge_node(), spherical_quadtree::merge_node(), spherical_quadtree::neighbor_allows_merge(), spherical_quadtree::remove_leaf_node(), spherical_quadtree::remove_merge_node(), and spherical_quadtree::split_node().
int num_indices_in_quadrants[4] [protected, inherited] |
Counts how many indices are used by each subquadrant.
Definition at line 80 of file spherical_quadtree.hpp.
Referenced by sph_qt_node::draw(), sph_qt_node::sph_qt_node(), and sph_qt_node::update_fan_indices().
gsgl::platform::texture* own_heightmap [private] |
If this node has generated its own heightmap, this is it.
Definition at line 88 of file large_lithosphere.cpp.
gsgl::platform::texture* own_texture [private] |
If this node has generated its own texture, this is it.
Definition at line 81 of file large_lithosphere.cpp.
sph_qt_node* parent_node [protected, inherited] |
Definition at line 72 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::merge_node(), spherical_quadtree::merge_node_aux(), and spherical_quadtree::split_node().
spherical_quadtree* parent_quadtree [protected, inherited] |
Definition at line 67 of file spherical_quadtree.hpp.
Referenced by sph_qt_node::draw(), lithosphere_qt_node::draw(), sph_qt_node::update_fan_indices(), and sph_qt_node::~sph_qt_node().
gsgl::index_t pos_in_leaf_node_array [protected, inherited] |
Definition at line 88 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::add_leaf_node(), and spherical_quadtree::remove_leaf_node().
gsgl::index_t pos_in_merge_node_array [protected, inherited] |
Definition at line 89 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::add_merge_node(), spherical_quadtree::merge_node(), and spherical_quadtree::remove_merge_node().
gsgl::real_t radius_in_screen_space [protected, inherited] |
The "thickness" of the node in screen space.
Definition at line 83 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::node_radius().
gsgl::real_t radius_in_world_space [protected, inherited] |
The "thickness" of the node in world space.
Definition at line 82 of file spherical_quadtree.hpp.
Referenced by sph_qt_node::draw(), and spherical_quadtree::node_radius().
gsgl::real_t texture_bounds[4] [private] |
Stores minimum longitude and latitude, and maximum longitude and latitude, of the quad's texture.
Longitude is specified as the actual longitude / 2PI, and latitude as the 0.5 + the actual latitude / PI. Min longitude and latitude
Definition at line 86 of file large_lithosphere.cpp.
Referenced by lithosphere_qt_node::draw(), lithosphere_quadtree::init(), and lithosphere_qt_node::lithosphere_qt_node().
gsgl::data::simple_array<gsgl::index_t> triangle_fan_indices [protected, inherited] |
Temporary for storing indices used by the quadrant.
Definition at line 79 of file spherical_quadtree.hpp.
Referenced by sph_qt_node::update_fan_indices().
gsgl::index_t vertex_indices[25] [protected, inherited] |
Stores the indices into the global buffers.
Definition at line 76 of file spherical_quadtree.hpp.
Referenced by sph_qt_node::draw(), spherical_quadtree::node_cos_angle(), spherical_quadtree::node_radius(), sph_qt_node::sph_qt_node(), spherical_quadtree::split_node_aux(), sph_qt_node::update_fan_indices(), and sph_qt_node::~sph_qt_node().