3#include <Wt/WBorderLayout.h>
4#include <Wt/WCheckBox.h>
5#include <Wt/WColorPicker.h>
6#include <Wt/WDoubleSpinBox.h>
8#include <Wt/WPushButton.h>
19 this->setLayoutSizeAware(
true);
20 this->setOverflow(Wt::Overflow::Auto);
21 this->setHeight(Wt::WLength(
"100%"));
61T*
addTableRow(Wt::WTable* table, std::string label,
int labelWidth = 120,
int widgetWidth = 120)
63 int row = table->rowCount();
64 auto cell0 = table->elementAt(row, 0);
65 auto cell1 = table->elementAt(row, 1);
67 cell0->addNew<Wt::WText>(label);
68 cell0->setContentAlignment(Wt::AlignmentFlag::Middle);
69 cell0->setWidth(labelWidth);
71 cell1->setContentAlignment(Wt::AlignmentFlag::Middle);
72 cell1->setWidth(widgetWidth);
74 T* widget = cell1->addNew<
T>();
75 widget->setWidth(widgetWidth);
83 auto panel = this->addNew<Wt::WPanel>();
84 panel->setCollapsible(
true);
85 panel->setTitle(
"Ambient Light");
86 auto table = panel->setCentralWidget(std::make_unique<Wt::WTable>());
97 auto panel = this->addNew<Wt::WPanel>();
98 panel->setCollapsible(
true);
99 panel->setTitle(
"Main Directional Light");
100 auto table = panel->setCentralWidget(std::make_unique<Wt::WTable>());
101 table->setMargin(10);
121 auto panel = this->addNew<Wt::WPanel>();
122 panel->setCollapsible(
true);
123 panel->setTitle(
"Camera Settings");
124 auto table = panel->setCentralWidget(std::make_unique<Wt::WTable>());
125 table->setMargin(10);
144 table->elementAt(13, 0)->setColumnSpan(2);
145 table->elementAt(13, 0)->setContentAlignment(Wt::AlignmentFlag::Center);
146 auto updateBtn = table->elementAt(13, 0)->addNew<Wt::WPushButton>(
"Update from Canvas");
147 updateBtn->setMargin(10, Wt::Side::Top);
158 auto panel = this->addNew<Wt::WPanel>();
159 panel->setCollapsible(
true);
160 panel->setTitle(
"Render Settings");
161 auto table = panel->setCentralWidget(std::make_unique<Wt::WTable>());
162 table->setMargin(10);
178 return Wt::WColor(v.x * 255, v.y * 255, v.z * 255);
183 return { clr.red() / 255.f, clr.green() / 255.f, clr.blue() / 255.f };
188 float xz = glm::length(glm::vec2(v.x, v.z));
189 float theta = atan2(xz, v.y);
190 float phi = atan2(v.z, v.x);
191 return glm::vec3(theta, phi, glm::length(v));
197 float x = r * sinf(v.x) * cosf(v.y);
198 float y = r * cosf(v.x);
199 float z = r * sinf(v.x) * sinf(v.y);
200 return glm::vec3(x, y, z);
211 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))