Cogs.Core
SwathIsoSystem.h
1#pragma once
2#include <vector>
3
4#include "ExtensionRegistry.h"
5#include "Systems/ComponentSystem.h"
6#include "../Components/SwathIsoComponent.h"
7#include "../SwathPathResamplingPositions.h"
8#include "../SwathPathChunks.h"
9#include "../SwathPathMeshManager.h"
10
11namespace Cogs
12{
13 namespace Core
14 {
15 namespace EchoSounder
16 {
17
18 struct DataSetSystem;
19
21 {
22 uint32_t beamGroupGen = 0;
23 float capSeparation = 0.f;
24 float pathSpacing = 0.f;
25 float beamSpacing = 0.f;
26 float depthSpacing = 0.f;
27 float seabedClipOffset = 0.f;
28 float overflowThreshold = std::numeric_limits<float>::quiet_NaN();
29 float minVerticalDepth = std::numeric_limits<float>::quiet_NaN();
30 float maxVerticalDepth = std::numeric_limits<float>::quiet_NaN();
31 bool runMeshManager = false;
32
33 bool flipOrientation = false;
34 bool innerLayerOpaque = true;
35 std::vector<float> thresholds;
36
37 std::vector<MaterialInstanceHandle> layerMaterialInstances;
38
39 SwathPathResamplingPositions resamplingPositions;
40 SwathPathChunks chunks = SwathPathChunks(32, 1);
41 SwathPathMeshManager meshManager;
42 };
43
45 : public ComponentSystemWithDataPool<SwathIsoComponent, SwathIsoSurfacesData>
46 {
47 public:
48 SwathIsoSystem(Memory::Allocator * allocator, SizeType capacity) : ComponentSystemWithDataPool(allocator, capacity) {}
49
50 void initialize(Context * context) override;
51
52 void update(Context* context) override;
53
54 void cleanup(Context* context) override;
55
56 void setDataSystem(DataSetSystem * dataSystem) { dataSetSystem = dataSystem; }
57
58 private:
59 DataSetSystem * dataSetSystem = nullptr;
60
61 MaterialHandle surfaceMaterial;
62 VariableKey rangeKey;
63 };
64
65 }
66 }
67}
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
uint16_t VariableKey
Used to lookup material properties.
Definition: Resources.h:46
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
ComponentIndex SizeType
Type used to track the size of pools.
Definition: Component.h:19
void cleanup(Context *context) override
Provided for custom cleanup logic in derived systems.
void initialize(Context *context) override
Initialize the system.