void QhullLinkedList_test:: t_element() { RboxPoints rcube("c"); Qhull q(rcube,"QR0"); // rotated unit cube QhullVertexList vs = q.vertexList(); QhullVertex v= vs.first(); QCOMPARE(v.previous(), QhullVertex(NULL)); QCOMPARE(vs.front(), vs.first()); QhullVertex v2= vs.last(); QCOMPARE(v2.next().next(), QhullVertex(NULL)); // sentinel has NULL next QCOMPARE(vs.back(), vs.last()); }//t_element
//! Return next ridge and optional vertex for a 3d facet and ridge //! Does not use qh_qh or qh_errexit() QhullRidge QhullRidge:: nextRidge3d(const QhullFacet f, QhullVertex *nextVertex) const { vertexT *v= 0; ridgeT *ridge= qh_nextridge3d(getRidgeT(), f.getFacetT(), &v); if(!ridge){ throw QhullError(10030, "Qhull error nextRidge3d: missing next ridge for facet %d ridge %d. Does facet contain ridge?", f.id(), id()); } if(nextVertex!=0){ *nextVertex= QhullVertex(v); } return QhullRidge(ridge); }//nextRidge3d
//! Return next ridge and optional vertex for a 3d facet and ridge //! Does not use qh_errexit() QhullRidge QhullRidge:: nextRidge3d(const QhullFacet &f, QhullVertex *nextVertex) const { vertexT *v= 0; ridgeT *ridge= 0; if(qh_qh){ // Does not call qh_errexit(), TRY_QHULL_ not needed ridge= qh_nextridge3d(getRidgeT(), f.getFacetT(), &v); if(!ridge){ throw QhullError(10030, "Qhull error nextRidge3d: missing next ridge for facet %d ridge %d. Does facet contain ridge?", f.id(), id()); } } if(nextVertex!=0){ *nextVertex= QhullVertex(qh_qh, v); } return QhullRidge(qh_qh, ridge); }//nextRidge3d