MeshLib C++ Docs
Loading...
Searching...
No Matches
MRBinaryOperationsPlugin.h
Go to the documentation of this file.
1#pragma once
2#ifndef MESHLIB_NO_VOXELS
3#include "MRMesh/MRMeshFwd.h"
4#include "MRCommonPlugins/exports.h"
9
10namespace MR
11{
12
13class BinaryOperations : public StatePlugin, public SceneStateExactCheck<2, ObjectVoxels>,
15{
16public:
18
19 virtual void drawDialog(float menuScaling, ImGuiContext*) override;
20
21private:
22
23 virtual bool onEnable_() override;
24 virtual bool onDisable_() override;
25
26 enum class Operation : int
27 {
28 Union,
30 Difference,
31 Max,
32 Min,
33 Sum,
34 Mul,
35 Div,
36 Count
37 };
38 void doOperation_( Operation op, bool inPreview );
39
40 void onTransformChange();
41
42 std::shared_ptr<ObjectVoxels> obj1_;
43 std::shared_ptr<ObjectVoxels> obj2_;
44 boost::signals2::scoped_connection conn1_;
45 boost::signals2::scoped_connection conn2_;
46
47 std::vector<std::string> enabledOps_;
48 std::vector<std::string> enabledOpsTooltips_;
49
50 std::shared_ptr<ObjectVoxels> previewRes_;
51 bool previewMode_ = false;
52 Operation operation_ = Operation::Union;
53};
54
55}
56#endif
Definition MRBinaryOperationsPlugin.h:15
virtual void drawDialog(float menuScaling, ImGuiContext *) override
Definition MRStatePluginUpdate.h:29
Definition MRSceneStateCheck.h:106
Definition MRViewerFwd.h:60