Definition at line 56 of file large_lithosphere.cpp.
typedef gsgl::data::pair<gsgl::data::simple_array<sph_qt_node *> *, gsgl::data::simple_stack<gsgl::index_t> *> node_level_rec [protected, inherited] |
The array of leaf nodes, plus an stack of free positions.
Definition at line 137 of file spherical_quadtree.hpp.
lithosphere_quadtree | ( | large_lithosphere * | parent_sg_node, | |
const gsgl::real_t & | polar_radius, | |||
const gsgl::real_t & | equatorial_radius | |||
) |
Definition at line 164 of file large_lithosphere.cpp.
References lithosphere_quadtree::shader, and application::SYS_DATA_PATH.
~lithosphere_quadtree | ( | ) | [virtual] |
Definition at line 176 of file large_lithosphere.cpp.
void cleanup | ( | ) | [virtual] |
Reimplemented from spherical_quadtree.
Definition at line 235 of file large_lithosphere.cpp.
References lithosphere_quadtree::shader.
Referenced by large_lithosphere::cleanup().
sph_qt_node * create_node | ( | sph_qt_node * | parent | ) | [virtual] |
void draw | ( | gsgl::scenegraph::context * | c | ) | [virtual] |
Reimplemented from spherical_quadtree.
Definition at line 226 of file large_lithosphere.cpp.
References spherical_quadtree::draw(), context::num_lights, and lithosphere_quadtree::shader.
Referenced by large_lithosphere::draw().
gsgl::scenegraph::node* get_parent_sg_node | ( | ) | [inline, inherited] |
Definition at line 149 of file spherical_quadtree.hpp.
shader_program* get_shader | ( | ) | [inline] |
Definition at line 67 of file large_lithosphere.cpp.
References lithosphere_quadtree::shader.
Referenced by lithosphere_qt_node::draw().
void init | ( | gsgl::scenegraph::context * | c | ) | [virtual] |
Reimplemented from spherical_quadtree.
Definition at line 181 of file large_lithosphere.cpp.
References assert, lithosphere_qt_node::current_heightmap, lithosphere_qt_node::current_texture, lithosphere::get_parent_body(), celestial_body::get_simple_color_x_offset(), celestial_body::get_simple_color_y_offset(), celestial_body::get_simple_colormap(), celestial_body::get_simple_height_x_offset(), celestial_body::get_simple_height_y_offset(), celestial_body::get_simple_heightmap(), lithosphere_qt_node::heightmap_bounds, spherical_quadtree::init(), spherical_quadtree::parent_sg_node, spherical_quadtree::root_nodes, lithosphere_quadtree::shader, and lithosphere_qt_node::texture_bounds.
Referenced by large_lithosphere::init().
void update | ( | gsgl::scenegraph::context * | c, | |
const bool | not_visible | |||
) | [virtual, inherited] |
Definition at line 1316 of file spherical_quadtree.cpp.
References spherical_quadtree::eye_pos_in_object_space, pair::first, context::frame, node::get_modelview(), vector::get_x(), vector::get_y(), vector::get_z(), transform::inverse(), sph_qt_node::last_merge_frame, spherical_quadtree::last_num_leaf_nodes, spherical_quadtree::last_num_merge_nodes, sph_qt_node::last_split_frame, spherical_quadtree::leaf_nodes, spherical_quadtree::merge_node(), spherical_quadtree::merge_nodes, spherical_quadtree::num_leaf_nodes, spherical_quadtree::num_merge_nodes, spherical_quadtree::parent_sg_node, and spherical_quadtree::split_node().
Referenced by spherical_quadtree::draw(), and large_lithosphere::update().
gsgl::platform::buffer_pool* buffers [protected, inherited] |
Definition at line 128 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::cleanup(), spherical_quadtree::init(), sph_qt_node::sph_qt_node(), sph_qt_node::~sph_qt_node(), and spherical_quadtree::~spherical_quadtree().
gsgl::real_t equatorial_radius [protected, inherited] |
Definition at line 116 of file spherical_quadtree.hpp.
gsgl::math::vector eye_pos_in_object_space [protected, inherited] |
gsgl::data::simple_stack<gsgl::platform::vbuffer::index_t> freed_vertex_indices [protected, inherited] |
A stack of indices to free spots in the vertex buffer.
Definition at line 126 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::get_new_vertex_index().
gsgl::data::simple_array<float> global_normals [protected, inherited] |
Contains the normals of each vertex in the quadtree.
Definition at line 119 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::node_cos_angle(), spherical_quadtree::split_node_aux(), and sph_qt_node::update_fan_indices().
gsgl::data::simple_array<float> global_polar_coords [protected, inherited] |
Contains the geographic (NOT geocentric) longitude and latitude of each vertex.
Longitude is specified as the actual longitude / 2PI, and latitude as 0.5 + the actual latitude / PI.
Definition at line 123 of file spherical_quadtree.hpp.
Referenced by sph_qt_node::update_fan_indices().
gsgl::data::simple_array<float> global_vertices [protected, inherited] |
Contains the cartesian vertices of the quadtree.
Definition at line 118 of file spherical_quadtree.hpp.
Referenced by sph_qt_node::draw(), spherical_quadtree::get_new_vertex_index(), spherical_quadtree::node_cos_angle(), spherical_quadtree::node_radius(), and sph_qt_node::update_fan_indices().
gsgl::data::simple_array<gsgl::platform::vbuffer::index_t> index_refcounts [protected, inherited] |
Definition at line 125 of file spherical_quadtree.hpp.
gsgl::math::transform last_frame_modelview_projection [protected, inherited] |
int last_frame_viewport[4] [protected, inherited] |
gsgl::index_t last_num_leaf_nodes [protected, inherited] |
gsgl::index_t last_num_merge_nodes [protected, inherited] |
gsgl::data::simple_array<node_level_rec *> leaf_nodes [protected, inherited] |
An array of leaf nodes at each level.
Definition at line 139 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::add_leaf_node(), spherical_quadtree::remove_leaf_node(), spherical_quadtree::update(), and spherical_quadtree::~spherical_quadtree().
gsgl::data::simple_array<node_level_rec *> merge_nodes [protected, inherited] |
An array of nodes that can be merged.
Definition at line 142 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::add_merge_node(), spherical_quadtree::remove_merge_node(), and spherical_quadtree::update().
gsgl::index_t num_leaf_nodes [protected, inherited] |
Definition at line 140 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::add_leaf_node(), spherical_quadtree::remove_leaf_node(), and spherical_quadtree::update().
gsgl::index_t num_merge_nodes [protected, inherited] |
Definition at line 143 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::add_merge_node(), spherical_quadtree::remove_merge_node(), and spherical_quadtree::update().
gsgl::scenegraph::node* parent_sg_node [protected, inherited] |
Definition at line 115 of file spherical_quadtree.hpp.
Referenced by sph_qt_node::draw(), lithosphere_quadtree::init(), spherical_quadtree::node_radius(), and spherical_quadtree::update().
gsgl::real_t polar_radius [protected, inherited] |
Definition at line 116 of file spherical_quadtree.hpp.
sph_qt_node* root_nodes[6] [protected, inherited] |
Definition at line 130 of file spherical_quadtree.hpp.
Referenced by spherical_quadtree::cleanup(), spherical_quadtree::draw(), lithosphere_quadtree::init(), spherical_quadtree::init_root_nodes(), spherical_quadtree::spherical_quadtree(), and spherical_quadtree::~spherical_quadtree().
Multiple instances of this class will share the first instance's shader.
This ensures that when the last instance of the class is deleted, the shader will be also.
Definition at line 61 of file large_lithosphere.cpp.
Referenced by lithosphere_quadtree::cleanup(), lithosphere_quadtree::draw(), lithosphere_quadtree::get_shader(), lithosphere_quadtree::init(), and lithosphere_quadtree::lithosphere_quadtree().