Plasma Engine  2.0
Loading...
Searching...
No Matches
ZeroInitializer.h
1
2#pragma once
3
4#include <Foundation/Basics.h>
5#include <Foundation/DataProcessing/Stream/ProcessingStreamProcessor.h>
6#include <Foundation/Reflection/Reflection.h>
7#include <Foundation/Strings/HashedString.h>
8
10
13{
15
16public:
18
20 void SetStreamName(plStringView sStreamName);
21
22protected:
23 virtual plResult UpdateStreamBindings() override;
24
25 virtual void InitializeElements(plUInt64 uiStartIndex, plUInt64 uiNumElements) override;
26 virtual void Process(plUInt64 uiNumElements) override {}
27
28 plHashedString m_sStreamName;
29
30 plProcessingStream* m_pStream = nullptr;
31};
This class is optimized to take nearly no memory (sizeof(void*)) and to allow very fast checks whethe...
Definition HashedString.h:25
A single stream in a stream group holding contiguous data of a given type.
Definition ProcessingStream.h:8
Base class for all stream processor implementations.
Definition ProcessingStreamProcessor.h:11
virtual void InitializeElements(plUInt64 uiStartIndex, plUInt64 uiNumElements)=0
This method needs to be implemented in order to initialize new elements to specific values.
virtual plResult UpdateStreamBindings()=0
Internal method which needs to be implemented, gets the concrete stream bindings. This is called ever...
This element spawner initializes new elements with 0 (by writing 0 bytes into the whole element)
Definition ZeroInitializer.h:13
virtual void Process(plUInt64 uiNumElements) override
The actual method which processes the data, will be called with the number of elements to process.
Definition ZeroInitializer.h:26
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54