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{
14
15
16class BinaryOperations : public StatePlugin, public SceneStateExactCheck<2, ObjectVoxels>,
18{
19public:
21
22 virtual void drawDialog( ImGuiContext*) override;
23
24private:
25
26 virtual bool onEnable_() override;
27 virtual bool onDisable_() override;
28
29 enum class Operation : int
30 {
31 Union,
33 Difference,
34 Max,
35 Min,
36 Sum,
37 Mul,
38 Div,
39 Count
40 };
41 void doOperation_( Operation op, bool inPreview );
42
43 void onTransformChange();
44
45 std::shared_ptr<ObjectVoxels> obj1_;
46 std::shared_ptr<ObjectVoxels> obj2_;
47 boost::signals2::scoped_connection conn1_;
48 boost::signals2::scoped_connection conn2_;
49
50 std::vector<std::string> enabledOps_;
51 std::vector<std::string> enabledOpsTooltips_;
52
53 std::shared_ptr<ObjectVoxels> previewRes_;
54 bool previewMode_ = false;
55 Operation operation_ = Operation::Union;
56};
57
58}
59#endif
Definition MRBinaryOperationsPlugin.h:18
Definition MRStatePluginUpdate.h:32
check that given vector has exactly N objects if type ObjectT
Definition MRSceneStateCheck.h:91
virtual void drawDialog(ImGuiContext *) override
only for bindings generation
Definition MRCameraOrientationPlugin.h:8