QhullVertexSet.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (c) 2009-2015 C.B. Barber. All rights reserved.
4 ** $Id: //main/2015/qhull/src/libqhullcpp/QhullVertexSet.h#2 $$Change: 2066 $
5 ** $DateTime: 2016/01/18 19:29:17 $$Author: bbarber $
6 **
7 ****************************************************************************/
8 
9 #ifndef QHULLVERTEXSET_H
10 #define QHULLVERTEXSET_H
11 
12 #include "libqhullcpp/QhullSet.h"
14 
15 #include <ostream>
16 
17 namespace orgQhull {
18 
19 #
20 
21 #
22  class QhullVertexSet;
25  typedef QhullSetIterator<QhullVertex> QhullVertexSetIterator;
26 
27 class QhullVertexSet : public QhullSet<QhullVertex> {
28 
29 private:
30 #
31  bool qhsettemp_defined;
32 
33 public:
34 #
35  QhullVertexSet(const Qhull &q, setT *s) : QhullSet<QhullVertex>(q, s), qhsettemp_defined(false) {}
36  QhullVertexSet(const Qhull &q, facetT *facetlist, setT *facetset, bool allfacets);
37  //Conversion from setT* is not type-safe. Implicit conversion for void* to T
39  QhullVertexSet(QhullQh *qqh, facetT *facetlist, setT *facetset, bool allfacets);
40  //Copy constructor and assignment copies pointer but not contents. Throws error if qhsettemp_defined. Needed for return by value.
41  QhullVertexSet(const QhullVertexSet &other);
42  QhullVertexSet & operator=(const QhullVertexSet &other);
44 
45 private:
47 public:
48 
49 #
50  void freeQhSetTemp();
51 
52 #
53 #ifndef QHULL_NO_STL
54  std::vector<QhullVertex> toStdVector() const;
55 #endif //QHULL_NO_STL
56 #ifdef QHULL_USES_QT
57  QList<QhullVertex> toQList() const;
58 #endif //QHULL_USES_QT
59 
60 #
61  struct PrintVertexSet{
63  const char * print_message;
64 
65  PrintVertexSet(const char *message, const QhullVertexSet *s) : vertex_set(s), print_message(message) {}
66  };//PrintVertexSet
67  const PrintVertexSet print(const char *message) const { return PrintVertexSet(message, this); }
68 
71  const char * print_message;
72  PrintIdentifiers(const char *message, const QhullVertexSet *s) : vertex_set(s), print_message(message) {}
73  };//PrintIdentifiers
74  PrintIdentifiers printIdentifiers(const char *message) const { return PrintIdentifiers(message, this); }
75 
76 };//class QhullVertexSet
77 
78 }//namespace orgQhull
79 
80 #
81 
82 std::ostream &operator<<(std::ostream &os, const orgQhull::QhullVertexSet::PrintVertexSet &pr);
83 std::ostream &operator<<(std::ostream &os, const orgQhull::QhullVertexSet::PrintIdentifiers &p);
84 inline std::ostream &operator<<(std::ostream &os, const orgQhull::QhullVertexSet &vs) { os << vs.print(""); return os; }
85 
86 #endif // QHULLVERTEXSET_H
std::vector< QhullVertex > toStdVector() const
QhullSetIterator< QhullVertex > QhullVertexSetIterator
Definition: qset.h:83
QhullRidge – Qhull&#39;s ridge structure, ridgeT, as a C++ class.
Definition: Coordinates.cpp:21
POD type equivalent to qhT. No virtual members.
Definition: QhullQh.h:58
std::ostream & operator<<(std::ostream &os, const orgQhull::QhullVertexSet::PrintVertexSet &pr)
const char * print_message
non-null message
const char * print_message
non-null message
QhullVertexSet & operator=(const QhullVertexSet &other)
QhullVertexSet(QhullQh *qqh, setT *s)
const PrintVertexSet print(const char *message) const
PrintIdentifiers printIdentifiers(const char *message) const
Interface to Qhull from C++.
Definition: Qhull.h:43
QhullVertexSet()
Default constructor disabled. Will implement allocation later.
PrintIdentifiers(const char *message, const QhullVertexSet *s)
PrintVertexSet(const char *message, const QhullVertexSet *s)


hpp-fcl
Author(s):
autogenerated on Fri Jun 2 2023 02:39:02