Abstract interface for objects that can be selected and interacted with using the mouse.
virtual uint32_t getObjectID() const =0
Gets the unique identifier for this object.
virtual std::optional< float > intersectsRay(const Math::Ray &ray) const =0
Tests if a ray intersects this object's geometry.
virtual void setHovered(bool hovered)=0
Sets the hover state of this object.
virtual void handleClick(const Math::Ray &ray, float distance)=0
Handles a mouse click on this object.
virtual ~IPickable()=default
Virtual destructor for proper cleanup of derived classes.
virtual bool getHovered() const =0
Gets the current hover state of this object.
Represents a ray in 3D space.