21 template <>
struct color_storage_traits<color<float, RGB, OPACITY> > {
static const ColorType color_type = CT_RGBA; };
22 template <>
struct color_storage_traits<color<unsigned char, RGB> > {
static const ColorType color_type = CT_RGB8; };
23 template <>
struct color_storage_traits<color<unsigned char, RGB, OPACITY> > {
static const ColorType color_type = CT_RGBA8; };
56 virtual void resize(
size_t nr_colors) = 0;
62 virtual void set_color(
size_t i,
const void* col_ptr) = 0;
72 virtual void put_color(
size_t i,
void* col_ptr)
const = 0;
88 std::vector<C> colors;
93 colors(csm.colors) { }
95 template <
typename C1>
97 for (
const auto& col : csm.colors)
98 colors.push_back(col);
115 void resize(
size_t nr_colors) { colors.resize(nr_colors); }
119 void set_color(
size_t i,
const void* col_ptr) { colors[i] = *
reinterpret_cast<const C*
>(col_ptr); }
124 void put_color(
size_t i,
void* col_ptr)
const { *
reinterpret_cast<C*
>(col_ptr) = colors[i]; }
133 #include <cgv/config/lib_end.h>
the cgv namespace
Definition: vr_calib.cxx:9