cgv
|
base class of both implementations of the data view managing the component format, the dimension of the view and the step sizes More...
#include <data_view.h>
Public Member Functions | |
data_view_base (const data_format *_format=0) | |
construct the base of a data view from the given format, such that the step sizes and dimension are set to view the complete data set defined in the format. | |
virtual | ~data_view_base () |
delete format if it is owned | |
void | manage_format (bool enable=true) |
whether to manage the data format pointer | |
const data_format * | get_format () const |
return the component format | |
void | set_format (const data_format *_format) |
set a new data format | |
unsigned int | get_dim () const |
return the dimension of the data view, which is less or equal to the dimension of the data format | |
size_t | get_step_size (unsigned int dim) const |
return the step size in bytes in the i-th dimension | |
Protected Member Functions | |
data_view_base (const data_format *_format, unsigned int _dim, const size_t *_step_sizes) | |
constructor used to construct sub views onto the data view | |
Protected Attributes | |
const data_format * | format |
bool | owns_format |
whether to own the data format | |
unsigned int | dim |
size_t | step_sizes [4] |
base class of both implementations of the data view managing the component format, the dimension of the view and the step sizes
Definition at line 15 of file data_view.h.
cgv::data::data_view_base::data_view_base | ( | const data_format * | _format = 0 | ) |
construct the base of a data view from the given format, such that the step sizes and dimension are set to view the complete data set defined in the format.
Definition at line 40 of file data_view.cxx.
References cgv::data::packing_info::align(), cgv::data::data_format::get_alignment(), cgv::data::component_format::get_entry_size(), cgv::data::data_format::get_nr_dimensions(), and owns_format.
|
virtual |
unsigned int cgv::data::data_view_base::get_dim | ( | ) | const |
return the dimension of the data view, which is less or equal to the dimension of the data format
Definition at line 84 of file data_view.cxx.
const data_format * cgv::data::data_view_base::get_format | ( | ) | const |
return the component format
Definition at line 73 of file data_view.cxx.
Referenced by cgv::media::volume::volume::add_new_component(), cgv::data::data_view::compose(), cgv::render::texture::create(), cgv::render::gl::create_texture(), cgv::render::gl::load_texture(), cgv::render::gl::gl_context::read_frame_buffer(), cgv::media::image::bmp_reader::read_line(), cgv::data::data_view::reflect_horizontally(), cgv::render::texture::replace(), cgv::render::texture::replace(), cgv::media::volume::volume::replace_component(), cgv::render::gl::replace_texture(), cgv::render::context::write_frame_buffer_to_image(), and cgv::media::image::bmp_writer::write_image().
size_t cgv::data::data_view_base::get_step_size | ( | unsigned int | dim | ) | const |
return the step size in bytes in the i-th dimension
Definition at line 89 of file data_view.cxx.
Referenced by cgv::data::data_view::reflect_horizontally(), and cgv::render::gl::image_drawable::save_images().
void cgv::data::data_view_base::manage_format | ( | bool | enable = true | ) |
whether to manage the data format pointer
Definition at line 59 of file data_view.cxx.
References owns_format.
Referenced by cgv::render::gl::gl_context::read_frame_buffer().
void cgv::data::data_view_base::set_format | ( | const data_format * | _format | ) |
set a new data format
Definition at line 78 of file data_view.cxx.
|
protected |
Definition at line 21 of file data_view.h.
|
protected |
Definition at line 18 of file data_view.h.
|
protected |
whether to own the data format
Definition at line 20 of file data_view.h.
Referenced by data_view_base(), manage_format(), cgv::data::const_data_view::operator=(), cgv::data::data_view::operator=(), and ~data_view_base().
|
protected |
Definition at line 22 of file data_view.h.