lithosphere_quadtree Class Reference

Inheritance diagram for lithosphere_quadtree:

Inheritance graph
[legend]
Collaboration diagram for lithosphere_quadtree:

Collaboration graph
[legend]

List of all members.


Detailed Description

A quadtree used for drawing planetary lithospheres.

Definition at line 56 of file large_lithosphere.cpp.


Public Member Functions

virtual void cleanup ()
virtual sph_qt_nodecreate_node (sph_qt_node *parent)
virtual void draw (gsgl::scenegraph::context *c)
gsgl::scenegraph::nodeget_parent_sg_node ()
shader_programget_shader ()
virtual void init (gsgl::scenegraph::context *c)
 lithosphere_quadtree (large_lithosphere *parent_sg_node, const gsgl::real_t &polar_radius, const gsgl::real_t &equatorial_radius)
virtual void update (gsgl::scenegraph::context *c, const bool not_visible)
virtual ~lithosphere_quadtree ()

Protected Types

typedef gsgl::data::pair
< gsgl::data::simple_array
< sph_qt_node * >
*, gsgl::data::simple_stack
< gsgl::index_t > * > 
node_level_rec
 The array of leaf nodes, plus an stack of free positions.

Protected Attributes

gsgl::platform::buffer_poolbuffers
gsgl::real_t equatorial_radius
gsgl::math::vector eye_pos_in_object_space
gsgl::data::simple_stack
< gsgl::platform::vbuffer::index_t
freed_vertex_indices
 A stack of indices to free spots in the vertex buffer.
gsgl::data::simple_array< floatglobal_normals
 Contains the normals of each vertex in the quadtree.
gsgl::data::simple_array< floatglobal_polar_coords
 Contains the geographic (NOT geocentric) longitude and latitude of each vertex.
gsgl::data::simple_array< floatglobal_vertices
 Contains the cartesian vertices of the quadtree.
gsgl::data::simple_array
< gsgl::platform::vbuffer::index_t
index_refcounts
gsgl::math::transform last_frame_modelview_projection
int last_frame_viewport [4]
gsgl::index_t last_num_leaf_nodes
gsgl::index_t last_num_merge_nodes
gsgl::data::simple_array
< node_level_rec * > 
leaf_nodes
 An array of leaf nodes at each level.
gsgl::data::simple_array
< node_level_rec * > 
merge_nodes
 An array of nodes that can be merged.
gsgl::index_t num_leaf_nodes
gsgl::index_t num_merge_nodes
gsgl::scenegraph::nodeparent_sg_node
gsgl::real_t polar_radius
sph_qt_noderoot_nodes [6]

Private Attributes

gsgl::data::shared_pointer
< gsgl::platform::shader_program
shader
 Multiple instances of this class will share the first instance's shader.

Member Typedef Documentation

The array of leaf nodes, plus an stack of free positions.

Definition at line 137 of file spherical_quadtree.hpp.


Constructor & Destructor Documentation

lithosphere_quadtree ( large_lithosphere parent_sg_node,
const gsgl::real_t polar_radius,
const gsgl::real_t equatorial_radius 
)

~lithosphere_quadtree (  )  [virtual]

Definition at line 176 of file large_lithosphere.cpp.


Member Function Documentation

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]

Reimplemented from spherical_quadtree.

Definition at line 241 of file large_lithosphere.cpp.

void draw ( gsgl::scenegraph::context c  )  [virtual]

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]

void update ( gsgl::scenegraph::context c,
const bool  not_visible 
) [virtual, inherited]


Member Data Documentation

gsgl::platform::buffer_pool* buffers [protected, inherited]

gsgl::real_t equatorial_radius [protected, inherited]

Definition at line 116 of file spherical_quadtree.hpp.

Definition at line 136 of file spherical_quadtree.hpp.

Referenced by spherical_quadtree::update().

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().

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().

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().

Definition at line 125 of file spherical_quadtree.hpp.

Definition at line 134 of file spherical_quadtree.hpp.

Referenced by spherical_quadtree::draw().

int last_frame_viewport[4] [protected, inherited]

Definition at line 133 of file spherical_quadtree.hpp.

Referenced by spherical_quadtree::draw().

gsgl::index_t last_num_leaf_nodes [protected, inherited]

Definition at line 140 of file spherical_quadtree.hpp.

Referenced by spherical_quadtree::update().

gsgl::index_t last_num_merge_nodes [protected, inherited]

Definition at line 143 of file spherical_quadtree.hpp.

Referenced by spherical_quadtree::update().

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]

gsgl::index_t num_merge_nodes [protected, inherited]

gsgl::scenegraph::node* parent_sg_node [protected, inherited]

gsgl::real_t polar_radius [protected, inherited]

Definition at line 116 of file spherical_quadtree.hpp.

sph_qt_node* root_nodes[6] [protected, inherited]

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().


The documentation for this class was generated from the following file:

Generated on Sat Mar 1 13:50:08 2008 for Periapsis Project by  doxygen 1.5.5