Commit 33520c34 authored by Stefan Philips's avatar Stefan Philips

[ADD] inDendrogramArea function to WDendrogramGeode

parent 0b4d99de
......@@ -359,3 +359,10 @@ void WDendrogramGeode::getClickClusterRecursive( size_t cluster, float left, flo
}
}
}
bool WDendrogramGeode::inDendrogramArea( const WVector2f& pos ) const
{
return ( pos[0] >= m_xOff && pos[0] <= m_xOff + m_xSize &&
pos[1] >= m_yOff && pos[1] <= m_yOff + m_ySize );
}
......@@ -69,6 +69,13 @@ public:
*/
size_t getClickedCluster( int xClick, int yClick );
/**
* calculates if the given position is within the view area of the dendrogram
* \param pos the position within the view
* \return true if pos is within the dendrogram area, otherwise false
*/
bool inDendrogramArea( const WVector2f& pos ) const;
protected:
private:
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment