Cogs.Core
RRSimplifyCommand.h
1#pragma once
2
3#include "Services/TaskManager.h"
4#include "Commands/EditorCommand.h"
5
6#include "RRTasks.h"
7
8namespace Cogs::Core {
9
11 {
13
14 void apply() override;
15 void undo() override;
16 void redo() override;
17 void beginModal() override;
18 void showGui() override;
19 bool continueModal() override;
20
21 MeshHandle applyMesh(MeshHandle mesh) override;
22
23 protected:
24 UnpackOptions opts;
25
26 std::atomic<bool> modal = false;
27
28 RRTaskState taskState;
29
30 float epsilon = 0.1f;
31 float reduction = 70.f;
32 float error = 5.f;
33 float edgeLengthWeight = 1.0f;
34
35 bool error_guided = true;
36
37 NormalGenArgs normalGenArgs;
38
39 std::vector<MeshHandle> originalMeshes;
40
41 TaskId task = NoTask;
42
43 };
44
45
46}
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
Abstract base class for all editor commands showing GUI in interactive mode.
Definition: EditorCommand.h:40
void apply() override
Run the command.
bool continueModal() override
Shall return true while the GUI should still be shown. False when.
void beginModal() override
Called when the command is initiated.
void showGui() override
Display custom ImGUI.
MeshHandle applyMesh(MeshHandle mesh) override
Workaround for having extendable mesh processing available without linking (e.g command -> RR).
Task id struct used to identify unique Task instances.
Definition: TaskManager.h:20