cartobase  5.0.5
carto::VoxelValue< T, C > Class Template Reference

Base class for any multichannel data (RGB, RGBA, HSV, ...) More...

#include <cartobase/type/voxelvalue.h>

Inheritance diagram for carto::VoxelValue< T, C >:
Collaboration diagram for carto::VoxelValue< T, C >:

Public Types

typedef T ChannelType
 

Public Member Functions

 VoxelValue ()
 
 VoxelValue (const VoxelValue< T, C > &other)
 
 ~VoxelValue ()
 
bool operator== (const VoxelValue< T, C > &) const
 
bool operator!= (const VoxelValue< T, C > &) const
 
bool operator== (const T &) const
 
bool operator!= (const T &) const
 
 operator bool () const
 
const T & operator[] (unsigned int i) const
 
T & operator[] (unsigned int i)
 

Static Public Attributes

static const unsigned int channelcount = C
 

Protected Attributes

_voxel [C]
 

Detailed Description

template<typename T, unsigned int C>
class carto::VoxelValue< T, C >

Base class for any multichannel data (RGB, RGBA, HSV, ...)

Template Parameters
Tdata type for channel value (uint8_t, ...)
Cnumber of channels The voxel is stored as an array so that sizeof( VoxelValue<T,C> ) = C * sizeof( T )
Only access, equality and stream operators are implemented here. All math operators must be implemented in specific classes (RGB, HSB, ...)

Definition at line 58 of file voxelvalue.h.

Member Typedef Documentation

◆ ChannelType

template<typename T, unsigned int C>
typedef T carto::VoxelValue< T, C >::ChannelType

Definition at line 62 of file voxelvalue.h.

Constructor & Destructor Documentation

◆ VoxelValue() [1/2]

template<typename T , unsigned int C>
carto::VoxelValue< T, C >::VoxelValue ( )

Definition at line 48 of file voxelvalue_d.h.

◆ VoxelValue() [2/2]

template<typename T, unsigned int C>
carto::VoxelValue< T, C >::VoxelValue ( const VoxelValue< T, C > &  other)

Definition at line 56 of file voxelvalue_d.h.

◆ ~VoxelValue()

template<typename T , unsigned int C>
carto::VoxelValue< T, C >::~VoxelValue ( )

Definition at line 65 of file voxelvalue_d.h.

Member Function Documentation

◆ operator bool()

template<typename T , unsigned int C>
carto::VoxelValue< T, C >::operator bool ( ) const

Definition at line 122 of file voxelvalue_d.h.

◆ operator!=() [1/2]

template<typename T, unsigned int C>
bool carto::VoxelValue< T, C >::operator!= ( const VoxelValue< T, C > &  aa) const
inline

Definition at line 90 of file voxelvalue_d.h.

◆ operator!=() [2/2]

template<typename T, unsigned int C>
bool carto::VoxelValue< T, C >::operator!= ( const T &  bb) const
inline

Definition at line 112 of file voxelvalue_d.h.

◆ operator==() [1/2]

template<typename T, unsigned int C>
bool carto::VoxelValue< T, C >::operator== ( const VoxelValue< T, C > &  aa) const
inline

Definition at line 77 of file voxelvalue_d.h.

◆ operator==() [2/2]

template<typename T, unsigned int C>
bool carto::VoxelValue< T, C >::operator== ( const T &  bb) const

Definition at line 99 of file voxelvalue_d.h.

◆ operator[]() [1/2]

template<typename T, unsigned int C>
const T& carto::VoxelValue< T, C >::operator[] ( unsigned int  i) const
inline

Definition at line 83 of file voxelvalue.h.

◆ operator[]() [2/2]

template<typename T, unsigned int C>
T& carto::VoxelValue< T, C >::operator[] ( unsigned int  i)
inline

Definition at line 85 of file voxelvalue.h.

Member Data Documentation

◆ _voxel

template<typename T, unsigned int C>
T carto::VoxelValue< T, C >::_voxel[C]
protected

Definition at line 88 of file voxelvalue.h.

Referenced by carto::VoxelValue< uint8_t, 4 >::operator[]().

◆ channelcount

template<typename T, unsigned int C>
const unsigned int carto::VoxelValue< T, C >::channelcount = C
static

Definition at line 65 of file voxelvalue.h.


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