25 #ifndef WDENDROGRAMGEODE_H
26 #define WDENDROGRAMGEODE_H
30 #include <osg/Geometry>
31 #include <osg/MatrixTransform>
32 #include <osg/PositionAttitudeTransform>
34 #include "../../common/WHierarchicalTreeFibers.h"
57 float ySize = 500.f,
float xOffset = 0.0f,
float yOffset = 0.0f );
86 void layoutLevel(
size_t cluster,
float left,
float right );
95 void layoutValue(
size_t cluster,
float left,
float right );
146 #endif // WDENDROGRAMGEODE_H
~WDendrogramGeode()
destructor
float m_yMult
helper variable for the recursive function
Class creates a dendrogram from a hierarchical clustering.
float m_xMult
helper variable for the recursive function
float m_ySize
y size in pixel of the final dendrogram
size_t m_clickedCluster
the clicked cluster
size_t getClickedCluster(int xClick, int yClick)
calculate which cluster was clicked from given pixel coordinates
void layoutLevel(size_t cluster, float left, float right)
recursive funtion that lays out the tree from top to bottom, height of the joins is determined by the...
void create()
helper function the starts the layout process from the input data in the constructor ...
osg::Vec3Array * m_vertexArray
vertex array
bool m_useLevel
flag indicating if the level or the value of a cluster will be used for the height of join ...
void getClickClusterRecursive2(size_t cluster, float left, float right)
recurse function that follows the layout to determine the cluster from pixel coordinates, used when the customData value is used for height
base class for hierarchical tree implementations
size_t m_rootCluster
top cluster to draw the tree from
osg::ref_ptr< osg::Vec4Array > m_colors
color array
float m_xSize
x size in pixel of the final dendrogram
int m_xClicked
stores the click position for use int he recursive function
void layoutValue(size_t cluster, float left, float right)
recursive funtion that lays out the tree from top to bottom, height of the joins is determined by the...
void getClickClusterRecursive(size_t cluster, float left, float right)
recurse function that follows the layout to determine the cluster from pixel coordinates, used when the level of the cluster is used for height
WDendrogramGeode(WHierarchicalTree *tree, size_t cluster, bool useLevel=true, size_t minClusterSize=1, float xSize=1000.f, float ySize=500.f, float xOffset=0.0f, float yOffset=0.0f)
constructor
osg::DrawElementsUInt * m_lineArray
line array
size_t m_minClusterSize
minimum cluster size to be considered while laying out the dendrogram
int m_yClicked
stores the click position for use int he recursive function
WHierarchicalTree * m_tree
the tree to work on