11#include "../core/IPickable.h"
91 void draw()
const override;
188 std::vector<std::unique_ptr<IHandle>> handles;
190 mutable IHandle* hoveredHandle =
nullptr;
191 IHandle* activeHandle =
nullptr;
194 Mesh* handleMesh =
nullptr;
197 bool isDragging =
false;
198 bool isHovered =
false;
GizmoType
Types of transformation gizmos.
Interface for interactive manipulation handles on gizmos.
Interactive 3D manipulation widget for transforming scene objects.
void handleClick(const Math::Ray &ray, float distance) override
Handles mouse click on a gizmo handle.
~Gizmo()
Destructor - frees object IDs and cleans up handles.
bool getHovered() const override
Gets the gizmo's hover state.
SceneObject * getTarget() const
Gets the object this gizmo is manipulating.
uint32_t getObjectID() const override
Gets the gizmo's unique identifier.
std::optional< float > intersectsRay(const Math::Ray &ray) const override
Tests if a ray intersects any of the gizmo's handles.
void handleDrag(const Math::Ray &ray)
Updates the active handle during a drag operation.
Mesh * getMesh() const override
Gets the shared mesh used for all handles.
void draw() const override
Renders all handles with custom depth-test-disabled rendering.
void handleRelease()
Handles mouse release - deactivates the active handle.
void setHovered(bool hovered) override
Sets the gizmo's hover state.
bool getIsDragging() const
Checks if a drag operation is in progress.
Shader * getShader() const override
Gets the shader used for gizmo rendering.
IHandle * getActiveHandle() const
Gets the currently active (being dragged) handle.
Interface for objects with specialized rendering requirements.
Abstract interface for gizmo manipulation handles.
Abstract interface for objects that can be selected and interacted with using the mouse.
GPU mesh representation with support for instanced rendering.
Represents a ray in 3D space.