|
Toast Engine
|
Geometry + hit-test constants shared between DebugPass (renders the gizmos) and Workspace (hit-tests/drags them). More...
#include <cstdint>#include <glm/glm.hpp>#include <utility>

Go to the source code of this file.
Enumerations | |
| enum class | toast::GizmoTool : uint8_t { select , translate , rotate , scale , ruler , volume_faces } |
| Mirrors editor.WorkspaceViewModel.GizmoTool / proto SetGizmoTool - 0 Select, 1 Translate, 2 Rotate, 3 Scale, 4 Ruler. | |
| enum class | toast::GizmoHandle : int8_t { none = -1 , axis_x = 0 , axis_y = 1 , axis_z = 2 , plane_xy = 3 , plane_yz = 4 , plane_xz = 5 , center = 6 , size_neg_x = 7 , size_pos_x = 8 , size_neg_y = 9 , size_pos_y = 10 , size_neg_z = 11 , size_pos_z = 12 } |
| Which part of the active gizmo a ray/click is interacting with, axis_x/y/z and center are reused across Translate/Rotate/Scale (only one tool is ever active); plane_xy/yz/xz are Translate-only. | |
Functions | |
| constexpr auto | toast::gizmo_layout::isSizeHandle (GizmoHandle handle) noexcept -> bool |
| constexpr auto | toast::gizmo_layout::sizeHandleAxis (GizmoHandle handle) noexcept -> int |
| constexpr auto | toast::gizmo_layout::sizeHandleSign (GizmoHandle handle) noexcept -> float |
| auto | toast::gizmo_layout::ringBasis (const glm::vec3 &axis) -> std::pair< glm::vec3, glm::vec3 > |
| Deterministic in-plane basis (u,v) perpendicular to axis. | |
Geometry + hit-test constants shared between DebugPass (renders the gizmos) and Workspace (hit-tests/drags them).
All lengths are in gizmo-local unit space, the actual world-space size is this multiplied by the distance-based uniform scale computed each frame (k_screen_size * distance-to-camera), so the gizmo keeps a constant apparent size on screen regardless of distance