Cogs.Core
SwathBottomSystem.h
1#pragma once
2#include <mutex>
3#include <vector>
4#include "ExtensionRegistry.h"
5#include "Systems/ComponentSystem.h"
6#include "Resources/Resources.h"
7
8#include "../Components/SwathBottomComponent.h"
9#include "../SwathPathResamplingPositions.h"
10#include "../SwathPathChunks.h"
11#include "../SwathPathMeshManager.h"
12
13namespace Cogs
14{
15 namespace Core
16 {
17 namespace EchoSounder
18 {
19
20 struct DataSetSystem;
21
23 {
24 uint32_t beamGroupGen = 0;
25 float pathSpacing = 0.f;
26 float beamSpacing = 0.f;
27 bool runMeshManager = false;
28
29 SwathPathResamplingPositions resamplingPositions;
30 SwathPathChunks chunks = SwathPathChunks(32, 1);
31 SwathPathMeshManager meshManager;
32 };
33
35 : public ComponentSystemWithDataPool<SwathBottomComponent, SwathBottomData>
36 {
37 public:
38 SwathBottomSystem(Memory::Allocator * allocator, SizeType capacity) : ComponentSystemWithDataPool(allocator, capacity) {}
39
40 void initialize(Context * context) override;
41
42 void update(Context* context) override;
43
44 void setDataSystem(DataSetSystem * dataSystem) { dataSetSystem = dataSystem; }
45
46 private:
47 DataSetSystem* dataSetSystem = nullptr;
48 };
49
50 }
51 }
52}
Context * context
Pointer to the Context instance the system lives in.
void update()
Updates the system state to that of the current frame.
Component system with parallel data per component stored in a pool similar to how the components them...
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition: Context.h:83
Base allocator implementation.
Definition: Allocator.h:30
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
ComponentIndex SizeType
Type used to track the size of pools.
Definition: Component.h:19
void initialize(Context *context) override
Initialize the system.