// Context Pick Manager - GPU accelerated hover effects // Smart glow colors based on element type #pragma once #include "fiko/core/mat/vec.hpp" #include "fiko/sahne/sahne.hpp" #include "fiko/cekirdek/cekirdek.hpp" namespace fiko::render { // Context data for GPU glow effect struct ContextData { Vec4f hoverPos; // Hover position (x, y, z, w=1.0) f32 glowIntensity; // Glow intensity (0.0-1.0) f32 pixelSize; // Pixel size in world units f32 time; // Frame time for animation }; // Event types for hover effects struct ContextHoverDegisti { u32 dugumKimlik; DugumTip tip; Vec3f renk; f32 gucluk; // Serialization for serialization std::string serialize() const { return std::to_string(dugumKimlik) + "," + std::to_string(static_cast(tip)) + "," + std::to_string(renk.x) + "," + std::to_string(renk.y) + "," + std::to_string(renk.z) + "," + std::to_string(gucluk); } }; // Manager for context-aware hover effects class ContextPickManager { public: ContextPickManager(Cekirdek& cekirdek, Sahne& sahne); // Set hover on element void setHover(Dugum* dugum, f32 intensity = 1.0f); // Update glow intensity (60Hz animation) void updateGlowIntensity(f32 intensity); // Get context data for GPU rendering const ContextData& getContextData() const { return contextData_; } // Get context-aware glow color Vec3f getGlowColor(DugumTip tip) const; // Detect element type from BREP topology static DugumTip getDugumTip(Dugum* dugum); private: Cekirdek& cekirdek_; Sahne& sahne_; ContextData contextData_; // Predefined glow colors by element type std::vector glowColors_; }; } // namespace fiko::render