11 #include "QhullSets.h"
12 #include "QhullVertex.h"
13 #include "QhullRidge.h"
17 #pragma warning( disable : 4611)
18 #pragma warning( disable : 4996)
25 s_empty_ridge= {0,0,0,0,0,
30 QhullRidge::QhullRidge(
const Qhull &q)
31 : qh_ridge(&s_empty_ridge)
36 QhullRidge::QhullRidge(
const Qhull &q, ridgeT *r)
37 : qh_ridge(r ? r : &s_empty_ridge)
48 hasNextRidge3d(
const QhullFacet &f)
const
55 ridgeT *ridge= qh_nextridge3d(getRidgeT(), f.getFacetT(), &v);
61 QhullRidge QhullRidge::
62 nextRidge3d(
const QhullFacet &f, QhullVertex *nextVertex)
const
68 ridge= qh_nextridge3d(getRidgeT(), f.getFacetT(), &v);
70 throw QhullError(10030,
"Qhull error nextRidge3d: missing next ridge for facet %d ridge %d. Does facet contain ridge?", f.id(),
id());
74 *nextVertex= QhullVertex(qh_qh, v);
76 return QhullRidge(qh_qh, ridge);
85 using orgQhull::QhullRidge;
86 using orgQhull::QhullVertex;
97 operator<<(ostream &os,
const QhullRidge::PrintRidge &pr)
99 if(*pr.print_message){
100 os << pr.print_message <<
" ";
104 QhullRidge r= *pr.ridge;
106 if(r.getRidgeT()->tested){
109 if(r.getRidgeT()->nonconvex){
113 os << r.vertices().print(
" vertices:");
114 if(r.getRidgeT()->top && r.getRidgeT()->bottom){
115 os <<
" between f" << r.topFacet().id() <<
" and f" << r.bottomFacet().id() << endl;
116 }
else if(r.getRidgeT()->top){
117 os <<
" top f" << r.topFacet().id() << endl;
118 }
else if(r.getRidgeT()->bottom){
119 os <<
" bottom f" << r.bottomFacet().id() << endl;
ostream & operator<<(ostream &os, const QhullRidge &r)
QhullRidge – Qhull's ridge structure, ridgeT, as a C++ class.