Classes | |
class | checkered_box |
class | coord_system |
A utility class for drawing coordinate systems of nodes. More... | |
class | simple_sphere |
Functions | |
gsgl::real_t | dot_in_eye_space (node *frame, const math::vector &pos=math::vector::ZERO) |
void | draw_billboard (node *frame, const math::vector &pos, const gsgl::real_t radius) |
Draws a billboard at the specified point in the specified frame. | |
gsgl::real_t | greatest_extent (const node *n) |
bool | is_on_screen (node *frame, const gsgl::real_t field_of_view, const gsgl::real_t aspect_ratio, const math::vector &pos=math::vector::ZERO, const gsgl::real_t radius=0) |
gsgl::real_t | pixel_size (const gsgl::real_t distance, const gsgl::real_t radius, const gsgl::real_t field_of_view, const int pixels_in_field_of_view) |
vector | pos_in_eye_space (node *frame, const math::vector &pos=math::vector::ZERO) |
vector | pos_in_screen_space (const gsgl::math::vector &point, const int viewport[4], const gsgl::math::transform &modelview_projection) |
void | save_screen_info (int viewport[4], gsgl::math::transform &modelview_projection) |
Save projection information for later doing calculations in screen space. |
SCENEGRAPH_API gsgl::real_t dot_in_eye_space | ( | node * | frame, | |
const math::vector & | pos = math::vector::ZERO | |||
) |
Definition at line 310 of file utils.cpp.
References vector::dot(), node::get_modelview(), vector::NEG_Z_AXIS, and vector::normalize().
SCENEGRAPH_API void draw_billboard | ( | node * | frame, | |
const math::vector & | pos, | |||
const gsgl::real_t | radius | |||
) |
Draws a billboard at the specified point in the specified frame.
Make sure to bind the appropriate texture before calling.
Definition at line 396 of file utils.cpp.
References CHECK_GL_ERRORS, vector::cross(), node::get_modelview(), vector::normalize(), matrix::ptr(), transform::rotation_part(), transform::transpose(), and vector::Y_AXIS.
Referenced by star::draw().
SCENEGRAPH_API gsgl::real_t greatest_extent | ( | const node * | n | ) |
Definition at line 371 of file utils.cpp.
References node::get_children(), node::get_scale(), node::max_extent(), and gsgl::max_val().
Referenced by vehicle::minimum_view_distance().
SCENEGRAPH_API bool is_on_screen | ( | node * | frame, | |
const gsgl::real_t | field_of_view, | |||
const gsgl::real_t | aspect_ratio, | |||
const math::vector & | pos = math::vector::ZERO , |
|||
const gsgl::real_t | radius = 0 | |||
) |
Definition at line 319 of file utils.cpp.
References gsgl::math::DEG2RAD, vector::dot(), node::get_draw_flags(), node::get_modelview(), vector::mag(), vector::NEG_Z_AXIS, node::NODE_NO_FRUSTUM_CHECK, and vector::normalize().
Referenced by sph_qt_node::draw(), node::draw_scene(), and large_lithosphere::update().
SCENEGRAPH_API gsgl::real_t pixel_size | ( | const gsgl::real_t | distance, | |
const gsgl::real_t | radius, | |||
const gsgl::real_t | field_of_view, | |||
const int | pixels_in_field_of_view | |||
) |
Definition at line 342 of file utils.cpp.
References gsgl::math::DEG2RAD.
Referenced by large_rocky_body::draw(), celestial_body::draw(), and large_lithosphere::update().
SCENEGRAPH_API math::vector pos_in_eye_space | ( | node * | frame, | |
const math::vector & | pos = math::vector::ZERO | |||
) |
Definition at line 304 of file utils.cpp.
References node::get_modelview().
Referenced by node::build_draw_list(), coord_system::draw(), star::draw(), large_rocky_body::draw(), celestial_body::draw(), node::draw_scene(), test_frame::get_priority(), planet_system::get_priority(), large_rocky_body::get_priority(), and celestial_body::get_priority().
SCENEGRAPH_API gsgl::math::vector pos_in_screen_space | ( | const gsgl::math::vector & | point, | |
const int | viewport[4], | |||
const gsgl::math::transform & | modelview_projection | |||
) |
Definition at line 362 of file utils.cpp.
References vector::get_x(), vector::get_y(), and vector::get_z().
SCENEGRAPH_API void save_screen_info | ( | int | viewport[4], | |
transform & | modelview_projection | |||
) |
Save projection information for later doing calculations in screen space.
Definition at line 351 of file utils.cpp.
References CHECK_GL_ERRORS, and matrix::ptr().
Referenced by spherical_quadtree::draw().