File indexing completed on 2025-01-18 10:01:56
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef QHULLVERTEXSET_H
0010 #define QHULLVERTEXSET_H
0011
0012 #include "libqhullcpp/QhullFacetList.h"
0013 #include "libqhullcpp/QhullSet.h"
0014 #include "libqhullcpp/QhullVertex.h"
0015
0016 #include <ostream>
0017
0018 namespace orgQhull {
0019
0020 #
0021
0022 #
0023
0024
0025 class QhullVertexSet;
0026
0027
0028
0029 typedef QhullSetIterator<QhullVertex> QhullVertexSetIterator;
0030
0031 class QhullVertexSet : public QhullSet<QhullVertex> {
0032
0033 private:
0034 #
0035 bool qhsettemp_defined;
0036
0037 public:
0038 #
0039 QhullVertexSet(const Qhull &q, setT *s) : QhullSet<QhullVertex>(q, s), qhsettemp_defined(false) {}
0040 QhullVertexSet(const Qhull &q, facetT *facetlist, setT *facetset, bool allfacets);
0041
0042 QhullVertexSet(QhullQh *qqh, setT *s) : QhullSet<QhullVertex>(qqh, s), qhsettemp_defined(false) {}
0043 QhullVertexSet(QhullQh *qqh, facetT *facetlist, setT *facetset, bool allfacets);
0044
0045 QhullVertexSet(const QhullVertexSet &other);
0046 QhullVertexSet & operator=(const QhullVertexSet &other);
0047 ~QhullVertexSet();
0048
0049 private:
0050 QhullVertexSet();
0051 public:
0052
0053 #
0054 void freeQhSetTemp();
0055
0056 #
0057 #ifndef QHULL_NO_STL
0058 std::vector<QhullVertex> toStdVector() const;
0059 #endif
0060 #ifdef QHULL_USES_QT
0061 QList<QhullVertex> toQList() const;
0062 #endif
0063
0064 #
0065
0066 #
0067 struct PrintVertexSet{
0068 const QhullVertexSet *vertex_set;
0069 const char * print_message;
0070
0071 PrintVertexSet(const char *message, const QhullVertexSet *s) : vertex_set(s), print_message(message) {}
0072 };
0073 const PrintVertexSet print(const char *message) const { return PrintVertexSet(message, this); }
0074
0075 struct PrintIdentifiers{
0076 const QhullVertexSet *vertex_set;
0077 const char * print_message;
0078 PrintIdentifiers(const char *message, const QhullVertexSet *s) : vertex_set(s), print_message(message) {}
0079 };
0080 PrintIdentifiers printIdentifiers(const char *message) const { return PrintIdentifiers(message, this); }
0081
0082 };
0083
0084 }
0085
0086 #
0087
0088 std::ostream &operator<<(std::ostream &os, const orgQhull::QhullVertexSet::PrintVertexSet &pr);
0089 std::ostream &operator<<(std::ostream &os, const orgQhull::QhullVertexSet::PrintIdentifiers &p);
0090 inline std::ostream &operator<<(std::ostream &os, const orgQhull::QhullVertexSet &vs) { os << vs.print(""); return os; }
0091
0092 #endif