cgv
Loading...
Searching...
No Matches
cgv::data Namespace Reference

namespace for data management components More...

Classes

class  ascii_read_reflection_handler
 read from ascii file More...
 
class  ascii_reflection_handler
 read from ascii file More...
 
class  ascii_write_reflection_handler
 read from ascii file More...
 
class  binary_read_reflection_handler
 read from ascii file More...
 
class  binary_reflection_handler
 reflect to and from binary file More...
 
class  binary_write_reflection_handler
 read from ascii file More...
 
class  component_format
 the component format inherits the information of a packing_info and adds information on the component type, which components are present in the data and in which order they appear More...
 
class  const_data_view
 The const_data_view has the functionality of the data_view but uses a const pointer and therefore does not allow to manage the pointer nor to set the data. More...
 
class  data_format
 A data_format describes a multidimensional data block of data entries. More...
 
class  data_view
 the data view gives access to a data array of one, two, three or four dimensions. More...
 
class  data_view_base
 base class of both implementations of the data view managing the component format, the dimension of the view and the step sizes More...
 
class  data_view_impl
 template class implementing the part of the view that depends on whether the pointer is const or not and manages the data pointer itself. More...
 
class  dynamic_priority_queue
 IndexHeap is a heap that allows changing of the elements. More...
 
class  grid
 
class  image_view
 
class  interval_map
 Extension of a standard map container that allows easy retreival of lower and upper bounds given a key. More...
 
class  io_reflection_handler
 common base for all io reflection handlers More...
 
class  optional
 A simple and naiive implementation of an optional value. More...
 
class  packing_info
 the packing_info class stores information about packed integers structures. More...
 
class  quadtree
 
class  ref_arr
 
class  ref_counted
 if you derive your class from this class, a ref_ptr will do reference counting in the inhereted ref_count member. More...
 
class  ref_ptr
 reference counted pointer, which can work together with types that are derived from ref_counted, in which case the reference count of ref_counted is used. More...
 
class  ref_ptr_impl
 
class  ref_ptr_impl< T, true >
 
class  ref_ptr_tag
 struct used to make ref pointers to ref_counted friends of ref_counted More...
 
struct  union_find
 

Enumerations

enum  NamingConvention { NC_NONE , NC_SHORT , NC_LONG }
 different naming conventions for member names More...
 
enum  ComponentFormat {
  CF_UNDEF , CF_R , CF_G , CF_B ,
  CF_A , CF_L , CF_I , CF_LA ,
  CF_IA , CF_RG , CF_RGB , CF_RGBA ,
  CF_BGR , CF_BGRA , CF_D , CF_S ,
  CF_P2D , CF_P3D , CF_P4D , CF_N2D ,
  CF_N3D , CF_T2D , CF_T3D , CF_T4D ,
  CF_LAST
}
 define standard formats, which should be used to avoid wrong assignment of component names More...
 
enum  ComponentIntegerInterpretation { CII_DEFAULT , CII_SNORM , CII_INTEGER }
 define different interpretations of integer components More...
 
enum  IOReflectionError {
  RE_NO_ERROR , RE_FILE_OPEN_ERROR , RE_FILE_READ_ERROR , RE_FILE_WRITE_ERROR ,
  RE_CONTENT_MISMATCH , RE_VERSION_MISMATCH
}
 different error codes More...
 

Functions

bool extract_special_type (const std::string &tok, TypeId &component_type, ComponentIntegerInterpretation &cii)
 
std::ostream & operator<< (std::ostream &os, const component_format &cf)
 stream out operator writes the component format in the syntax of description strings as defined in the docu of set_component_format().
 
bool fmt1_compares_better (const component_format &fmt, const component_format &fmt1, const component_format &fmt2)
 default function to check whether fmt1 is a better match to fmt than fmt2
 
unsigned find_best_match (const component_format &fmt, const char **format_descriptions, const component_format *fmt0=0, bool(*fmt1_better_match)( const component_format &fmt, const component_format &fmt1, const component_format &fmt2)=fmt1_compares_better)
 find the best matching format in a list of formats described by strings and return index of best match
 
std::ostream & operator<< (std::ostream &os, const data_format &df)
 stream out operator writes the data format in the syntax of description strings as defined in the docu of set_data_format().
 
template<typename T , typename S >
void sub_sample_2_2 (const const_data_view &src, data_view &dest)
 
template<typename T >
void copy_sub_view (const const_data_view &src, std::ptrdiff_t x, std::ptrdiff_t y, std::ptrdiff_t w, std::ptrdiff_t h, data_view &dst, std::ptrdiff_t X, std::ptrdiff_t Y)
 
enum_reflection_traits< IOReflectionErrorget_reflection_traits (const IOReflectionError &)
 

Variables

static const char * component_formats []
 
class CGV_API const_data_view
 

Detailed Description

namespace for data management components

Enumeration Type Documentation

◆ ComponentFormat

define standard formats, which should be used to avoid wrong assignment of component names

Enumerator
CF_R 

undefinded format with no component

CF_G 

red channel of color format

CF_B 

green channel of color format

CF_A 

blue channel of color format

CF_L 

alpha format

CF_I 

color format with luminance component L

CF_LA 

color format with intensity component I

CF_IA 

color format with luminance and alpha components: L and A

CF_RG 

color format with intensity and alpha components: I and A

CF_RGB 

color format with two components R and G

CF_RGBA 

color format with components R, G and B

CF_BGR 

color format with components R, G, B and A

CF_BGRA 

color format with components B, G and R

CF_D 

color format with components B, G, R and A

CF_S 

depth component

CF_P2D 

stencil component

CF_P3D 

point format with components px and py

CF_P4D 

point format with components px, py and pz

CF_N2D 

point format with components px, py, pz and pw

CF_N3D 

normal format with components nx and ny

CF_T2D 

normal format with components nx, ny and nz

CF_T3D 

texture coordinats format with components ts and tt

CF_T4D 

texture coordinats format with components ts, tt and tr

CF_LAST 

texture coordinats format with components ts, tt, tr and tq

this is always the last entry in the component formats and used for iteration

Definition at line 16 of file component_format.h.

◆ ComponentIntegerInterpretation

define different interpretations of integer components

Definition at line 45 of file component_format.h.

◆ IOReflectionError

different error codes

Definition at line 13 of file io_reflection_handler.h.

◆ NamingConvention

different naming conventions for member names

Definition at line 13 of file ascii_io_reflection_handlers.h.

Function Documentation

◆ copy_sub_view()

template<typename T >
void cgv::data::copy_sub_view ( const const_data_view src,
std::ptrdiff_t  x,
std::ptrdiff_t  y,
std::ptrdiff_t  w,
std::ptrdiff_t  h,
data_view dst,
std::ptrdiff_t  X,
std::ptrdiff_t  Y 
)

Definition at line 43 of file image_view.cxx.

◆ extract_special_type()

bool cgv::data::extract_special_type ( const std::string &  tok,
TypeId component_type,
ComponentIntegerInterpretation cii 
)

Definition at line 91 of file component_format.cxx.

◆ find_best_match()

CGV_API unsigned int cgv::data::find_best_match ( const component_format fmt,
const char **  format_descriptions,
const component_format fmt0,
bool(*)(const component_format &fmt, const component_format &fmt1, const component_format &fmt2)  fmt1_better_match 
)

find the best matching format in a list of formats described by strings and return index of best match

Definition at line 536 of file component_format.cxx.

Referenced by cgv::render::gl::find_best_texture_format().

◆ fmt1_compares_better()

◆ get_reflection_traits()

CGV_API cgv::reflect::enum_reflection_traits< IOReflectionError > cgv::data::get_reflection_traits ( const IOReflectionError )

Definition at line 9 of file io_reflection_handler.cxx.

◆ operator<<() [1/2]

CGV_API std::ostream & cgv::data::operator<< ( std::ostream &  os,
const component_format cf 
)

stream out operator writes the component format in the syntax of description strings as defined in the docu of set_component_format().

define stream out operator

Definition at line 427 of file component_format.cxx.

◆ operator<<() [2/2]

CGV_API std::ostream & cgv::data::operator<< ( std::ostream &  os,
const data_format df 
)

stream out operator writes the data format in the syntax of description strings as defined in the docu of set_data_format().

define stream out operator

Definition at line 301 of file data_format.cxx.

◆ sub_sample_2_2()

template<typename T , typename S >
void cgv::data::sub_sample_2_2 ( const const_data_view src,
data_view dest 
)

Definition at line 11 of file image_view.cxx.

Variable Documentation

◆ component_formats

const char* cgv::data::component_formats[]
static
Initial value:
= {
"",
"R",
"G",
"B",
"A",
"L",
"I",
"L,A",
"I,A",
"R,G",
"R,G,B",
"R,G,B,A",
"B,G,R",
"B,G,R,A",
"D",
"S",
"px,py",
"px,py,pz",
"px,py,pz,pw",
"nx,ny",
"nx,ny,nz",
"ts,tt",
"ts,tt,tr",
"ts,tt,tr,tq",
}

Definition at line 14 of file component_format.cxx.

◆ const_data_view

Definition at line 141 of file data_view.h.