NCBI C++ ToolKit
|
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>
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 |
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.
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().
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().
size_t CTriPerimeter::AddVertex | ( | CVect2< float > & | v | ) |
Definition at line 55 of file tri_perimeter.cpp.
References i, and m_Vertices.
Referenced by AddTri().
|
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().
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().
|
protected |
Definition at line 64 of file tri_perimeter.hpp.
Referenced by AddEdge(), Clear(), and GetPerimiter().
|
protected |
Definition at line 65 of file tri_perimeter.hpp.
Referenced by AddTri(), Clear(), and GetPerimiter().
|
protected |
Definition at line 63 of file tri_perimeter.hpp.
Referenced by AddVertex(), Clear(), and GetPerimiter().