25 : m_GraphMinX(0.0f), m_GraphMaxX(1000.0f)
26 , m_GraphMinY(0.0f), m_GraphMaxY(1000.0f)
27 , m_ViewMinX(0.0f), m_ViewMaxX(800.0f)
28 , m_ViewMinY(0.0f), m_ViewMaxY(600.0f)
42 float n = (value -
minVal) / range;
43 if (
n < 0.0f)
n = 0.0f;
44 if (
n > 1.0f)
n = 1.0f;
69 const std::vector<std::pair<
int, std::pair<float, float>>>&
rawPositions)
ComponentTypeID GetComponentTypeID_Static()
Navigation mini-map panel for the VS graph editor (Phase 9).
Singleton mini-map providing normalised graph overview data.
const std::vector< MiniMapNodeEntry > & GetNodes() const
Returns the normalised node positions for rendering.
std::vector< MiniMapNodeEntry > m_Nodes
bool HandleClick(float clickNX, float clickNY, float &outScrollX, float &outScrollY) const
Converts a click on the mini-map into a graph-scroll target.
static MiniMapPanel & Get()
Returns the single shared instance.
void GetViewportRect(float &outX, float &outY, float &outW, float &outH) const
Returns the normalised viewport rectangle.
void SetGraphBounds(float minX, float maxX, float minY, float maxY)
Sets the full bounds of the graph in graph space.
void SetViewport(float minX, float maxX, float minY, float maxY)
Sets the currently visible viewport in graph space.
bool IsVisible() const
Returns true when the mini-map has valid data to display.
void UpdateNodePositions(const std::vector< std::pair< int, std::pair< float, float > > > &rawPositions)
Updates the normalised node positions from raw (id, x, y) triples.
float Normalise(float value, float minVal, float maxVal) const
< Provides AssetID and INVALID_ASSET_ID
A node represented in the mini-map (normalised coords).