cgv
|
An axis aligned box, defined by to points: min and max. More...
#include <axis_aligned_box.h>
Public Types | |
typedef cgv::math::fvec< T, N > | fpnt_type |
internally fixed sized points and vectors are used | |
typedef cgv::math::fvec< T, N > | fvec_type |
typedef cgv::math::vec< T > | pnt_type |
the interface allows also to work with variable sized points | |
typedef cgv::math::vec< T > | vec_type |
Public Member Functions | |
axis_aligned_box () | |
standard constructor does not initialize | |
template<typename S > | |
axis_aligned_box (const axis_aligned_box< S, N > &B) | |
type conversion copy constructor | |
axis_aligned_box (const fpnt_type &_minp, const fpnt_type &_maxp) | |
construct from min point and max point | |
axis_aligned_box (const pnt_type &_minp, const pnt_type &_maxp) | |
construct from min point and max point | |
void | invalidate () |
set to invalid min and max points | |
const fpnt_type & | get_min_pnt () const |
return a const reference to corner 0 | |
const fpnt_type & | get_max_pnt () const |
return a const reference to corner 7 | |
fpnt_type & | ref_min_pnt () |
return a reference to corner 0 | |
fpnt_type & | ref_max_pnt () |
return a reference to corner 7 | |
fpnt_type | get_corner (int i) const |
return the i-th corner where the lower N bits of i are used to select between min (bit = 0) and max (bit = 1) coordinate | |
fvec_type | get_alpha (const fvec_type &p) const |
return a vector containing linear interpolation parameter values in the different dimensions | |
fvec_type | get_extent () const |
return a vector with the extents in the different dimensions | |
fpnt_type | get_center () const |
return the center of the box | |
bool | is_valid () const |
check if aab is valid | |
bool | inside (const fpnt_type &p) const |
check whether a point is inside the aabb | |
void | add_point (const fpnt_type &p) |
extent box to include given point | |
void | add_point (const pnt_type &p) |
extent box to include given point | |
void | add_axis_aligned_box (const axis_aligned_box< T, N > &aab) |
extent box to include given axis alinged box | |
axis_aligned_box< T, N > | intersect (const axis_aligned_box< T, N > &aab) |
returns intersection of this aab with the provided aab | |
void | scale (const T &f) |
scale the complete box with respect to the world coordinate origin | |
void | translate (const fpnt_type &v) |
translate box by vector | |
unsigned | get_max_extent_coord_index () const |
return the index of the coordinte with maximum extend | |
Protected Attributes | |
fpnt_type | minp |
fpnt_type | maxp |
An axis aligned box, defined by to points: min and max.
Definition at line 14 of file axis_aligned_box.h.
typedef cgv::math::fvec<T,N> cgv::media::axis_aligned_box< T, N >::fpnt_type |
internally fixed sized points and vectors are used
Definition at line 18 of file axis_aligned_box.h.
typedef cgv::math::fvec<T,N> cgv::media::axis_aligned_box< T, N >::fvec_type |
Definition at line 19 of file axis_aligned_box.h.
typedef cgv::math::vec<T> cgv::media::axis_aligned_box< T, N >::pnt_type |
the interface allows also to work with variable sized points
Definition at line 21 of file axis_aligned_box.h.
typedef cgv::math::vec<T> cgv::media::axis_aligned_box< T, N >::vec_type |
Definition at line 22 of file axis_aligned_box.h.
|
inline |
standard constructor does not initialize
Definition at line 28 of file axis_aligned_box.h.
References cgv::media::axis_aligned_box< T, N >::invalidate().
|
inline |
type conversion copy constructor
Definition at line 31 of file axis_aligned_box.h.
|
inline |
construct from min point and max point
Definition at line 35 of file axis_aligned_box.h.
|
inline |
construct from min point and max point
Definition at line 37 of file axis_aligned_box.h.
References cgv::media::axis_aligned_box< T, N >::invalidate(), and cgv::math::vec< T >::size().
|
inline |
extent box to include given axis alinged box
Definition at line 118 of file axis_aligned_box.h.
References cgv::media::axis_aligned_box< T, N >::add_point(), and cgv::media::axis_aligned_box< T, N >::is_valid().
|
inline |
extent box to include given point
Definition at line 94 of file axis_aligned_box.h.
References cgv::media::axis_aligned_box< T, N >::is_valid().
Referenced by cgv::media::axis_aligned_box< T, N >::add_axis_aligned_box(), cgv::media::mesh::simple_mesh< T >::compute_box(), cgv::render::extract_additional_information(), cgv::render::gl::image_drawable::image_drawable(), cgv::render::gl::image_drawable::read_image(), and cgv::render::gl::image_drawable::read_images().
|
inline |
extent box to include given point
Definition at line 105 of file axis_aligned_box.h.
References cgv::media::axis_aligned_box< T, N >::is_valid(), and cgv::math::vec< T >::size().
|
inline |
return a vector containing linear interpolation parameter values in the different dimensions
Definition at line 78 of file axis_aligned_box.h.
|
inline |
return the center of the box
Definition at line 82 of file axis_aligned_box.h.
Referenced by cgv::render::gl::mesh_drawable::center_view(), cgv::render::clipped_view::compute_clipping_planes(), and cgv::render::volume_renderer::draw().
|
inline |
return the i-th corner where the lower N bits of i are used to select between min (bit = 0) and max (bit = 1) coordinate
Definition at line 68 of file axis_aligned_box.h.
Referenced by cgv::render::clipped_view::compute_clipping_planes(), cgv::render::gl::gl_implicit_surface_drawable_base::draw(), cgv::render::gl::gl_implicit_surface_drawable_base::finish_frame(), and cgv::plot::plot_base::get_corner().
|
inline |
return a vector with the extents in the different dimensions
Definition at line 80 of file axis_aligned_box.h.
Referenced by cgv::render::gl::mesh_drawable::center_view(), cgv::render::gl::image_drawable::draw(), cgv::render::gl::gl_implicit_surface_drawable_base::draw(), cgv::render::volume_renderer::draw(), cgv::media::mesh::cuberille< X, T, P >::extract(), cgv::media::mesh::dual_contouring< X, T >::extract(), cgv::media::mesh::marching_cubes_base< X, T >::extract_impl(), cgv::render::gl::gl_implicit_surface_drawable_base::extract_mesh(), cgv::render::gl::gl_implicit_surface_drawable_base::finish_frame(), cgv::render::performance_monitor::get_buffer_size(), cgv::media::axis_aligned_box< T, N >::get_max_extent_coord_index(), and cgv::render::gl::image_drawable::save_images().
|
inline |
return the index of the coordinte with maximum extend
Definition at line 156 of file axis_aligned_box.h.
References cgv::media::axis_aligned_box< T, N >::get_extent().
Referenced by cgv::render::gl::mesh_drawable::center_view().
|
inline |
return a const reference to corner 7
Definition at line 62 of file axis_aligned_box.h.
Referenced by cgv::render::clipped_view::compute_clipping_planes(), cgv::media::mesh::convex_polyhedron< T, TCDim >::construct_box(), cgv::render::volume_renderer::draw(), cgv::render::volume_renderer::enable(), cgv::render::gl::image_drawable::save_images(), cgv::render::box_renderer::set_box(), cgv::render::box_wire_renderer::set_box(), cgv::plot::plot_base::set_domain(), cgv::plot::plot_base::set_domain3(), cgv::render::rectangle_renderer::set_rectangle(), cgv::render::rectangle_renderer::set_textured_rectangle(), and cgv::render::context::tesselate_box().
|
inline |
return a const reference to corner 0
Definition at line 60 of file axis_aligned_box.h.
Referenced by cgv::render::clipped_view::compute_clipping_planes(), cgv::media::mesh::convex_polyhedron< T, TCDim >::construct_box(), cgv::render::gl::image_drawable::draw(), cgv::render::volume_renderer::draw(), cgv::render::volume_renderer::enable(), cgv::media::mesh::cuberille< X, T, P >::extract(), cgv::media::mesh::dual_contouring< X, T >::extract(), cgv::media::mesh::marching_cubes_base< X, T >::extract_impl(), cgv::render::gl::image_drawable::save_images(), cgv::render::box_renderer::set_box(), cgv::render::box_wire_renderer::set_box(), cgv::plot::plot_base::set_domain(), cgv::plot::plot_base::set_domain3(), cgv::render::rectangle_renderer::set_rectangle(), cgv::render::rectangle_renderer::set_textured_rectangle(), and cgv::render::context::tesselate_box().
|
inline |
check whether a point is inside the aabb
Definition at line 86 of file axis_aligned_box.h.
|
inline |
returns intersection of this aab with the provided aab
Definition at line 125 of file axis_aligned_box.h.
References cgv::media::axis_aligned_box< T, N >::is_valid().
|
inline |
set to invalid min and max points
Definition at line 53 of file axis_aligned_box.h.
Referenced by cgv::media::axis_aligned_box< T, N >::axis_aligned_box(), cgv::media::axis_aligned_box< T, N >::axis_aligned_box(), cgv::render::extract_additional_information(), cgv::render::gl::image_drawable::read_image(), and cgv::render::gl::image_drawable::read_images().
|
inline |
check if aab is valid
Definition at line 84 of file axis_aligned_box.h.
Referenced by cgv::media::axis_aligned_box< T, N >::add_axis_aligned_box(), cgv::media::axis_aligned_box< T, N >::add_point(), cgv::media::axis_aligned_box< T, N >::add_point(), cgv::render::clipped_view::compute_clipping_planes(), cgv::render::clipped_view::get_scene_extent(), cgv::media::axis_aligned_box< T, N >::intersect(), cgv::media::axis_aligned_box< T, N >::scale(), and cgv::media::axis_aligned_box< T, N >::translate().
|
inline |
return a reference to corner 7
Definition at line 66 of file axis_aligned_box.h.
Referenced by cgv::render::performance_monitor::performance_monitor(), and cgv::media::axis_aligned_box< T, N >::translate().
|
inline |
return a reference to corner 0
Definition at line 64 of file axis_aligned_box.h.
Referenced by vr_test::init_frame(), cgv::render::performance_monitor::performance_monitor(), and cgv::media::axis_aligned_box< T, N >::translate().
|
inline |
scale the complete box with respect to the world coordinate origin
Definition at line 138 of file axis_aligned_box.h.
References cgv::media::axis_aligned_box< T, N >::is_valid().
|
inline |
translate box by vector
Definition at line 148 of file axis_aligned_box.h.
References cgv::media::axis_aligned_box< T, N >::is_valid(), cgv::media::axis_aligned_box< T, N >::ref_max_pnt(), and cgv::media::axis_aligned_box< T, N >::ref_min_pnt().
|
protected |
Definition at line 25 of file axis_aligned_box.h.
|
protected |
Definition at line 24 of file axis_aligned_box.h.