(edge_node !=
NULL&& narrow_edge_node !=
NULL) {
107narrow_edge_node->
GetState().
BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
115sel_narrow_edge_node->
GetState().
BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
118 if(filler_points_node !=
NULL)
121 if(sel_filler_points_node !=
NULL)
122sel_filler_points_node->
SetVisible(
false);
138 if(edge_count > 0) {
139vector<float> color_coords;
140color_coords.reserve(node_count);
142vector<CVect2<float> > edge_node_coords, sel_edge_node_coords;
143edge_node_coords.reserve(edge_count * 2);
144sel_edge_node_coords.reserve(edge_count * 2);
146vector<CVect4<unsigned char> > edge_node_colors, sel_edge_node_colors;
147edge_node_colors.reserve(edge_count * 2);
148sel_edge_node_colors.reserve(edge_count * 2);
149 x_DrawTreeVbo(edge_node_coords, edge_node_colors, sel_edge_node_coords, sel_edge_node_colors, color_coords, ds.
GetTree());
174 else if(node_count == 1) {
180vector<float> color_coords;
239(*node).SetAngle(0.);
248 floatnum_leaves = (float)(*node).GetNumLeavesEx();
254(num_leaves / num_parent_leaves);
270(*node).SetAngle(angle);
283(*node).X() +=
m_Radius* cos(angle);
284(*node).Y() +=
m_Radius* sin(angle);
307 else if(
delta== -1) {
364vector<float>& color_coords)
366,
m_SL(clad->GetScheme())
419vector<float>& color_coords,
423edge_node_coords, edge_node_colors,
424sel_edge_node_coords, sel_edge_node_colors,
433 return "Radial Tree";
CPhyloTree::TTreeIdx TTreeIdx
CCalcRadialTree(CPhyloRadial *clad, CPhyloTreeDataSource *ds)
stack< CBoundaryPoints > m_BoundaryPoints
vector< float > m_AngleWedge
for each node - angle info.
ETreeTraverseCode operator()(CPhyloTree &tree, TTreeIdx node_idx, int delta)
vector< CVect4< unsigned char > > & m_EdgeNodeColors
CPhyloTree::TSelState & m_NodeSingleSelection
const CPhyloTreeScheme & m_SL
CDrawRadialTreeVbo(CPhyloRadial *clad, const CPhyloTreeScheme *sl, vector< CVect2< float > > &edge_node_coords, vector< CVect4< unsigned char > > &edge_node_colors, vector< CVect2< float > > &sel_edge_node_coords, vector< CVect4< unsigned char > > &sel_edge_node_colors, vector< float > &color_coords)
vector< CVect4< unsigned char > > & m_SelEdgeNodeColors
vector< CVect2< float > > & m_EdgeNodeCoords
vector< CVect2< float > > & m_SelEdgeNodeCoords
ETreeTraverseCode operator()(CPhyloTree &tree, TTreeIdx node_idx, int delta)
vector< float > & m_ColorCoords
CPhyloTree::TTreeIdx TTreeIdx
CGlVboNode A rendering node that holds a vertex buffer object.
TBoundingState GetBoundedDisplay() const
int GetNumLeavesEx() const
float GetAngle(void) const
void x_Calculate(CPhyloTree *tree)
void x_DrawTreeVbo(vector< CVect2< float > > &edge_node_coords, vector< CVect4< unsigned char > > &edge_node_colors, vector< CVect2< float > > &sel_edge_node_coords, vector< CVect4< unsigned char > > &sel_edge_node_colors, vector< float > &color_coords, CPhyloTree *tree)
virtual void x_SetGlRenderOptions(CPhyloTreeDataSource &ds)
Set OpenGL rendering options that depend on layout chosen.
string GetDescription(void)
void x_RenderVbo(CPhyloTreeDataSource &ds)
void x_Layout(CPhyloTreeDataSource &ds)
unsigned int GetNumEdges(void)
unsigned int GetNumNodes(void)
double GetNormDistance(void)
CTreeGraphicsModel & GetModel()
Get model for rendering.
TModelRect GetBoundRect()
TNodeList_I SubNodeBeginEx()
Return the child nodes only if visible.
bool IsLeafEx() const
Return true if node is a leaf or is collapsed.
Tree subclass also has functions and data needed for rendering and selection.
vector< TSelStateValue > TSelState
TTreeIdx GetParent() const
Get node's parent.
TData & GetValue()
Return the value object for the node.
bool HasParent() const
Check if the node has a parent.
size_t GetSize() const
Get the number of nodes currently in the array.
TNodeType & GetRoot()
Return a reference to the root node of the tree.
TTreeIdx GetRootIdx() const
Return the index of the root node.
float m_TreePixels
Sum of size (height) of all leaf nodes in pixels, without considering labels (accomodates nodes that ...
bool GetDistRendering(void) const
CRef< CPhyloTreeScheme > m_SL
virtual void x_ComputeNodeBoundary(CPhyloTree *tree, CPhyloTree::TNodeType &node, CBoundaryPoints &boundary_pts, const string &layout_type)
void InitExtents()
Set extents to default values so CalculateExtents can be called.
void InitLabel(CPhyloTree *tree, CPhyloTree::TNodeType &node)
Initialize (for current layout) label text and extent (label rectangle)
const double GetDimX(void)
void x_RenderNodeVbo(CPhyloTreeNode *node, TTreeIdx node_idx, vector< float > &color_coords, const CVect2< float > delta=CVect2< float >(0.0f, 0.0f))
const double GetDimY(void)
CGlPane * m_pPane
event handling
void x_RenderLineVbo(TTreeIdx child_node_idx, CPhyloTreeNode *child_node, CPhyloTreeNode *parent_node, vector< CVect2< float > > &line_coords, vector< CVect4< unsigned char > > &line_colors, double x1, double y1, double x2, double y2)
float m_LabelPixels
Height of tree in pixels when labels are displayed.
ELayoutStatus m_ValidLayout
void CalculateExtents(CPhyloTree *tree, CPhyloTree::TNodeType &node)
CPhyloTreeDataSource * m_DS
void ComputeViewingLimits(CGlPane &pane, bool force_square=false, bool init_collision_info=true)
Compute the optimal viewing pane size so that the tree occupies the entire viewing area,...
void SetModelLimitsRect(const TModelRect &R)
void SetTexCoordBuffer1D(const vector< float > &data)
void SetVertexBuffer2D(const vector< CVect2< float > > &data)
void SetDefaultPosition()
Set 1 transformation and have it be the identity matrix.
virtual void Enable(GLenum glstate)
glEnable() all options in m_Enabled
void SetVisibleRect(const TModelRect &R)
void SetColorBufferUC(const vector< CVect4< unsigned char > > &data)
void SetVisible(bool b)
Set/get node visibility.
virtual void BlendFunc(GLenum sfactor, GLenum dfactor)
Options to be used when GL_BLEND is enabled.
CGlVboNode * FindGeomNode(const string &name)
Find a geometry (vertex buffer object) node by name.
TObjectType * GetNCPointer(void) const THROWS_NONE
Get pointer,.
int32_t Int4
4-byte (32-bit) signed integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
ETreeTraverseCode
Tree traverse code returned by the traverse predicate function.
@ eTreeTraverse
Keep traversal.
Int4 delta(size_t dimension_, const Int4 *score_)
void TreeDepthFirstEx(TTreeModel &tree_model, typename TTreeModel::TTreeIdx node_idx, Fun &func)
Depth-first tree traversal that skips collapsed nodes.
Fun TreeDepthFirst(TTreeModel &tree_model, typename TTreeModel::TTreeIdx node_idx, Fun func)
Depth-first tree traversal algorithm.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4