11 #include "QhullFacet.h"
12 #include "QhullFacetList.h"
13 #include "QhullPoint.h"
14 #include "QhullRidge.h"
15 #include "QhullVertex.h"
21 #pragma warning( disable : 4611)
22 #pragma warning( disable : 4996)
30 QhullFacetList(
const Qhull &q, facetT *b, facetT *e )
31 : QhullLinkedList<QhullFacet>(QhullFacet(q, b), QhullFacet(q, e))
41 std::vector<QhullFacet> QhullFacetList::
44 QhullLinkedListIterator<QhullFacet> i(*
this);
45 std::vector<QhullFacet> vs;
47 QhullFacet f= i.next();
48 if(isSelectAll() || f.isGood()){
58 std::vector<QhullVertex> QhullFacetList::
59 vertices_toStdVector()
const
61 std::vector<QhullVertex> vs;
62 QhullVertexSet qvs(qh(), first().getFacetT(), 0, isSelectAll());
64 for(QhullVertexSet::iterator i=qvs.begin(); i!=qvs.end(); ++i){
74 contains(
const QhullFacet &facet)
const
79 for(QhullFacetList::const_iterator i=begin(); i != end(); ++i){
81 if(f==facet && f.isGood()){
95 for(QhullFacetList::const_iterator i=begin(); i != end(); ++i){
104 count(
const QhullFacet &facet)
const
110 for(QhullFacetList::const_iterator i=begin(); i != end(); ++i){
112 if(f==facet && f.isGood()){
125 using orgQhull::QhullFacet;
126 using orgQhull::QhullFacetList;
127 using orgQhull::QhullVertex;
128 using orgQhull::QhullVertexSet;
131 operator<<(ostream &os,
const QhullFacetList::PrintFacetList &pr)
133 os << pr.print_message;
134 QhullFacetList
fs= *pr.facet_list;
135 os <<
"Vertices for " <<
fs.count() <<
" facets" << endl;
136 os <<
fs.printVertices();
137 os <<
fs.printFacets();
143 operator<<(ostream &os,
const QhullFacetList::PrintFacets &pr)
145 for(QhullFacetList::const_iterator i= pr.facet_list->begin(); i != pr.facet_list->end(); ++i){
147 if(pr.facet_list->isSelectAll() || f.isGood()){
157 operator<<(ostream &os,
const QhullFacetList::PrintVertices &pr)
159 QhullVertexSet vs(pr.facet_list->qh(), pr.facet_list->first().getFacetT(), NULL, pr.facet_list->isSelectAll());
160 for(QhullVertexSet::iterator i=vs.begin(); i!=vs.end(); ++i){
170 os <<
fs.printFacets();
ostream & operator<<(ostream &os, const QhullFacetList::PrintFacetList &pr)
bool contains(const Container &container, const T &value)
Equivalent to container.end() != std::find(container.begin(), container.end(), value)
QhullRidge – Qhull's ridge structure, ridgeT, as a C++ class.