ezEngine  Milestone 9
ezProcessingStream Class Reference

A single stream in a stream group holding contiguous data of a given type. More...

#include <ProcessingStream.h>

Public Types

enum  DataType {
  Half, Half2, Half3, Half4,
  Float, Float2, Float3, Float4,
  Matrix4x4, Short2, Short4, Int,
  Int2, Int3, Int4
}
 The data types which can be stored in the stream. When adding new data types the GetDataTypeSize() of ezProcessingStream needs to be updated.
 

Public Member Functions

 ~ezProcessingStream ()
 Destructor.
 
template<typename T >
const T * GetData () const
 Returns a const pointer to the data casted to the type T, note that no type check is done!
 
const void * GetData () const
 Returns a const pointer to the start of the data block.
 
template<typename T >
T * GetWritableData () const
 Returns a non-const pointer to the data casted to the type T, note that no type check is done!
 
void * GetWritableData () const
 Returns a non-const pointer to the start of the data block.
 
const ezHashedStringGetName () const
 Returns the name of the stream.
 
const ezUInt64 GetAlignment () const
 Returns the alignment which was used to allocate the stream.
 
DataType GetDataType () const
 Returns the data type of the stream.
 
const ezUInt64 GetElementSize () const
 Returns the size of one stream element.
 
const ezUInt64 GetElementStride () const
 Returns the stride between two elements of the stream.
 

Static Public Member Functions

static size_t GetDataTypeSize (DataType Type)
 

Protected Member Functions

 ezProcessingStream (const char *szName, DataType Type, ezUInt64 uiAlignment=64)
 
void SetSize (ezUInt64 uiNumElements)
 
void FreeData ()
 

Protected Attributes

void * m_pData
 
ezUInt64 m_uiAlignment
 
ezUInt64 m_uiNumElements
 
ezUInt64 m_uiTypeSize
 
DataType m_Type
 
ezHashedString m_Name
 

Friends

class ezProcessingStreamGroup
 

Detailed Description

A single stream in a stream group holding contiguous data of a given type.

Member Function Documentation

◆ SetSize()

void ezProcessingStream::SetSize ( ezUInt64  uiNumElements)
protected
Todo:
Allow to reuse memory from a pool ?

The documentation for this class was generated from the following files: