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
38  QhullVertexSet(QhullQh *qqh, setT *s) : QhullSet<QhullVertex>(qqh, s), qhsettemp_defined(false) {}
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.
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{
62  const QhullVertexSet *vertex_set;
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 
70  const QhullVertexSet *vertex_set;
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
orgQhull::QhullVertexSet::qhsettemp_defined
bool qhsettemp_defined
Definition: QhullVertexSet.h:37
orgQhull::QhullVertexSet
Definition: QhullVertexSet.h:33
orgQhull::QhullVertexSet::PrintVertexSet
Definition: QhullVertexSet.h:67
print
void print(const Eigen::SparseMatrix< Scalar, Options > &mat)
orgQhull::QhullVertexSet::toStdVector
std::vector< QhullVertex > toStdVector() const
Definition: QhullVertexSet.cpp:108
orgQhull
QhullRidge – Qhull's ridge structure, ridgeT, as a C++ class.
Definition: Coordinates.cpp:21
operator<<
std::ostream & operator<<(std::ostream &os, const orgQhull::QhullVertexSet::PrintVertexSet &pr)
orgQhull::QhullVertex
Definition: QhullVertex.h:48
QhullSet.h
facetT
Definition: libqhull.h:262
orgQhull::QhullVertexSet::QhullVertexSet
QhullVertexSet()
Default constructor disabled. Will implement allocation later.
orgQhull::Qhull
Interface to Qhull from C++.
Definition: Qhull.h:49
setT
Definition: qset.h:83
orgQhull::QhullVertexSetIterator
QhullSetIterator< QhullVertex > QhullVertexSetIterator
Definition: QhullVertexSet.h:30
orgQhull::QhullVertexSet::PrintIdentifiers
Definition: QhullVertexSet.h:75
orgQhull::QhullSet
Definition: QhullSet.h:105
orgQhull::QhullQh
POD type equivalent to qhT. No virtual members.
Definition: QhullQh.h:58
orgQhull::QhullVertexSet::~QhullVertexSet
~QhullVertexSet()
Definition: QhullVertexSet.cpp:100
orgQhull::QhullVertexSet::operator=
QhullVertexSet & operator=(const QhullVertexSet &other)
Definition: QhullVertexSet.cpp:76
orgQhull::QhullVertexSet::QhullVertexSet
QhullVertexSet(const Qhull &q, setT *s)
Definition: QhullVertexSet.h:41
orgQhull::QhullVertexSet::print
const PrintVertexSet print(const char *message) const
Definition: QhullVertexSet.h:73
QhullVertex.h


hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:44:59