#include <RslPlugin.h>
Public Member Functions | |
RslIter (const RslArg *arg) | |
Construct an iterator from an argument. | |
RslIter (const T *data, const RslContext *ctx) | |
Construct a uniform iterator for user-provided data. | |
T & | operator * () |
Dereference this iterator, yielding a non-const reference. | |
const T & | operator * () const |
Get a const reference to the data pointed to by this iterator. | |
RslIter< T > & | operator++ () |
Increment this iterator to point to the data for the next active point. | |
RslIter< T > | operator++ (int) |
Post-increment this iterator. | |
bool | IsVarying () const |
Returns true if the iterator is varying. |
Incrementing an iterator skips over inactive grid points. An iterator is constructed from an RslArg and used as follows:
RslFloatIter a(argv[0]); RslFloatIter b(argv[1]); RslFloatIter c(argv[2]); int n = argv[0]->NumValues(); for (int i = 0; i < n; ++i) { *a = *b + *c; ++a; ++b; ++c; }
|
Construct an iterator from an argument.
|
|
Construct a uniform iterator for user-provided data. This is useful for optional arguments with default values. |
|
Returns true if the iterator is varying. Note that uniform iterators need not be incremented (although it does no harm). |
|
Get a const reference to the data pointed to by this iterator. This method is automatically selected by the compiler when appropriate. |
|
Dereference this iterator, yielding a non-const reference. This method is automatically selected when a dereferenced iterator is the target of an assignment, such as "*a = 0". |
|
Post-increment this iterator. Returns a copy of the iterator prior to incrementing, so it's not terribly efficient. The dummy integer argument is the standard C++ way of distinguishing between pre- and post-increment operators. |
|
Increment this iterator to point to the data for the next active point. An internal acceleration structure makes this a constant-time operation. |