PointClickEngine::Scenes::HotspotManager
Inherits Reference < Object
Manages hotspots and their interactions within a scene
The HotspotManager handles all hotspot-related functionality including:
- Hotspot collection management
- Position-based hotspot detection
- Hotspot-object relationship management
- Interaction coordination
Constructors
Instance methods
Enables spatial optimization for better performance with many hotspots
Finds the topmost hotspot at a specific position
Searches through all hotspots to find the one with the highest z-order (drawn last) that contains the given point.
- position : The position to check
Returns: The topmost hotspot at the position, or nil if none found
Gets a hotspot by name
- name : Name of the hotspot to find
Returns: The hotspot with the given name, or nil if not found
Gets all hotspots at a specific position
Returns all hotspots that contain the given point, ordered by z-order.
- position : The position to check
Returns: Array of hotspots at the position
Finds hotspots within a rectangular area
- area : The rectangular area to search within
Returns: Array of hotspots that intersect with the area
Finds hotspots within a circular area
- center : Center point of the circle
- radius : Radius of the circle
Returns: Array of hotspots within the circular area
Checks if any hotspot exists at the given position
- position : The position to check
Returns: true if any hotspot contains the position
Imports hotspot data from external source
Removes a hotspot from the collection
- hotspot : The hotspot to remove
Removes a hotspot by name
- name : Name of the hotspot to remove
Grid size for spatial partitioning (when enabled)
Whether to use spatial optimization for large numbers of hotspots
Validates all hotspots for consistency
Checks for overlapping hotspots, invalid dimensions, etc.
Returns: Array of validation issues found