2023-07-04 19:47:54 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <JuceHeader.h>
|
|
|
|
#include "PluginProcessor.h"
|
|
|
|
#include "components/EffectComponent.h"
|
2023-07-22 12:44:13 +00:00
|
|
|
#include "components/SvgButton.h"
|
2023-07-04 19:47:54 +00:00
|
|
|
|
|
|
|
class OscirenderAudioProcessorEditor;
|
2023-09-01 18:52:36 +00:00
|
|
|
class ObjComponent : public juce::GroupComponent {
|
2023-07-04 19:47:54 +00:00
|
|
|
public:
|
|
|
|
ObjComponent(OscirenderAudioProcessor&, OscirenderAudioProcessorEditor&);
|
2023-07-05 13:14:27 +00:00
|
|
|
~ObjComponent();
|
2023-07-04 19:47:54 +00:00
|
|
|
|
|
|
|
void resized() override;
|
2023-07-05 13:14:27 +00:00
|
|
|
void mouseMove(const juce::MouseEvent& event) override;
|
2023-07-05 14:17:17 +00:00
|
|
|
void disableMouseRotation();
|
2023-07-04 19:47:54 +00:00
|
|
|
private:
|
|
|
|
OscirenderAudioProcessor& audioProcessor;
|
|
|
|
OscirenderAudioProcessorEditor& pluginEditor;
|
|
|
|
|
2023-07-21 10:08:55 +00:00
|
|
|
EffectComponent focalLength{audioProcessor, *audioProcessor.focalLength, false};
|
|
|
|
EffectComponent rotateX{audioProcessor, *audioProcessor.rotateX, false};
|
|
|
|
EffectComponent rotateY{audioProcessor, *audioProcessor.rotateY, false};
|
|
|
|
EffectComponent rotateZ{audioProcessor, *audioProcessor.rotateZ, false};
|
|
|
|
EffectComponent rotateSpeed{audioProcessor, *audioProcessor.rotateSpeed, false};
|
2023-07-04 19:47:54 +00:00
|
|
|
|
2023-07-05 13:14:27 +00:00
|
|
|
juce::TextButton resetRotation{"Reset Rotation"};
|
|
|
|
juce::ToggleButton mouseRotate{"Rotate with Mouse (Esc to disable)"};
|
|
|
|
|
2023-07-22 14:07:11 +00:00
|
|
|
std::shared_ptr<SvgButton> fixedRotateX = std::make_shared<SvgButton>("fixedRotateX", juce::String(BinaryData::fixed_rotate_svg), "white", "red", audioProcessor.fixedRotateX);
|
|
|
|
std::shared_ptr<SvgButton> fixedRotateY = std::make_shared<SvgButton>("fixedRotateY", juce::String(BinaryData::fixed_rotate_svg), "white", "red", audioProcessor.fixedRotateY);
|
|
|
|
std::shared_ptr<SvgButton> fixedRotateZ = std::make_shared<SvgButton>("fixedRotateZ", juce::String(BinaryData::fixed_rotate_svg), "white", "red", audioProcessor.fixedRotateZ);
|
2023-07-05 16:57:41 +00:00
|
|
|
|
2023-07-04 19:47:54 +00:00
|
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ObjComponent)
|
2023-09-01 18:52:36 +00:00
|
|
|
};
|