2024-01-17 01:26:07 +00:00
|
|
|
#include "PerspectiveComponent.h"
|
2023-07-04 19:47:54 +00:00
|
|
|
#include "PluginEditor.h"
|
2023-07-05 11:02:28 +00:00
|
|
|
#include <numbers>
|
2023-07-04 19:47:54 +00:00
|
|
|
|
2024-01-17 01:26:07 +00:00
|
|
|
PerspectiveComponent::PerspectiveComponent(OscirenderAudioProcessor& p, OscirenderAudioProcessorEditor& editor) : audioProcessor(p), pluginEditor(editor) {
|
2024-01-07 19:48:02 +00:00
|
|
|
setText("3D Settings");
|
2023-07-04 19:47:54 +00:00
|
|
|
|
2024-01-07 19:48:02 +00:00
|
|
|
addAndMakeVisible(perspective);
|
2023-07-04 19:47:54 +00:00
|
|
|
addAndMakeVisible(focalLength);
|
2023-07-05 13:14:27 +00:00
|
|
|
|
2024-01-07 19:48:02 +00:00
|
|
|
perspective.setSliderOnValueChange();
|
|
|
|
focalLength.setSliderOnValueChange();
|
2023-07-05 13:14:27 +00:00
|
|
|
}
|
|
|
|
|
2024-02-12 20:34:00 +00:00
|
|
|
PerspectiveComponent::~PerspectiveComponent() {}
|
2023-07-04 19:47:54 +00:00
|
|
|
|
2024-01-17 01:26:07 +00:00
|
|
|
void PerspectiveComponent::resized() {
|
2023-07-28 20:10:21 +00:00
|
|
|
auto area = getLocalBounds().withTrimmedTop(20).reduced(20);
|
2023-07-05 13:14:27 +00:00
|
|
|
double rowHeight = 30;
|
2024-01-07 19:48:02 +00:00
|
|
|
perspective.setBounds(area.removeFromTop(rowHeight));
|
2023-07-05 13:14:27 +00:00
|
|
|
focalLength.setBounds(area.removeFromTop(rowHeight));
|
2023-07-04 19:47:54 +00:00
|
|
|
}
|