|
| data_view () |
| construct an empty data view without format and with empty data pointer*/
|
|
| ~data_view () |
| destruct view and delete data pointer if it is owned by the view
|
|
| data_view (const data_format *_format) |
|
| data_view (const data_format *_format, void *_data_ptr) |
|
| data_view (const data_format *_format, unsigned char *_data_ptr, bool manage_ptr) |
|
data_view & | operator= (const data_view &dv) |
|
void | set_ptr (unsigned char *ptr, bool manage_ptr) |
|
void | set_ptr (void *ptr) |
|
template<typename T > |
bool | set (int ci, const T &v) |
| write access to the i-th component, return whether write was successful
|
|
void | reflect_horizontally () |
| reflect 2D data view at horizontal axis More...
|
|
bool | empty () const |
| return whether the data pointer is a null pointer
|
|
cgv::type::func::transfer_const< unsigned char *, S * >::type | get_ptr () const |
| return a data pointer to type S
|
|
cgv::type::func::transfer_const< unsigned char *, S * >::type | get_ptr (int i) const |
| return a pointer to type S for i-th data entry
|
|
cgv::type::func::transfer_const< unsigned char *, S * >::type | get_ptr (int i, int j) const |
| return a pointer to type S for (i,j)-th data entry
|
|
cgv::type::func::transfer_const< unsigned char *, S * >::type | get_ptr (int i, int j, int k) const |
| return a pointer to type S for (i,j,k)-th data entry
|
|
cgv::type::func::transfer_const< unsigned char *, S * >::type | get_ptr (int i, int j, int k, int l) const |
| return a pointer to type S for (i,j,k,l)-th data entry
|
|
S | get (int ci) const |
| constant access to the ci-th component
|
|
S | get (int ci, int i) const |
| constant access to the ci-th component of i-th data entry
|
|
S | get (int ci, int i, int j) const |
| constant access to the ci-th component of (i,j)-th data entry
|
|
S | get (int ci, int i, int j, int k) const |
| constant access to the ci-th component of (i,j,k)-th data entry
|
|
S | get (int ci, int i, int j, int k, int l) const |
| constant access to the ci-th component of (i,j,k,l)-th data entry
|
|
data_view | operator() (unsigned int i) const |
| access to i-th data entry
|
|
data_view | operator() (unsigned int i, unsigned int j) const |
| access to entry at (i,j)
|
|
data_view | operator() (unsigned int i, unsigned int j, unsigned int k) const |
| access to entry at (i,j,k)
|
|
data_view | operator() (unsigned int i, unsigned int j, unsigned int k, unsigned int l) const |
| access to entry at (i,j,k,l)
|
|
data_view | permute (const std::string &permutation) const |
|
data_view | transpose () const |
| transpose is equivalent to permute("ji")
|
|
cgv::type::func::transfer_const< unsigned char *, S * >::type | step_i (S *ptr, int n=1) const |
| return a pointer that points to the n-th next location if index i is increase by n
|
|
cgv::type::func::transfer_const< unsigned char *, S * >::type | step_j (S *ptr, int n=1) const |
| return a pointer that points to the n-th next location if index j is increase by n
|
|
cgv::type::func::transfer_const< unsigned char *, S * >::type | step_k (S *ptr, int n=1) const |
| return a pointer that points to the n-th next location if index k is increase by n
|
|
cgv::type::func::transfer_const< unsigned char *, S * >::type | step_l (S *ptr, int n=1) const |
| return a pointer that points to the n-th next location if index l is increase by n
|
|
void | manage_format (bool enable=true) |
| whether to manage the data format pointer
|
|
const data_format * | get_format () const |
| return the component format
|
|
void | set_format (const data_format *_format) |
| set a new data format
|
|
unsigned int | get_dim () const |
| return the dimension of the data view, which is less or equal to the dimension of the data format
|
|
unsigned int | get_step_size (unsigned int dim) const |
| return the step size in bytes in the i-th dimension
|
|
the data view gives access to a data array of one, two, three or four dimensions. Each data entry can consist of several components as defined in the referenced component format. It allows to permute the dimensions, construct views of lower dimension with the ()-operators defined in the data_view_impl and to access the data components with the get- and set-method of data_view_impl. It keeps a flag that tells whether the data pointer belongs to the data view and therefore needs to be deleted on destruction.