Plasma Engine  2.0
Loading...
Searching...
No Matches
VertexColorTask.h
1#pragma once
2
3#include <Foundation/CodeUtils/Expression/ExpressionVM.h>
4#include <Foundation/Threading/TaskSystem.h>
5#include <ProcGenPlugin/Declarations.h>
6
9
10namespace plProcGenInternal
11{
12 class VertexColorTask final : public plTask
13 {
14 public:
17
18 void Prepare(const plWorld& world, const plMeshBufferResourceDescriptor& desc, const plTransform& transform,
20 plArrayPtr<plUInt32> outputVertexColors);
21
22 private:
23 virtual void Execute() override;
24
27
28 struct InputVertex
29 {
30 PL_DECLARE_POD_TYPE();
31
32 plVec3 m_vPosition;
33 plVec3 m_vNormal;
34 plColor m_Color;
35 plUInt32 m_uiIndex;
36 };
37
38 plDynamicArray<InputVertex> m_InputVertices;
39
40 plDynamicArray<plColor> m_TempData;
41 plArrayPtr<plUInt32> m_OutputVertexColors;
42
43 plDeque<plVolumeCollection> m_VolumeCollections;
44 plExpression::GlobalData m_GlobalData;
45
46 plExpressionVM m_VM;
47 };
48} // namespace plProcGenInternal
This class encapsulates an array and it's size. It is recommended to use this class instead of plain ...
Definition ArrayPtr.h:37
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition Color.h:44
Definition Deque.h:270
Definition DynamicArray.h:81
Definition ExpressionVM.h:7
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Definition VertexColorTask.h:13
virtual void Execute() override
Override this to implement the task's supposed functionality.
Definition VertexColorTask.cpp:147
A Shared ptr manages a shared object and destroys that object when no one references it anymore....
Definition SharedPtr.h:10
Base class for custom tasks.
Definition Task.h:10
Definition VolumeCollection.h:11
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22
Definition MeshBufferResource.h:33