cgv
Loading...
Searching...
No Matches
cgv::data::buffer2d< T > Class Template Reference

Public Types

using value_type = T
 
using vector_type = std::vector< T >
 

Public Member Functions

 buffer2d (size_t width, size_t height)
 
 buffer2d (size_t width, size_t height, const T &init)
 
size_t width () const
 
size_t height () const
 
size_t size () const
 
bool empty () const
 
std::vector< T >::iterator begin ()
 
vector_type::iterator end ()
 
vector_type::const_iterator begin () const
 
vector_type::const_iterator end () const
 
T * data ()
 
const T * data () const
 
void clear ()
 
void resize (size_t width, size_t height)
 
void resize (size_t width, size_t height, const T &init)
 
T & operator[] (size_t index)
 
operator[] (size_t index) const
 
T & operator() (size_t x, size_t y)
 
operator() (size_t x, size_t y) const
 

Detailed Description

template<typename T>
class cgv::data::buffer2d< T >

Definition at line 9 of file buffer2d.h.

Member Typedef Documentation

◆ value_type

template<typename T >
using cgv::data::buffer2d< T >::value_type = T

Definition at line 11 of file buffer2d.h.

◆ vector_type

template<typename T >
using cgv::data::buffer2d< T >::vector_type = std::vector<T>

Definition at line 12 of file buffer2d.h.

Constructor & Destructor Documentation

◆ buffer2d() [1/3]

template<typename T >
cgv::data::buffer2d< T >::buffer2d ( )
inline

Definition at line 14 of file buffer2d.h.

◆ buffer2d() [2/3]

template<typename T >
cgv::data::buffer2d< T >::buffer2d ( size_t  width,
size_t  height 
)
inline

Definition at line 16 of file buffer2d.h.

◆ buffer2d() [3/3]

template<typename T >
cgv::data::buffer2d< T >::buffer2d ( size_t  width,
size_t  height,
const T &  init 
)
inline

Definition at line 21 of file buffer2d.h.

Member Function Documentation

◆ begin() [1/2]

template<typename T >
std::vector< T >::iterator cgv::data::buffer2d< T >::begin ( )
inline

Definition at line 42 of file buffer2d.h.

◆ begin() [2/2]

template<typename T >
vector_type::const_iterator cgv::data::buffer2d< T >::begin ( ) const
inline

Definition at line 50 of file buffer2d.h.

◆ clear()

template<typename T >
void cgv::data::buffer2d< T >::clear ( )
inline

Definition at line 66 of file buffer2d.h.

◆ data() [1/2]

template<typename T >
T * cgv::data::buffer2d< T >::data ( )
inline

Definition at line 58 of file buffer2d.h.

◆ data() [2/2]

template<typename T >
const T * cgv::data::buffer2d< T >::data ( ) const
inline

Definition at line 62 of file buffer2d.h.

◆ empty()

template<typename T >
bool cgv::data::buffer2d< T >::empty ( ) const
inline

Definition at line 38 of file buffer2d.h.

◆ end() [1/2]

template<typename T >
vector_type::iterator cgv::data::buffer2d< T >::end ( )
inline

Definition at line 46 of file buffer2d.h.

◆ end() [2/2]

template<typename T >
vector_type::const_iterator cgv::data::buffer2d< T >::end ( ) const
inline

Definition at line 54 of file buffer2d.h.

◆ height()

template<typename T >
size_t cgv::data::buffer2d< T >::height ( ) const
inline

Definition at line 30 of file buffer2d.h.

◆ operator()() [1/2]

template<typename T >
T & cgv::data::buffer2d< T >::operator() ( size_t  x,
size_t  y 
)
inline

Definition at line 89 of file buffer2d.h.

◆ operator()() [2/2]

template<typename T >
T cgv::data::buffer2d< T >::operator() ( size_t  x,
size_t  y 
) const
inline

Definition at line 93 of file buffer2d.h.

◆ operator[]() [1/2]

template<typename T >
T & cgv::data::buffer2d< T >::operator[] ( size_t  index)
inline

Definition at line 81 of file buffer2d.h.

◆ operator[]() [2/2]

template<typename T >
T cgv::data::buffer2d< T >::operator[] ( size_t  index) const
inline

Definition at line 85 of file buffer2d.h.

◆ resize() [1/2]

template<typename T >
void cgv::data::buffer2d< T >::resize ( size_t  width,
size_t  height 
)
inline

Definition at line 71 of file buffer2d.h.

◆ resize() [2/2]

template<typename T >
void cgv::data::buffer2d< T >::resize ( size_t  width,
size_t  height,
const T &  init 
)
inline

Definition at line 76 of file buffer2d.h.

◆ size()

template<typename T >
size_t cgv::data::buffer2d< T >::size ( ) const
inline

Definition at line 34 of file buffer2d.h.

◆ width()

template<typename T >
size_t cgv::data::buffer2d< T >::width ( ) const
inline

Definition at line 26 of file buffer2d.h.


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