diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2024-01-17 10:01:51 -0500 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2024-01-17 10:01:51 -0500 |
| commit | 2e680ebd77236f7b62b9ded1b083c86f9e13b1c8 (patch) | |
| tree | fe41366a6f2825b609c5a32eb11e3a597befd5f3 /editor | |
| parent | 44664650a1b0660be769946cd132ef53573bbc32 (diff) | |
rename camera orientation to view
Diffstat (limited to 'editor')
| -rw-r--r-- | editor/editor.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/editor/editor.cpp b/editor/editor.cpp index 882b5f5..f22c3dd 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -52,7 +52,7 @@ PkeCamera cameraDbg { .rot = glm::quat(1.f, 0.f, 0.f, 0.f), .target = glm::vec3(0.f), .type = PKE_CAMERA_TYPE_PERSPECTIVE, - .orientation = PKE_CAMERA_ORIENTATION_FREE, + .view = PKE_CAMERA_VIEW_FREE, .stale = PKE_CAMERA_STALE_ALL, }; @@ -292,7 +292,7 @@ void PkeEditor_Tick(double delta) { selectedCamera = CameraHandle_MAX; if (ActiveCamera != &cameraDbg) { cameraDbg.pos = ActiveCamera->pos; - if (ActiveCamera->orientation == cameraDbg.orientation) { + if (ActiveCamera->view == cameraDbg.view) { cameraDbg.rot = ActiveCamera->rot; } else { cameraDbg.rot = glm::quat(UBO.view); @@ -692,7 +692,7 @@ void RecordImGuiCameras() { auto &cam = PkeCamera_Register(instPos); cam.target = ActiveCamera->target; cam.type = ActiveCamera->type; - cam.orientation = ActiveCamera->orientation; + cam.view = ActiveCamera->view; cam.isPrimary = false; } @@ -746,7 +746,7 @@ void RecordImGuiCameras() { ImGui::TableSetColumnIndex(5); ImGui::Text("%hhu", cam.type); ImGui::TableSetColumnIndex(6); - ImGui::Text("%hhu", cam.orientation); + ImGui::Text("%hhu", cam.view); ImGui::TableSetColumnIndex(7); ImGui::Text("%hhu", cam.stale); ImGui::TableSetColumnIndex(8); @@ -762,8 +762,8 @@ void RecordImGuiCameras() { int inputTextFlags = ImGuiInputTextFlags_ReadOnly; auto *cam = PkeCamera_Get(selectedCamera); if (cam) { - bool isOrientTarget{bool(static_cast<PkeCameraOrientation_T>(cam->orientation & PKE_CAMERA_ORIENTATION_TARGET))}; - bool isOrientFree{bool(static_cast<PkeCameraOrientation_T>(cam->orientation & PKE_CAMERA_ORIENTATION_FREE))}; + bool isOrientTarget{bool(static_cast<PkeCameraView_T>(cam->view & PKE_CAMERA_VIEW_TARGET))}; + bool isOrientFree{bool(static_cast<PkeCameraView_T>(cam->view & PKE_CAMERA_VIEW_FREE))}; if (ImGui::InputScalarN("Pos", ImGuiDataType_Float, &cam->pos, 3, nullptr, nullptr, nullptr)) cam->stale = cam->stale | PKE_CAMERA_STALE_POS; if (ImGui::InputScalarN("Rot", ImGuiDataType_Float, &cam->rot, 4, nullptr, nullptr, nullptr, isOrientFree ? 0 : inputTextFlags)) @@ -787,13 +787,13 @@ void RecordImGuiCameras() { ImGui::BeginDisabled(isOrientTarget); if (ImGui::Button("Target")) { - cam->orientation = PKE_CAMERA_ORIENTATION_TARGET; + cam->view = PKE_CAMERA_VIEW_TARGET; } ImGui::EndDisabled(); ImGui::SameLine(); ImGui::BeginDisabled(isOrientFree); if (ImGui::Button("Free")) { - cam->orientation = PKE_CAMERA_ORIENTATION_FREE; + cam->view = PKE_CAMERA_VIEW_FREE; } ImGui::EndDisabled(); @@ -1393,7 +1393,7 @@ void PkeEditor_Init() { NullCamera.rot = glm::quat(1.f, 0.f, 0.f, 0.f), NullCamera.target = glm::vec3(0.f), NullCamera.type = PKE_CAMERA_TYPE_PERSPECTIVE, - NullCamera.orientation = PKE_CAMERA_ORIENTATION_TARGET, + NullCamera.view = PKE_CAMERA_VIEW_TARGET, NullCamera.stale = PKE_CAMERA_STALE_ALL, threadPoolHandle = PkeThreads_Init(1, 1); |
