PeriDyno 1.0.0
Loading...
Searching...
No Matches
ImWindow.cpp
Go to the documentation of this file.
1#define IMGUI_DEFINE_MATH_OPERATORS
2#include "ImWindow.h"
3
4#include <cmath>
5#include <imgui.h>
6#include <imgui_impl_opengl3.h>
7
8#include <glm/gtx/string_cast.hpp>
9#include <glm/gtx/euler_angles.hpp>
10#include <glm/gtx/quaternion.hpp>
11
12#include "imgui_extend.h"
13#include "picture.h"
15//dyno
16#include "Action.h"
17#include "SceneGraphFactory.h"
18
19//ImWidgets
20#include "ImWidget.h"
21
22#include <RenderEngine.h>
23#include <RenderWindow.h>
24
25#include "OrbitCamera.h"
26#include "TrackballCamera.h"
27
28#include "imgui.h"
29
30#include "ImGuizmo.h"
31
33
34using namespace dyno;
35
36class WidgetQueue : public Action
37{
38
39private:
40 void process(Node* node) override
41 {
42 if (!node->isVisible())
43 return;
44
45 for (auto iter : node->graphicsPipeline()->activeModules())
46 {
47 auto m = dynamic_cast<ImWidget*>(iter.get());
48 if (m && m->isVisible())
49 {
50 //m->update();
51 modules.push_back(m);
52 }
53 }
54 }
55public:
56 std::vector<ImWidget*> modules;
57};
58
64
65void ShowMenuFile(RenderWindow* app, SceneGraph* scene, bool* mDisenableCamera)
66{
67
68}
69
70
72{
73 auto engine = app->getRenderEngine();
75 auto camera = app->getCamera();
76
77 auto& rparams = app->getRenderParams();
78 float menu_y = 0.f;
79 ImGuiIO& io = ImGui::GetIO();
80
81
82 // Initialize ImGuizmo frame
84 ImGuizmo::SetRect(0, 0, io.DisplaySize.x, io.DisplaySize.y);
85
86 // 2. Show a simple window that we create ourselves. We use a Begin/End pair to created a named window.
87 {
88 if (ImGui::BeginMainMenuBar())
89 {
90
91 if (ImGui::BeginMenu("Camera")) {
92 if (ImGui::BeginMenu("Use Camera.."))
93 {
94 if (ImGui::MenuItem("Orbit", "")) {
95 auto oc = std::make_shared<OrbitCamera>();
96 oc->setWidth(camera->viewportWidth());
97 oc->setHeight(camera->viewportHeight());
98 oc->setEyePos(Vec3f(1.5f, 1.0f, 1.5f));
99 app->setCamera(oc);
100 }
101 if (ImGui::MenuItem("Trackball", "")) {
102 auto tc = std::make_shared<TrackballCamera>();
103 tc->setWidth(camera->viewportWidth());
104 tc->setHeight(camera->viewportHeight());
105 tc->setEyePos(Vec3f(1.5f, 1.0f, 1.5f));
106 app->setCamera(tc);
107 }
108 ImGui::EndMenu();
109 }
110
111 ImGui::Separator();
112 if (ImGui::MenuItem("Perspective", "")) {
113 camera->setProjectionType(Camera::Perspective);
114
115 }
116 if (ImGui::MenuItem("Orthogonal", "")) {
117 camera->setProjectionType(Camera::Orthogonal);
118 }
119
120 ImGui::Separator();
121 Vec3f tarPos = camera->getTargetPos();
122 Vec3f eyePos = camera->getEyePos();
123 float distance = (tarPos - eyePos).norm();
124
125 if (ImGui::MenuItem("Top", "")) {
126 camera->setEyePos(Vec3f(tarPos.x, tarPos.y + distance, tarPos.z));
127 }
128
129 if (ImGui::MenuItem("Bottom", "")) {
130 camera->setEyePos(Vec3f(tarPos.x, tarPos.y - distance, tarPos.z));
131 }
132
133 ImGui::Separator();
134 if (ImGui::MenuItem("Left", "")) {
135 camera->setEyePos(Vec3f(tarPos.x - distance, tarPos.y, tarPos.z));
136 }
137
138 if (ImGui::MenuItem("Right", "")) {
139 camera->setEyePos(Vec3f(tarPos.x + distance, tarPos.y, tarPos.z));
140 }
141
142 ImGui::Separator();
143 if (ImGui::MenuItem("Front", "")) {
144 camera->setEyePos(Vec3f(tarPos.x, tarPos.y, tarPos.z + distance));
145 }
146
147 if (ImGui::MenuItem("Back", "")) {
148 camera->setEyePos(Vec3f(tarPos.x, tarPos.y, tarPos.z - distance));
149 }
150
151 ImGui::Separator();
152
153 float distanceUnit = camera->unitScale();
154 if (ImGui::SliderFloat("DistanceUnit", &distanceUnit, 0.01f, 100.0f))
155 camera->setUnitScale(distanceUnit);
156
157 ImGui::EndMenu();
158 }
159
160 if (ImGui::BeginMenu("Lighting", "")) {
161
162 float iBgGray[2] = { engine->bgColor0[0], engine->bgColor1[0] };
163 RenderParams::Light iLight = rparams.light;
164
165 ImGui::SliderFloat2("BG color", iBgGray, 0.0f, 1.0f, "%.2f", 0);
166 engine->bgColor0 = glm::vec3(iBgGray[0]);
167 engine->bgColor1 = glm::vec3(iBgGray[1]);
168
169 ImGui::Text("Ambient Light");
170
171 ImGui::beginTitle("Ambient Light Scale");
172 ImGui::SliderFloat("", &iLight.ambientScale, 0.0f, 1.0f, "%.2f", 0);
174 ImGui::SameLine();
175 ImGui::ColorEdit3("Ambient Light Color", (float*)&iLight.ambientColor, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_Float | ImGuiColorEditFlags_NoDragDrop | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_NoLabel);
176
177 ImGui::Text("Main Light");
178 ImGui::beginTitle("Main Light Scale");
179 ImGui::SliderFloat("", &iLight.mainLightScale, 0.0f, 5.0f, "%.2f", 0);
181 ImGui::SameLine();
182 ImGui::ColorEdit3("Main Light Color", (float*)&iLight.mainLightColor, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_Float | ImGuiColorEditFlags_NoDragDrop | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_NoLabel);
183
184 // Light Direction
185 ImGui::Text("Main Light Direction");
186 glm::vec3 tmpLightDir = iLight.mainLightDirection;
187 vec3 vL(-tmpLightDir[0], -tmpLightDir[1], -tmpLightDir[2]);
188
189 ImGui::beginTitle("Light dir");
190 ImGui::gizmo3D("", vL);
192
193 ImGui::SameLine();
194 ImGui::BeginGroup();
195 ImGui::PushItemWidth(120 * .5 - 2);
196 ImGui::beginTitle("Light dir editor x");
197 ImGui::SliderFloat("", (float*)(&vL[0]), -1.0f, 1.0f, "x:%.2f", 0); ImGui::endTitle();
198 ImGui::beginTitle("Light dir editor y");
199 ImGui::SliderFloat("", (float*)(&vL[1]), -1.0f, 1.0f, "y:%.2f", 0); ImGui::endTitle();
200 ImGui::beginTitle("Light dir editor z");
201 ImGui::SliderFloat("", (float*)(&vL[2]), -1.0f, 1.0f, "z:%.2f", 0); ImGui::endTitle();
202 ImGui::PopItemWidth();
203 ImGui::EndGroup();
204
205 tmpLightDir = glm::vec3(-vL[0], -vL[1], -vL[2]);
206 float len = length(tmpLightDir);
207
208 iLight.mainLightDirection = len < EPSILON ? tmpLightDir : tmpLightDir / len;
209
210 // Light Shadow
211 bool shadow = iLight.mainLightShadow != 0;
212 if (ImGui::Checkbox("Main Light Shadow", &shadow))
213 iLight.mainLightShadow = shadow ? 1.f : 0.f;
214
215 rparams.light = iLight;
216
217 ImGui::EndMenu();
218 }
219
220 if (ImGui::BeginMenu("Environment")) {
221 if (ImGui::RadioButton("Standard", &engine->envStyle, 0))
222 {
223 engine->setEnvStyle(EEnvStyle::Standard);
224 }
225
226 if (ImGui::RadioButton("Studio", &engine->envStyle, 1))
227 {
228 engine->setEnvStyle(EEnvStyle::Studio);
229 }
230
231 if (engine->envStyle == EEnvStyle::Studio)
232 {
233 ImGui::Separator();
234
235 ImGui::Checkbox("Draw Environment Map", &engine->bDrawEnvmap);
236 ImGui::DragFloat("Environment Scale", &engine->enmapScale, 0.01f, 0.0f, 1.0f);
237 }
238
239 ImGui::Separator();
240
241 if (scene)
242 {
243 ImGui::Checkbox("Show Bounding Box", &(engine->showSceneBounds));
244 ImGui::Spacing();
245
246 Vec3f lowerBound = scene->getLowerBound();
247 float lo[3] = { lowerBound[0], lowerBound[1], lowerBound[2] };
248 ImGui::SliderFloat3("Lower Bound", lo, -10.0f, 10.0f);
249 scene->setLowerBound(Vec3f(lo[0], lo[1], lo[2]));
250
251 Vec3f upperBound = scene->getUpperBound();
252 float up[3] = { upperBound[0], upperBound[1], upperBound[2] };
253 ImGui::SliderFloat3("Upper Bound", up, -10.0f, 10.0f);
254 scene->setUpperBound(Vec3f(up[0], up[1], up[2]));
255 }
256
257 ImGui::EndMenu();
258 }
259
260 if (ImGui::BeginMenu("Auxiliary", "")) {
261 ImGui::Checkbox("Lock Camera", &mDisenableCamera);
262 ImGui::Spacing();
263
264 ImGui::Checkbox("Show View Manipulator", &mViewManipulator);
265 ImGui::Spacing();
266
267 ImGui::Checkbox("Show Background", &(engine->showGround));
268 ImGui::Spacing();
269
270 ImGui::Separator();
271
272 if (scene) {
273 bool canPrintValidationInfo = scene->isValidationInfoPrintable();
274 if (ImGui::Checkbox("Print Validation Info", &canPrintValidationInfo))
275 scene->printValidationInfo(canPrintValidationInfo);
276
277 bool canPrintNodeInfo = scene->isNodeInfoPrintable();
278 if (ImGui::Checkbox("Print Node Info", &canPrintNodeInfo))
279 scene->printNodeInfo(canPrintNodeInfo);
280
281 bool canPrintSimulationInfo = scene->isSimulationInfoPrintable();
282 if (ImGui::Checkbox("Print Simulation Info", &canPrintSimulationInfo))
283 scene->printSimulationInfo(canPrintSimulationInfo);
284
285 bool canPrintRenderingInfo = scene->isRenderingInfoPrintable();
286 if (ImGui::Checkbox("Print Rendering Info", &canPrintRenderingInfo))
287 scene->printRenderingInfo(canPrintRenderingInfo);
288 }
289
290 ImGui::Separator();
291
292 ImGui::Checkbox("Screen Recording", &app->isScreenRecordingOn());
293 ImGui::SliderInt("Interval", &app->screenRecordingInterval(), 1, 100);
294
295 ImGui::EndMenu();
296 }
297 /*
298 if (ImGui::BeginMenu("Edit", "")) {
299
300 if (ImGui::RadioButton("Translate", mEditMode == 0))
301 mEditMode = 0;
302
303 if (ImGui::RadioButton("Scale", mEditMode == 1))
304 mEditMode = 1;
305
306 if (ImGui::RadioButton("Rotate", mEditMode == 2))
307 mEditMode = 2;
308
309 ImGui::EndMenu();
310 }
311 */
312 menu_y = ImGui::GetWindowSize().y;
313
314 ImGui::EndMainMenuBar();
315 }
316
317 // Right Sidebar
318 {
319 ImGui::SetNextWindowPos(ImVec2(io.DisplaySize.x - 50, 28));
320
321 ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(36 / 255.0, 36 / 255.0, 36 / 255.0, 255 / 255.0));
322 ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
323 ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(5.f, 5.f));
324 ImGui::Begin("Right Sidebar", NULL, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize);
325
327 mEditMode = 0;
329 mEditMode = 1;
331 mEditMode = 2;
332 ImGui::Separator(); // --------
333
335 {
336 if (scene) {
337 auto node = app->getCurrentSelectedNode();
338 auto box = node != nullptr ? node->boundingBox() : scene->boundingBox();
339
340 float len = std::max(box.maxLength(), 0.001f);
341 Vec3f center = 0.5f * (box.upper + box.lower);
342
343 Vec3f eyePos = camera->getEyePos();
344 Vec3f tarPos = camera->getTargetPos();
345 Vec3f dir = eyePos - tarPos;
346 dir.normalize();
347
348 float unit = len;
349
350 Vec3f target = center / unit;
351 Vec3f eye = target + 2.2f * dir;
352 camera->setEyePos(eye);
353 camera->setTargetPos(target);
354
355 camera->setUnitScale(unit);
356 }
357 }
358
359 ImGui::Separator(); // --------
360
365
366 //ImGui::SetWindowPos(ImVec2(io.DisplaySize.x - ImGui::GetWindowSize().x, menu_y));
367 ImGui::End();
368 ImGui::PopStyleColor();
369 ImGui::PopStyleVar(2);
370 }
371
372 // Bottom Right Widget
373 {
374 std::string rEngineName = engine->name();
375 Vec3f eyePos = camera->getEyePos();
376 Vec3f tarPos = camera->getTargetPos();
377
378 char text[512];
379 sprintf(text,
380 "Eye: (%.2f, %.2f, %.2f) | Target: (%.2f, %.2f, %.2f) | Rendered by %s: %.1f FPS",
381 eyePos.x, eyePos.y, eyePos.z,
382 tarPos.x, tarPos.y, tarPos.z,
383 rEngineName.c_str(), ImGui::GetIO().Framerate);
384
385 ImVec2 textSize = ImGui::CalcTextSize(text);
386 int padding = 8;// border padding
387 ImGui::SetNextWindowPos(ImVec2(io.DisplaySize.x - textSize.x - padding * 2, io.DisplaySize.y- textSize.y - padding *2));
388 ImGui::Begin("Top Left Widget", NULL, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize);
389 ImGui::Text(text);
390 ImGui::End();
391 }
392
393 //----------------------------------------------------------------------------------------------------------------
394 IM_ASSERT(ImGui::GetCurrentContext() != NULL && "Missing dear imgui context. Refer to examples app!");
395 /*
396 ImGui::Spacing();
397
398 if (ImGui::CollapsingHeader("Style"))
399 {
400 ImGuiIO& io = ImGui::GetIO();
401
402 if (ImGui::TreeNode("Style"))
403 {
404 ImGui::ShowStyle();
405 ImGui::TreePop();
406 ImGui::Separator();
407 }
408 }
409 */
410 }
411
412 // draw a rect for selection area
414
415 if (scene->getWorkMode() == SceneGraph::EDIT_MODE)
416 {
417 // current active node
418 drawNodeManipulator(app->getCurrentSelectedNode(), camera->getViewMat(), camera->getProjMat());
419 }
420
421 // view manipulator
423 drawViewManipulator(camera.get());
424
425 // Draw custom widgets
426 // gather visual modules
427 WidgetQueue imWidgetQueue;
428 // enqueue render content
429 if (scene && !scene->isEmpty())
430 {
431 scene->traverseForward(&imWidgetQueue);
432 }
433
434 for (auto widget : imWidgetQueue.modules)
435 {
436 widget->update();
437 widget->paint();
438 }
439}
440
442{
443 mCurX = event.x;
444 mCurY = event.y;
445}
446
448{
449 this->mEnableViewManipulate = flag;
450}
451
453{
454 // reset mouse status
455 mCurX = mRegX = -1;
456 mCurY = mRegY = -1;
460}
461
463{
464 mCurX = mRegX = event.x;
465 mCurY = mRegY = event.y;
466 mButtonAction = event.actionType;
467 mButtonType = event.buttonType;
468 mButtonMode = event.mods;
469}
470
472{
473 if (mButtonType == BT_LEFT &&
477 !ImGui::GetIO().WantCaptureMouse) {
478
479 ImVec2 pMin = { fminf(mRegX, mCurX), fminf(mRegY, mCurY) };
480 ImVec2 pMax = { fmaxf(mRegX, mCurX), fmaxf(mRegY, mCurY) };
481
482 // visible rectangle
483 if (pMin.x != pMax.x || pMin.y != pMax.y) {
484 // fill
485 ImGui::GetBackgroundDrawList()->AddRectFilled(pMin, pMax, ImColor{ 0.2f, 0.2f, 0.2f, 0.5f });
486 // border
487 ImGui::GetBackgroundDrawList()->AddRect(pMin, pMax, ImColor{ 0.8f, 0.8f, 0.8f, 0.8f }, 0, 0, 1.5f);
488 }
489 }
490}
491
492void dyno::ImWindow::drawNodeManipulator(std::shared_ptr<Node> n, glm::mat4 view, glm::mat4 proj)
493{
494 // TODO: type conversion...
495 auto node = std::dynamic_pointer_cast<ParametricModel<DataType3f>>(n);
496
497 if (!node) return;
498
499 // get original transform
500 dyno::Vec3f t0 = node->varLocation()->getData();
501 dyno::Vec3f r0 = node->varRotation()->getData();
502 dyno::Vec3f s0 = node->varScale()->getData();
503
504 auto op = ImGuizmo::TRANSLATE;
505 auto mode = ImGuizmo::WORLD;
506
507 switch (mEditMode) {
508 case 0:
510 break;
511 case 1:
512 op = ImGuizmo::SCALE;
513 mode = ImGuizmo::LOCAL;
514 break;
515 case 2:
516 op = ImGuizmo::ROTATE;
517 break;
518 default:
519 break;
520 }
521 if (node != 0) {
522 // build transform matrix
523 glm::mat4 m;
524 ImGuizmo::RecomposeMatrixFromComponents(t0.getDataPtr(), r0.getDataPtr(), s0.getDataPtr(), &m[0][0]);
525 if (ImGuizmo::Manipulate(&view[0][0], &proj[0][0], op, mode, &m[0][0], NULL, NULL, NULL, NULL))
526 {
527 dyno::Vec3f t1;
528 dyno::Vec3f r1;
529 dyno::Vec3f s1;
530
531 ImGuizmo::DecomposeMatrixToComponents(&m[0][0], t1.getDataPtr(), r1.getDataPtr(), s1.getDataPtr());
532
533 if (op == ImGuizmo::SCALE) {
534 // scale apply in local space
535 node->varScale()->setValue(s1);
536 }
537 if (op == ImGuizmo::TRANSLATE) {
538 node->varLocation()->setValue(t1);
539 }
540
541 if (op == ImGuizmo::ROTATE) {
542 node->varRotation()->setValue(r1);
543 }
544
545 node->updateGraphicsContext();
546 }
547 }
548}
549
551{
552 glm::mat4 view = camera->getViewMat();
553 glm::mat4 view0 = view;
554 float dist = (camera->getEyePos() - camera->getTargetPos()).norm() * camera->unitScale();
555
556 ImGuizmo::ViewManipulate(&view[0][0], dist,
557 ImVec2(0, camera->viewportHeight() - 100),
558 ImVec2(100, 100),
559 0);
560
561 // if nothing changes
562 if (view == view0 || !this->mEnableViewManipulate) return;
563
564 glm::mat4 invView = glm::inverse(view);
565 glm::vec4 eye = invView * glm::vec4(0, 0, 0, 1) / camera->unitScale();
566
567 // for trackball camera, also update up direction
568 TrackballCamera* cam = dynamic_cast<TrackballCamera*>(camera);
569 if (cam) {
570 glm::vec4 up = invView * glm::vec4(0, 1, 0, 0);
571 cam->mCameraUp = {up.x, up.y, up.z};
572
573 cam->setEyePos({ eye.x, eye.y, eye.z });
574 }
575 else
576 {
577 OrbitCamera* cam = dynamic_cast<OrbitCamera*>(camera);
578 // for orbit camera, simply set eye position...
579 cam->setEyePos({ eye.x, eye.y, eye.z });
580
581 // TODO: fix the problem when view along the rotation axis
582 }
583}
584
586{
587 return (ImGui::IsWindowFocused(ImGuiFocusedFlags_::ImGuiFocusedFlags_AnyWindow) || mDisenableCamera);
588}
#define ICON_FA_GLOBE
#define ICON_FA_EXPAND
#define ICON_FA_EXPAND_ALT
#define ICON_FA_DRAW_POLYGON
#define ICON_FA_ARROWS_ALT
#define ICON_FA_LOCATION_ARROW
void ShowMenuFile(RenderWindow *app, SceneGraph *scene, bool *mDisenableCamera)
Definition ImWindow.cpp:65
void process(Node *node) override
Definition ImWindow.cpp:40
std::vector< ImWidget * > modules
Definition ImWindow.cpp:56
float unitScale()
Definition Camera.h:57
@ Perspective
Definition Camera.h:22
virtual Vec3f getTargetPos() const =0
int viewportHeight() const
Definition Camera.h:42
virtual glm::mat4 getViewMat()=0
virtual Vec3f getEyePos() const =0
bool mEnableViewManipulate
Definition ImWindow.h:49
void mouseMoveEvent(const PMouseEvent &event)
Definition ImWindow.cpp:441
void setEnableViewManipulate(bool flag)
Definition ImWindow.cpp:447
void drawViewManipulator(Camera *camera)
Definition ImWindow.cpp:550
void draw(RenderWindow *app)
Definition ImWindow.cpp:71
void mouseReleaseEvent(const PMouseEvent &event)
Definition ImWindow.cpp:452
void drawNodeManipulator(std::shared_ptr< Node > node, glm::mat4 view, glm::mat4 proj)
Definition ImWindow.cpp:492
bool cameraLocked()
Definition ImWindow.cpp:585
void drawSelectedRegion()
Definition ImWindow.cpp:471
void mousePressEvent(const PMouseEvent &event)
Definition ImWindow.cpp:462
bool mDisenableCamera
Definition ImWindow.h:34
bool mViewManipulator
Definition ImWindow.h:35
PModifierBits mButtonMode
Definition ImWindow.h:46
PActionType mButtonAction
Definition ImWindow.h:45
void initialize(float scale)
Definition ImWindow.cpp:59
PButtonType mButtonType
Definition ImWindow.h:44
std::shared_ptr< GraphicsPipeline > graphicsPipeline()
Definition Node.cpp:320
virtual bool isVisible()
Check the visibility of context.
Definition Node.cpp:83
void setEyePos(const Vec3f &p) override
virtual void setCamera(std::shared_ptr< Camera > camera)
virtual std::shared_ptr< Camera > getCamera()
RenderParams & getRenderParams()
virtual std::shared_ptr< RenderEngine > getRenderEngine()
SelectionMode getSelectionMode()
int & screenRecordingInterval()
bool & isScreenRecordingOn()
virtual std::shared_ptr< Node > getCurrentSelectedNode()
void setSelectionMode(SelectionMode mode)
static SceneGraphFactory * instance()
std::shared_ptr< SceneGraph > active()
void setEyePos(const Vec3f &p) override
IMGUI_API bool clickButton(const char *label, const char *tooltip)
void initializeStyle(float scale)
IMGUI_API void initColorVal()
IMGUI_API void beginTitle(const char *label)
IMGUI_API void endTitle()
bool gizmo3D(const char *label, quat &q, float size, const int mode)
IMGUI_API bool radioWithIconButton(const char *label, const char *tooltip, bool v)
void SetRect(float x, float y, float width, float height)
Definition ImGuizmo.cpp:886
bool Manipulate(const float *view, const float *projection, OPERATION operation, MODE mode, float *matrix, float *deltaMatrix, const float *snap, const float *localBounds, const float *boundsSnap)
@ TRANSLATE
Definition ImGuizmo.h:179
bool IsUsing()
Definition ImGuizmo.cpp:936
void BeginFrame()
Definition ImGuizmo.cpp:912
void DecomposeMatrixToComponents(const float *matrix, float *translation, float *rotation, float *scale)
void RecomposeMatrixFromComponents(const float *translation, const float *rotation, const float *scale, float *matrix)
void ViewManipulate(float *view, float length, ImVec2 position, ImVec2 size, ImU32 backgroundColor)
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
@ MB_NO_MODIFIER
@ MB_SHIFT
@ Standard
int scene
Definition GltfFunc.h:20
@ AT_PRESS
Definition InputModule.h:36
@ AT_UNKOWN
Definition InputModule.h:34
constexpr Real EPSILON
Definition Typedef.inl:42
Vector< float, 3 > Vec3f
Definition Vector3D.h:93
@ BT_UNKOWN
Definition InputModule.h:26
@ BT_LEFT
Definition InputModule.h:27
vgm::Vec3 vec3
Definition vgMath.h:631