cgv
|
interface for color storage of different internal types More...
#include <color_storage.h>
Public Member Functions | |
abst_color_storage (ColorType _color_type) | |
construct from color type enumerate | |
virtual | ~abst_color_storage () |
virtual destructor ensures that std::vector defined in template class color_storage is destructed too | |
ColorType | get_color_type () const |
return color type of color storage | |
size_t | get_color_size () const |
return size of a single color in byte | |
virtual abst_color_storage * | clone () const =0 |
clone the color storage | |
virtual size_t | get_nr_colors () const =0 |
return number colors stored in color storage | |
virtual void | resize (size_t nr_colors)=0 |
resize to the given number of colors | |
virtual const void * | get_data_ptr () const =0 |
return a const void pointer to the color data | |
virtual const void * | get_data_vector_ptr () const =0 |
return a const void pointer to the color data vector | |
virtual void * | ref_data_ptr ()=0 |
return a void pointer to the color data | |
virtual void * | ref_data_vector_ptr ()=0 |
return a void pointer to the color data vector | |
virtual void | set_color (size_t i, const void *col_ptr)=0 |
set i-th color to color of type stored in storage | |
virtual void | set_color (size_t i, const rgb &col)=0 |
set i-th color from color of type rgb | |
virtual void | set_color (size_t i, const rgba &col)=0 |
set i-th color from color of type rgba | |
virtual void | set_color (size_t i, const rgb8 &col)=0 |
set i-th color from color of type rgb8 | |
virtual void | set_color (size_t i, const rgba8 &col)=0 |
set i-th color from color of type rgba8 | |
virtual void | put_color (size_t i, void *col_ptr) const =0 |
set color of type stored in storage to i-th color | |
virtual void | put_color (size_t i, rgb &col) const =0 |
set color of type rgb to i-th color | |
virtual void | put_color (size_t i, rgba &col) const =0 |
set color of type rgba to i-th color | |
virtual void | put_color (size_t i, rgb8 &col) const =0 |
set color of type rgb8 to i-th color | |
virtual void | put_color (size_t i, rgba8 &col) const =0 |
set color of type rgba8 to i-th color | |
Protected Attributes | |
ColorType | color_type |
interface for color storage of different internal types
Definition at line 26 of file color_storage.h.
cgv::media::abst_color_storage::abst_color_storage | ( | ColorType | _color_type | ) |
construct from color type enumerate
Definition at line 6 of file color_storage.cxx.
|
virtual |
virtual destructor ensures that std::vector defined in template class color_storage is destructed too
Definition at line 11 of file color_storage.cxx.
|
pure virtual |
clone the color storage
Implemented in cgv::media::color_storage< C >.
Referenced by cgv::media::colored_model::colored_model(), and cgv::media::colored_model::operator=().
size_t cgv::media::abst_color_storage::get_color_size | ( | ) | const |
return size of a single color in byte
Definition at line 21 of file color_storage.cxx.
Referenced by cgv::media::colored_model::get_color_size().
ColorType cgv::media::abst_color_storage::get_color_type | ( | ) | const |
return color type of color storage
Definition at line 15 of file color_storage.cxx.
Referenced by cgv::media::color_storage< C >::color_storage(), cgv::media::colored_model::ensure_colors(), and cgv::media::colored_model::get_color_storage_type().
|
pure virtual |
return a const void pointer to the color data
Implemented in cgv::media::color_storage< C >.
|
pure virtual |
return a const void pointer to the color data vector
Implemented in cgv::media::color_storage< C >.
|
pure virtual |
return number colors stored in color storage
Implemented in cgv::media::color_storage< C >.
Referenced by cgv::media::colored_model::get_nr_colors().
|
pure virtual |
set color of type rgb to i-th color
Implemented in cgv::media::color_storage< C >.
|
pure virtual |
set color of type rgb8 to i-th color
Implemented in cgv::media::color_storage< C >.
|
pure virtual |
set color of type rgba to i-th color
Implemented in cgv::media::color_storage< C >.
|
pure virtual |
set color of type rgba8 to i-th color
Implemented in cgv::media::color_storage< C >.
|
pure virtual |
set color of type stored in storage to i-th color
Implemented in cgv::media::color_storage< C >.
Referenced by cgv::media::colored_model::put_color(), cgv::media::colored_model::put_color(), cgv::media::colored_model::put_color(), cgv::media::colored_model::put_color(), and cgv::media::colored_model::put_color().
|
pure virtual |
return a void pointer to the color data
Implemented in cgv::media::color_storage< C >.
|
pure virtual |
return a void pointer to the color data vector
Implemented in cgv::media::color_storage< C >.
|
pure virtual |
resize to the given number of colors
Implemented in cgv::media::color_storage< C >.
Referenced by cgv::media::colored_model::ensure_colors(), and cgv::media::colored_model::resize_colors().
|
pure virtual |
set i-th color from color of type rgb
Implemented in cgv::media::color_storage< C >.
|
pure virtual |
set i-th color from color of type rgb8
Implemented in cgv::media::color_storage< C >.
|
pure virtual |
set i-th color from color of type rgba
Implemented in cgv::media::color_storage< C >.
|
pure virtual |
set i-th color from color of type rgba8
Implemented in cgv::media::color_storage< C >.
|
pure virtual |
set i-th color to color of type stored in storage
Implemented in cgv::media::color_storage< C >.
Referenced by cgv::media::colored_model::set_color(), cgv::media::colored_model::set_color(), cgv::media::colored_model::set_color(), cgv::media::colored_model::set_color(), and cgv::media::colored_model::set_color().
|
protected |
Definition at line 30 of file color_storage.h.