#include <iso_img_buffer.h>
Collaboration diagram for iso::img::Buffer< Type >:
Public Member Functions | |
Buffer () | |
default constructor | |
Buffer (const math::Vector2< unsigned int > &pSize, unsigned int pChannelCount) | |
create buffer | |
Buffer (const Buffer &pBuffer) | |
copy constructor | |
virtual | ~Buffer () |
destructor | |
unsigned int | width () const |
return buffer width | |
unsigned int | height () const |
return buffer height | |
const math::Vector2< unsigned int > & | size () const |
return buffer size | |
unsigned int | channelCount () const |
returns number of channels | |
Type * | data () |
return buffer values | |
const Type * | data () const |
return buffer values | |
Type * | data (unsigned int pChannel) throw (ImgException) |
return single channel data | |
Type | data (const math::Vector2< unsigned int > &pPos, int pChannel) throw (ImgException) |
return single buffer value | |
void | setChannel (unsigned int pChannel, Type pValue) throw (ImgException) |
set all values within a channel to the same value | |
virtual void | setSize (const math::Vector2< unsigned int > &pSize, unsigned int pChannelCount) |
change buffer size | |
virtual void | setSize (const math::Vector2< unsigned int > &pSize) |
change number of frames | |
virtual void | setChannelCount (unsigned int pChannelCount) |
change number of channels | |
virtual const Buffer & | operator= (const Buffer &pBuffer) throw (ImgException) |
assignment operator | |
virtual Type | operator= (Type pValue) |
set content of buffer to one value | |
virtual bool | operator== (const Buffer &pBuffer) const |
comparison operator | |
virtual const Buffer & | operator+= (Type pValue) |
+= operator | |
virtual const Buffer & | operator *= (Type pValue) |
*= operator | |
virtual const Buffer & | operator+= (const Buffer &pBuffer) throw (ImgException) |
+= operator | |
virtual const Buffer & | operator *= (const Buffer &pBuffer) throw (ImgException) |
*= operator | |
virtual base::String | info () const |
obtain textual buffer information | |
Protected Member Functions | |
virtual void | setDim (unsigned int p_dim) |
set dimension of vector | |
Protected Attributes | |
math::Vector2< unsigned int > | mSize |
buffer size | |
unsigned int | mChannelCount |
channel count | |
unsigned int & | mCount |
total data count | |
Type * | mData |
buffer data | |
Static Protected Attributes | |
static math::Vector2< unsigned int > | sSize |
default buffer size | |
static unsigned int | sChannelCount |
default channel count | |
Friends | |
std::ostream & | operator<< (std::ostream &pOstream, const Buffer &pBuffer) |
print buffer information |
iso::img::Buffer< Type >::Buffer | ( | ) |
default constructor
iso::img::Buffer< Type >::Buffer | ( | const math::Vector2< unsigned int > & | pSize, | |
unsigned int | pChannelCount | |||
) |
create buffer
pSize | size of buffer | |
pChannelCount | number of channels |
iso::img::Buffer< Type >::Buffer | ( | const Buffer< Type > & | pBuffer | ) |
copy constructor
pBuffer | buffer |
iso::img::Buffer< Type >::~Buffer | ( | ) | [virtual] |
destructor
unsigned int iso::img::Buffer< Type >::width | ( | ) | const |
return buffer width
unsigned int iso::img::Buffer< Type >::height | ( | ) | const |
return buffer height
const math::Vector2< unsigned int > & iso::img::Buffer< Type >::size | ( | ) | const |
return buffer size
unsigned int iso::img::Buffer< Type >::channelCount | ( | ) | const |
returns number of channels
Type * iso::img::Buffer< Type >::data | ( | ) |
return buffer values
const Type * iso::img::Buffer< Type >::data | ( | ) | const |
return buffer values
Type * iso::img::Buffer< Type >::data | ( | unsigned int | pChannel | ) | throw (ImgException) |
return single channel data
pChannel | channel index |
ImgException | channel index out of bounds |
Type iso::img::Buffer< Type >::data | ( | const math::Vector2< unsigned int > & | pPos, | |
int | pChannel | |||
) | throw (ImgException) |
return single buffer value
pPos | pixel position | |
pChannel | channel index |
ImgException | pixel position or channel index out of bouhnds |
void iso::img::Buffer< Type >::setChannel | ( | unsigned int | pChannel, | |
Type | pValue | |||
) | throw (ImgException) |
set all values within a channel to the same value
pChannel | channel | |
pValue | value |
ImgException | channel out of bounds |
void iso::img::Buffer< Type >::setSize | ( | const math::Vector2< unsigned int > & | pSize, | |
unsigned int | pChannelCount | |||
) | [virtual] |
change buffer size
pSize | new buffer size | |
pChannelCount | new channel count |
void iso::img::Buffer< Type >::setSize | ( | const math::Vector2< unsigned int > & | pSize | ) | [virtual] |
change number of frames
pSize | new buffer size |
void iso::img::Buffer< Type >::setChannelCount | ( | unsigned int | pChannelCount | ) | [virtual] |
change number of channels
pChannelCount | new channelCount |
const Buffer< Type > & iso::img::Buffer< Type >::operator= | ( | const Buffer< Type > & | pBuffer | ) | throw (ImgException) [virtual] |
assignment operator
pBuffer | buffer to copy properties from |
ImgException | size or channelCount doesn't match |
Type iso::img::Buffer< Type >::operator= | ( | Type | pValue | ) | [virtual] |
set content of buffer to one value
pValue | value to fill the buffer with |
bool iso::img::Buffer< Type >::operator== | ( | const Buffer< Type > & | pBuffer | ) | const [virtual] |
comparison operator
pBuffer | buffer to which the comparison is made to |
const Buffer< Type > & iso::img::Buffer< Type >::operator+= | ( | Type | pValue | ) | [virtual] |
+= operator
pValue | value to be added |
const Buffer< Type > & iso::img::Buffer< Type >::operator *= | ( | Type | pValue | ) | [virtual] |
*= operator
pValue | value to be multiplied |
const Buffer< Type > & iso::img::Buffer< Type >::operator+= | ( | const Buffer< Type > & | pBuffer | ) | throw (ImgException) [virtual] |
+= operator
pBuffer | buffer to be added |
ImgException | buffers don't possess same dimensions |
const Buffer< Type > & iso::img::Buffer< Type >::operator *= | ( | const Buffer< Type > & | pBuffer | ) | throw (ImgException) [virtual] |
*= operator
pBuffer | buffer to be multiplied |
ImgException | buffers don't possess same dimensions |
base::String iso::img::Buffer< Type >::info | ( | ) | const [virtual] |
obtain textual buffer information
void iso::img::Buffer< Type >::setDim | ( | unsigned int | p_dim | ) | [protected, virtual] |
set dimension of vector
p_dim | new vector dimension |
std::ostream& operator<< | ( | std::ostream & | pOstream, | |
const Buffer< Type > & | pBuffer | |||
) | [friend] |
print buffer information
math::Vector2< unsigned int > iso::img::Buffer< Type >::sSize [static, protected] |
default buffer size
unsigned int iso::img::Buffer< Type >::sChannelCount [static, protected] |
default channel count
math::Vector2<unsigned int> iso::img::Buffer< Type >::mSize [protected] |
buffer size
unsigned int iso::img::Buffer< Type >::mChannelCount [protected] |
channel count
unsigned int& iso::img::Buffer< Type >::mCount [protected] |
total data count
Type* iso::img::Buffer< Type >::mData [protected] |
buffer data