![]() |
Public API Reference |
![]() |
Helper class to make it easier to iterate over elements from renderbuffers, with automatic conversion to Tbase. More...
#include <csgfx/vertexlistwalker.h>
Public Member Functions | |
csVertexListWalker (iRenderBuffer *buffer, size_t desiredComponents=0, const Tbase *defaultComponents=0) | |
Construct new walker. | |
size_t | GetSize () const |
Get number of elements in the iterated buffer. | |
void | ResetState () |
Start from the beginning. | |
void | SetElement (size_t newElement) |
Set position to a specific element. | |
operator Tcomplex const & () const | |
Get current element. | |
const Tcomplex & | operator* () const |
Get current element. | |
csVertexListWalker & | operator++ () |
Set current element to the next. |
Helper class to make it easier to iterate over elements from renderbuffers, with automatic conversion to Tbase.
Elements can also be queried as Tcomplex, which must consist of multiple Tbase and support left- and right-value operator[].
Definition at line 43 of file vertexlistwalker.h.
csVertexListWalker< Tbase, Tcomplex >::csVertexListWalker | ( | iRenderBuffer * | buffer, |
size_t | desiredComponents = 0 , |
||
const Tbase * | defaultComponents = 0 |
||
) | [inline] |
Construct new walker.
buffer | The render buffer to walk over. |
desiredComponents | Number of components to fetch from the buffer. Those can differ from the real number; the components are filled up with default values, if necessary. If 0, the component count as set in the buffer will be returned. |
defaultComponents | The default values for components, if more are requested than available. If 0, the values {0,0,0,1} are used. |
Definition at line 56 of file vertexlistwalker.h.
size_t csVertexListWalker< Tbase, Tcomplex >::GetSize | ( | ) | const [inline] |
Get number of elements in the iterated buffer.
Definition at line 108 of file vertexlistwalker.h.
csVertexListWalker< Tbase, Tcomplex >::operator Tcomplex const & | ( | ) | const [inline] |
Get current element.
Definition at line 78 of file vertexlistwalker.h.
const Tcomplex& csVertexListWalker< Tbase, Tcomplex >::operator* | ( | ) | const [inline] |
Get current element.
Definition at line 83 of file vertexlistwalker.h.
csVertexListWalker& csVertexListWalker< Tbase, Tcomplex >::operator++ | ( | ) | [inline] |
Set current element to the next.
Definition at line 92 of file vertexlistwalker.h.
void csVertexListWalker< Tbase, Tcomplex >::ResetState | ( | ) | [inline] |
Start from the beginning.
Definition at line 101 of file vertexlistwalker.h.
void csVertexListWalker< Tbase, Tcomplex >::SetElement | ( | size_t | newElement | ) | [inline] |
Set position to a specific element.
Definition at line 111 of file vertexlistwalker.h.