34 #ifndef CARTOBASE_TYPE_VOXELVALUE_H 35 #define CARTOBASE_TYPE_VOXELVALUE_H 42 #ifdef CARTO_DEBUG_VOXELVALUE 57 template <
typename T,
unsigned int C>
79 operator bool()
const;
95 template <
typename T,
unsigned int C>
inline 96 std::ostream& operator << ( std::ostream &out, const VoxelValue<T,C> &aa )
100 for( i=0; i<C-1; ++i )
101 out << static_cast<int>( aa[i] ) <<
',';
102 out << static_cast<int>( aa[C-1] ) <<
')';
106 template <
typename T,
unsigned int C>
inline 115 ( in.peek() ==
' ' || in.peek() ==
'\t' || in.peek() ==
'\n' ) )
117 if ( in.peek () ==
'(' )
121 result[0] =
static_cast<T
>( read );
125 result[i] =
static_cast<T
>( read );
128 if( ch != 0 && ch !=
')' )
129 in.setstate (std::ios::failbit);
static const unsigned int channelcount
const T & operator[](unsigned int i) const
std::istream & operator>>(std::istream &in, VoxelValue< T, C > &aa)
Base class for any multichannel data (RGB, RGBA, HSV, ...)
bool operator!=(const VoxelValue< T, C > &) const
bool operator==(const VoxelValue< T, C > &) const