4#include <Wt/WPushButton.h>
6#include <Wt/WColorPicker.h>
7#include <Wt/WDoubleSpinBox.h>
10#include <Wt/WCheckBox.h>
11#include <Wt/WHBoxLayout.h>
12#include <Wt/WVBoxLayout.h>
13#include <Wt/WGridLayout.h>
14#include <Wt/WBorderLayout.h>
15#include <Wt/WSlider.h>
24 this->setLayoutSizeAware(
true);
25 this->setOverflow(Wt::Overflow::Auto);
26 this->setHeight(Wt::WLength(
"100%"));
66T*
addTableRow(Wt::WTable* table, std::string label,
int labelWidth = 120,
int widgetWidth = 120)
68 int row = table->rowCount();
69 auto cell0 = table->elementAt(row, 0);
70 auto cell1 = table->elementAt(row, 1);
72 cell0->addNew<Wt::WText>(label);
73 cell0->setContentAlignment(Wt::AlignmentFlag::Middle);
74 cell0->setWidth(labelWidth);
76 cell1->setContentAlignment(Wt::AlignmentFlag::Middle);
77 cell1->setWidth(widgetWidth);
79 T* widget = cell1->addNew<
T>();
80 widget->setWidth(widgetWidth);
88 auto panel = this->addNew<Wt::WPanel>();
89 panel->setCollapsible(
true);
90 panel->setTitle(
"Ambient Light");
91 auto table = panel->setCentralWidget(std::make_unique<Wt::WTable>());
102 auto panel = this->addNew<Wt::WPanel>();
103 panel->setCollapsible(
true);
104 panel->setTitle(
"Main Directional Light");
105 auto table = panel->setCentralWidget(std::make_unique<Wt::WTable>());
106 table->setMargin(10);
126 auto panel = this->addNew<Wt::WPanel>();
127 panel->setCollapsible(
true);
128 panel->setTitle(
"Camera Settings");
129 auto table = panel->setCentralWidget(std::make_unique<Wt::WTable>());
130 table->setMargin(10);
149 table->elementAt(13, 0)->setColumnSpan(2);
150 table->elementAt(13, 0)->setContentAlignment(Wt::AlignmentFlag::Center);
151 auto updateBtn = table->elementAt(13, 0)->addNew<Wt::WPushButton>(
"Update from Canvas");
152 updateBtn->setMargin(10, Wt::Side::Top);
163 auto panel = this->addNew<Wt::WPanel>();
164 panel->setCollapsible(
true);
165 panel->setTitle(
"Render Settings");
166 auto table = panel->setCentralWidget(std::make_unique<Wt::WTable>());
167 table->setMargin(10);
183 return Wt::WColor(v.x * 255, v.y * 255, v.z * 255);
188 return { clr.red() / 255.f, clr.green() / 255.f, clr.blue() / 255.f };
193 float xz = glm::length(glm::vec2(v.x, v.z));
194 float theta = atan2(xz, v.y);
195 float phi = atan2(v.z, v.x);
196 return glm::vec3(theta, phi, glm::length(v));
202 float x = r * sinf(v.x) * cosf(v.y);
203 float y = r * cosf(v.x);
204 float z = r * sinf(v.x) * sinf(v.y);
205 return glm::vec3(x, y, z);
216 glm::vec3 dir = glm::normalize(
mRenderParams->light.mainLightDirection);
This is an implementation of AdditiveCCD based on peridyno.
DYN_FUNC Complex< Real > polar(const Real &__rho, const Real &__theta=Real(0))