RslIter< T > Class Template Reference
#include <RslPlugin.h>
Public Member Functions | |
RslIter (const RslArg *arg) | |
Construct an iterator from an argument. | |
RslIter (const T *data, const RslContext *ctx) | |
T & | operator* () |
const T & | operator* () const |
RslIter< T > & | operator++ () |
RslIter< T > | operator++ (int) |
void | Reset () |
Reset the iterator to point at the first active point. | |
bool | IsVarying () const |
template<> | |
RslIter< RtMatrix > & | operator++ () |
Detailed Description
template<typename T>
class RslIter< T >
An iterator is used to access grid data. Incrementing an iterator skips over inactive grid points. An iterator is constructed from an RslArg and used as follows:
Run-time type assertions are recommended to guard against inadvert type errors:
This should be unnecessary because the shader compiler guarantees that the argument values match the parameter types specified in the plugin function prototype (in the RslFunctionTable). However, type assertions guard against inadvertent prototype errors, and they help catch errors in overloaded functions that can otherwise be difficult to diagnose.
Constructor & Destructor Documentation
|
inline |
Construct a uniform iterator for user-provided data. This is useful for optional arguments with default values.
Member Function Documentation
|
inline |
Returns true if the iterator is varying. Note that uniform iterators need not be incremented (although it does no harm).
|
inline |
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".
|
inline |
Get a const reference to the data pointed to by this iterator. This method is automatically selected by the compiler when appropriate.
Increment this iterator to point to the data for the next active point. An internal acceleration structure makes this a constant-time operation.
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.
The documentation for this class was generated from the following file: