cgv
|
template implementation of color storage model More...
#include <color_storage.h>
Public Member Functions | |
color_storage () | |
construct empty color storage | |
color_storage (const color_storage< C > &csm) | |
construct from color storage of same type | |
template<typename C1 > | |
color_storage (const color_storage< C1 > &csm) | |
construct from color storage of different type | |
color_storage (const abst_color_storage &acsm) | |
construct from abstract color storage of unknown type | |
abst_color_storage * | clone () const |
clone the color storage | |
size_t | get_nr_colors () const |
return number colors stored in color storage | |
void | resize (size_t nr_colors) |
resize to the given number of colors | |
const void * | get_data_ptr () const |
return a const void pointer to the color data | |
const void * | get_data_vector_ptr () const |
return a const void pointer to the color data vector | |
void * | ref_data_ptr () |
return a void pointer to the color data | |
void * | ref_data_vector_ptr () |
return a void pointer to the color data vector | |
void | set_color (size_t i, const void *col_ptr) |
set i-th color to color of type stored in storage | |
void | set_color (size_t i, const rgb &col) |
set i-th color from color of type rgb | |
void | set_color (size_t i, const rgba &col) |
set i-th color from color of type rgba | |
void | set_color (size_t i, const rgb8 &col) |
set i-th color from color of type rgb8 | |
void | set_color (size_t i, const rgba8 &col) |
set i-th color from color of type rgba8 | |
void | put_color (size_t i, void *col_ptr) const |
set color of type stored in storage to i-th color | |
void | put_color (size_t i, rgb &col) const |
set color of type rgb to i-th color | |
void | put_color (size_t i, rgba &col) const |
set color of type rgba to i-th color | |
void | put_color (size_t i, rgb8 &col) const |
set color of type rgb8 to i-th color | |
void | put_color (size_t i, rgba8 &col) const |
set color of type rgba8 to i-th color | |
![]() | |
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 | |
Public Attributes | |
std::vector< C > | colors |
Additional Inherited Members | |
![]() | |
ColorType | color_type |
template implementation of color storage model
Definition at line 79 of file color_storage.h.
|
inline |
construct empty color storage
Definition at line 84 of file color_storage.h.
Referenced by cgv::media::color_storage< C >::clone().
|
inline |
construct from color storage of same type
Definition at line 86 of file color_storage.h.
|
inline |
construct from color storage of different type
Definition at line 90 of file color_storage.h.
|
inline |
construct from abstract color storage of unknown type
Definition at line 95 of file color_storage.h.
References cgv::media::abst_color_storage::get_color_type().
|
inlinevirtual |
clone the color storage
Implements cgv::media::abst_color_storage.
Definition at line 104 of file color_storage.h.
References cgv::media::color_storage< C >::color_storage().
|
inlinevirtual |
return a const void pointer to the color data
Implements cgv::media::abst_color_storage.
Definition at line 110 of file color_storage.h.
|
inlinevirtual |
return a const void pointer to the color data vector
Implements cgv::media::abst_color_storage.
Definition at line 111 of file color_storage.h.
|
inlinevirtual |
return number colors stored in color storage
Implements cgv::media::abst_color_storage.
Definition at line 108 of file color_storage.h.
|
inlinevirtual |
set color of type rgb to i-th color
Implements cgv::media::abst_color_storage.
Definition at line 121 of file color_storage.h.
|
inlinevirtual |
set color of type rgb8 to i-th color
Implements cgv::media::abst_color_storage.
Definition at line 123 of file color_storage.h.
|
inlinevirtual |
set color of type rgba to i-th color
Implements cgv::media::abst_color_storage.
Definition at line 122 of file color_storage.h.
|
inlinevirtual |
set color of type rgba8 to i-th color
Implements cgv::media::abst_color_storage.
Definition at line 124 of file color_storage.h.
|
inlinevirtual |
set color of type stored in storage to i-th color
Implements cgv::media::abst_color_storage.
Definition at line 120 of file color_storage.h.
|
inlinevirtual |
return a void pointer to the color data
Implements cgv::media::abst_color_storage.
Definition at line 112 of file color_storage.h.
|
inlinevirtual |
return a void pointer to the color data vector
Implements cgv::media::abst_color_storage.
Definition at line 113 of file color_storage.h.
|
inlinevirtual |
resize to the given number of colors
Implements cgv::media::abst_color_storage.
Definition at line 109 of file color_storage.h.
|
inlinevirtual |
set i-th color from color of type rgb
Implements cgv::media::abst_color_storage.
Definition at line 116 of file color_storage.h.
|
inlinevirtual |
set i-th color from color of type rgb8
Implements cgv::media::abst_color_storage.
Definition at line 118 of file color_storage.h.
|
inlinevirtual |
set i-th color from color of type rgba
Implements cgv::media::abst_color_storage.
Definition at line 117 of file color_storage.h.
|
inlinevirtual |
set i-th color from color of type rgba8
Implements cgv::media::abst_color_storage.
Definition at line 119 of file color_storage.h.
|
inlinevirtual |
set i-th color to color of type stored in storage
Implements cgv::media::abst_color_storage.
Definition at line 115 of file color_storage.h.
std::vector<C> cgv::media::color_storage< C >::colors |
Definition at line 82 of file color_storage.h.