cgv
Loading...
Searching...
No Matches
cgv::media::abst_color_storage Class Referenceabstract

interface for color storage of different internal types More...

#include <color_storage.h>

Inheritance diagram for cgv::media::abst_color_storage:
cgv::media::color_storage< C >

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_storageclone () 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
 

Detailed Description

interface for color storage of different internal types

Definition at line 26 of file color_storage.h.

Constructor & Destructor Documentation

◆ abst_color_storage()

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.

◆ ~abst_color_storage()

cgv::media::abst_color_storage::~abst_color_storage ( )
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.

Member Function Documentation

◆ clone()

virtual abst_color_storage * cgv::media::abst_color_storage::clone ( ) const
pure virtual

◆ get_color_size()

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().

◆ get_color_type()

ColorType cgv::media::abst_color_storage::get_color_type ( ) const

◆ get_data_ptr()

virtual const void * cgv::media::abst_color_storage::get_data_ptr ( ) const
pure virtual

return a const void pointer to the color data

Implemented in cgv::media::color_storage< C >.

◆ get_data_vector_ptr()

virtual const void * cgv::media::abst_color_storage::get_data_vector_ptr ( ) const
pure virtual

return a const void pointer to the color data vector

Implemented in cgv::media::color_storage< C >.

◆ get_nr_colors()

virtual size_t cgv::media::abst_color_storage::get_nr_colors ( ) const
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().

◆ put_color() [1/5]

virtual void cgv::media::abst_color_storage::put_color ( size_t  i,
rgb col 
) const
pure virtual

set color of type rgb to i-th color

Implemented in cgv::media::color_storage< C >.

◆ put_color() [2/5]

virtual void cgv::media::abst_color_storage::put_color ( size_t  i,
rgb8 col 
) const
pure virtual

set color of type rgb8 to i-th color

Implemented in cgv::media::color_storage< C >.

◆ put_color() [3/5]

virtual void cgv::media::abst_color_storage::put_color ( size_t  i,
rgba col 
) const
pure virtual

set color of type rgba to i-th color

Implemented in cgv::media::color_storage< C >.

◆ put_color() [4/5]

virtual void cgv::media::abst_color_storage::put_color ( size_t  i,
rgba8 col 
) const
pure virtual

set color of type rgba8 to i-th color

Implemented in cgv::media::color_storage< C >.

◆ put_color() [5/5]

virtual void cgv::media::abst_color_storage::put_color ( size_t  i,
void *  col_ptr 
) const
pure virtual

◆ ref_data_ptr()

virtual void * cgv::media::abst_color_storage::ref_data_ptr ( )
pure virtual

return a void pointer to the color data

Implemented in cgv::media::color_storage< C >.

◆ ref_data_vector_ptr()

virtual void * cgv::media::abst_color_storage::ref_data_vector_ptr ( )
pure virtual

return a void pointer to the color data vector

Implemented in cgv::media::color_storage< C >.

◆ resize()

virtual void cgv::media::abst_color_storage::resize ( size_t  nr_colors)
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().

◆ set_color() [1/5]

virtual void cgv::media::abst_color_storage::set_color ( size_t  i,
const rgb col 
)
pure virtual

set i-th color from color of type rgb

Implemented in cgv::media::color_storage< C >.

◆ set_color() [2/5]

virtual void cgv::media::abst_color_storage::set_color ( size_t  i,
const rgb8 col 
)
pure virtual

set i-th color from color of type rgb8

Implemented in cgv::media::color_storage< C >.

◆ set_color() [3/5]

virtual void cgv::media::abst_color_storage::set_color ( size_t  i,
const rgba col 
)
pure virtual

set i-th color from color of type rgba

Implemented in cgv::media::color_storage< C >.

◆ set_color() [4/5]

virtual void cgv::media::abst_color_storage::set_color ( size_t  i,
const rgba8 col 
)
pure virtual

set i-th color from color of type rgba8

Implemented in cgv::media::color_storage< C >.

◆ set_color() [5/5]

virtual void cgv::media::abst_color_storage::set_color ( size_t  i,
const void *  col_ptr 
)
pure virtual

Member Data Documentation

◆ color_type

ColorType cgv::media::abst_color_storage::color_type
protected

Definition at line 30 of file color_storage.h.


The documentation for this class was generated from the following files: