73 float opacity()
const {
return _opacity; }
78 const std::vector<AnnotationScreenInfo>&
screenInfos()
const {
return _screenInfos; }
87 void update(
float dt)
override;
96 void registerAnnotation(
Annotation* annotation);
97 void unregisterAnnotation(
Annotation* annotation);
100 void findCameraEntity();
104 bool worldToScreen(
const Vector3& worldPos,
float& screenX,
float& screenY)
const;
107 float _hotspotSize = 25.0f;
108 Color _hotspotColor =
Color(0.22f, 0.74f, 0.97f, 1.0f);
109 Color _activeColor =
Color(0.40f, 0.91f, 0.98f, 1.0f);
110 Color _hoverColor =
Color(1.0f, 0.4f, 0.0f, 1.0f);
111 float _opacity = 1.0f;
113 Entity* _camera =
nullptr;
116 std::vector<Annotation*> _annotations;
119 std::vector<AnnotationScreenInfo> _screenInfos;
Annotation * activeAnnotation() const
The currently selected (clicked) annotation, or nullptr.
const std::vector< AnnotationScreenInfo > & screenInfos() const
void setHotspotSize(float value)
void handleClick(float screenX, float screenY)
Handle mouse click at screen coordinates — selects/deselects the nearest annotation.
void update(float dt) override
void updateHover(float mouseX, float mouseY)
Update hover state based on mouse position (call each frame with current mouse pos).
float hotspotSize() const
void setHotspotColor(const Color &value)
const Color & hotspotColor() const
void setActiveColor(const Color &value)
const Color & activeColor() const
void initialize() override
void setHoverColor(const Color &value)
const Color & hoverColor() const
void setOpacity(float value)
Annotation * hoveredAnnotation() const
The currently hovered annotation (nearest to mouse within hotspot radius), or nullptr.
ECS entity — a GraphNode that hosts components defining its behavior.
#define SCRIPT_NAME(Name)
#define REGISTER_SCRIPT(Type, Name)
RGBA color with floating-point components in [0, 1].
3D vector for positions, directions, and normals with multi-backend SIMD acceleration.