2template <
typename Type>
6 PL_ASSERT_DEV(pStream !=
nullptr,
"Stream pointer may not be null!");
7 PL_ASSERT_DEV(pStream->
GetElementSize() ==
sizeof(Type),
"Data size missmatch");
15template <
typename Type>
18 return *
static_cast<Type*
>(m_pCurrentPtr);
21template <
typename Type>
24 return m_pCurrentPtr >= m_pEndPtr;
27template <
typename Type>
33template <
typename Type>
static T * AddByteOffset(T *pPtr, std::ptrdiff_t offset)
Returns the address stored in ptr plus the given byte offset iOffset, cast to type T.
A single stream in a stream group holding contiguous data of a given type.
Definition ProcessingStream.h:8
T * GetWritableData() const
Returns a non-const pointer to the data casted to the type T, note that no type check is done!
Definition ProcessingStream.h:60
plUInt16 GetElementStride() const
Returns the stride between two elements of the stream in bytes.
Definition ProcessingStream.h:83
plUInt16 GetElementSize() const
Returns the size of one stream element in bytes.
Definition ProcessingStream.h:80
plProcessingStreamIterator(const plProcessingStream *pStream, plUInt64 uiNumElements, plUInt64 uiStartIndex)
Constructor.
Definition ProcessingStreamIterator_inl.h:3
void Advance()
Advances the current pointer to the next element in the stream.
Definition ProcessingStreamIterator_inl.h:28
bool HasReachedEnd() const
Returns true of the iterator has reached the end of the stream or the number of elements it should it...
Definition ProcessingStreamIterator_inl.h:22
Type & Current() const
Returns a reference to the current element. Note that the behavior is undefined if HasReachedEnd() is...
Definition ProcessingStreamIterator_inl.h:16