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

Search Toolkit Book for CTriPerimeter

Simple helper class to take a bunch of triangles and extract from that set, if possible, a single perimeter. More...

#include <gui/opengl/tri_perimeter.hpp>

+ Collaboration diagram for CTriPerimeter:

Public Member Functions

size_t AddTri (CVect2< float > &v1p, CVect2< float > &v2p, CVect2< float > &v3p)
 
size_t AddVertex (CVect2< float > &v)
 
size_t AddEdge (size_t vert1, size_t vert2)
 
std::vector< CVect2< float > > GetPerimiter () const
 returns empty vec if no perimeter can be found. More...
 
void Clear ()
 

Protected Attributes

std::vector< CVect2< float > > m_Vertices
 
std::vector< CVect2< size_t > > m_Edges
 
std::vector< CVect3< size_t > > m_Triangles
 

Detailed Description

Simple helper class to take a bunch of triangles and extract from that set, if possible, a single perimeter.

If the triangle set happens to have no perimeters or multiple perimeters, nothing will be returned.

Definition at line 47 of file tri_perimeter.hpp.

Member Function Documentation

◆ AddEdge()

size_t CTriPerimeter::AddEdge ( size_t  vert1,
size_t  vert2 
)

Definition at line 76 of file tri_perimeter.cpp.

References m_Edges, and CVect2< T >::Set().

Referenced by AddTri().

◆ AddTri()

size_t CTriPerimeter::AddTri ( CVect2< float > &  v1p,
CVect2< float > &  v2p,
CVect2< float > &  v3p 
)

Definition at line 38 of file tri_perimeter.cpp.

References AddEdge(), AddVertex(), and m_Triangles.

Referenced by CPdf::x_PrintFlatTriBuffer(), and CSVGRenderer::x_PrintTriBuffer().

◆ AddVertex()

size_t CTriPerimeter::AddVertex ( CVect2< float > &  v)

Definition at line 55 of file tri_perimeter.cpp.

References i, and m_Vertices.

Referenced by AddTri().

◆ Clear()

void CTriPerimeter::Clear ( void  )
inline

Definition at line 56 of file tri_perimeter.hpp.

References m_Edges, m_Triangles, and m_Vertices.

Referenced by CPdf::x_PrintFlatTriBuffer(), and CSVGRenderer::x_PrintTriBuffer().

◆ GetPerimiter()

vector< CVect2< float > > CTriPerimeter::GetPerimiter ( ) const

returns empty vec if no perimeter can be found.

Definition at line 96 of file tri_perimeter.cpp.

References done, i, int, m_Edges, m_Triangles, and m_Vertices.

Referenced by CPdf::x_PrintFlatTriBuffer(), and CSVGRenderer::x_PrintTriBuffer().

Member Data Documentation

◆ m_Edges

std::vector<CVect2<size_t> > CTriPerimeter::m_Edges
protected

Definition at line 64 of file tri_perimeter.hpp.

Referenced by AddEdge(), Clear(), and GetPerimiter().

◆ m_Triangles

std::vector<CVect3<size_t> > CTriPerimeter::m_Triangles
protected

Definition at line 65 of file tri_perimeter.hpp.

Referenced by AddTri(), Clear(), and GetPerimiter().

◆ m_Vertices

std::vector<CVect2<float> > CTriPerimeter::m_Vertices
protected

Definition at line 63 of file tri_perimeter.hpp.

Referenced by AddVertex(), Clear(), and GetPerimiter().


The documentation for this class was generated from the following files:
Modified on Wed Sep 04 15:05:05 2024 by modify_doxy.py rev. 669887