NCBI C++ ToolKit
Public Member Functions | Protected Attributes | List of all members
CBoundaryPoints Class Reference

Search Toolkit Book for CBoundaryPoints

CBoundaryPoints –. More...

#include <gui/widgets/phylo_tree/phylo_tree_boundary_shapes.hpp>

Public Member Functions

 CBoundaryPoints ()
 
void AddBoundedPoint (const CVect2< float > &pt)
 Add point to be included in bounded area. More...
 
void AddPixelRect (const CVect2< float > &pt, const CGlRect< float > &rect)
 Add point in bounded area along with a rectangle based at that point and defined in pixels, that also will be included in the bounded area (allows non-resizing text to be included) More...
 
void AddBoundedPoints (CBoundaryPoints &pts)
 Add the boundary areas of the subtree to this boundary area. More...
 
void ClearBoundedPoints ()
 Clear all accumulated bounding points. More...
 
const vector< CVect2< float > > & GetGraphPoints () const
 
const vector< std::pair< CVect2< float >, CGlRect< float > > > & GetPixelPoints () const
 

Protected Attributes

vector< CVect2< float > > m_GraphPoints
 Points and text rectangles used to compute boundary area (and discarded afterwards) More...
 
vector< std::pair< CVect2< float >, CGlRect< float > > > m_PixelPoints
 

Detailed Description

CBoundaryPoints –.

Holds all points in a bounded region. Points may be fixed (such as text-box corners) or scaled such as node points. Fixed-scale points will be attached to scaled points (text box moves with node)

Improvement: If very large trees are bounded can reduce number of points by only considering convex hull for set (this becomes a bit more complex with the fixed scaling though)

Definition at line 409 of file phylo_tree_boundary_shapes.hpp.

Constructor & Destructor Documentation

◆ CBoundaryPoints()

CBoundaryPoints::CBoundaryPoints ( )
inline

Definition at line 411 of file phylo_tree_boundary_shapes.hpp.

Member Function Documentation

◆ AddBoundedPoint()

void CBoundaryPoints::AddBoundedPoint ( const CVect2< float > &  pt)

Add point to be included in bounded area.

Definition at line 1284 of file phylo_tree_boundary_shapes.cpp.

References m_GraphPoints.

Referenced by IPhyloTreeRender::x_ComputeNodeBoundary().

◆ AddBoundedPoints()

void CBoundaryPoints::AddBoundedPoints ( CBoundaryPoints pts)

Add the boundary areas of the subtree to this boundary area.

Definition at line 1295 of file phylo_tree_boundary_shapes.cpp.

References ClearBoundedPoints(), m_GraphPoints, and m_PixelPoints.

Referenced by CCalcSlantedTree::operator()().

◆ AddPixelRect()

void CBoundaryPoints::AddPixelRect ( const CVect2< float > &  pt,
const CGlRect< float > &  rect 
)

Add point in bounded area along with a rectangle based at that point and defined in pixels, that also will be included in the bounded area (allows non-resizing text to be included)

Definition at line 1289 of file phylo_tree_boundary_shapes.cpp.

References m_PixelPoints, and offset.

Referenced by IPhyloTreeRender::x_ComputeNodeBoundary().

◆ ClearBoundedPoints()

void CBoundaryPoints::ClearBoundedPoints ( )

Clear all accumulated bounding points.

Definition at line 1308 of file phylo_tree_boundary_shapes.cpp.

References m_GraphPoints, and m_PixelPoints.

Referenced by AddBoundedPoints().

◆ GetGraphPoints()

const vector<CVect2<float> >& CBoundaryPoints::GetGraphPoints ( ) const
inline

Definition at line 426 of file phylo_tree_boundary_shapes.hpp.

References m_GraphPoints.

Referenced by CSubtreeBoundary::ComputeShapes().

◆ GetPixelPoints()

const vector<std::pair<CVect2<float>, CGlRect<float> > >& CBoundaryPoints::GetPixelPoints ( ) const
inline

Definition at line 427 of file phylo_tree_boundary_shapes.hpp.

References m_PixelPoints.

Referenced by CSubtreeBoundary::ComputeShapes().

Member Data Documentation

◆ m_GraphPoints

vector<CVect2<float> > CBoundaryPoints::m_GraphPoints
protected

Points and text rectangles used to compute boundary area (and discarded afterwards)

Definition at line 432 of file phylo_tree_boundary_shapes.hpp.

Referenced by AddBoundedPoint(), AddBoundedPoints(), ClearBoundedPoints(), and GetGraphPoints().

◆ m_PixelPoints

vector<std::pair<CVect2<float>, CGlRect<float> > > CBoundaryPoints::m_PixelPoints
protected

The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:47 2024 by modify_doxy.py rev. 669887