QhullFacetSet.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (c) 2008-2015 C.B. Barber. All rights reserved.
4 ** $Id: //main/2015/qhull/src/libqhullcpp/QhullFacetSet.h#2 $$Change: 2066 $
5 ** $DateTime: 2016/01/18 19:29:17 $$Author: bbarber $
6 **
7 ****************************************************************************/
8 
9 #ifndef QHULLFACETSET_H
10 #define QHULLFACETSET_H
11 
12 #include "libqhullcpp/QhullSet.h"
13 #include "libqhullcpp/QhullFacet.h"
14 
15 #include <ostream>
16 
17 namespace orgQhull {
18 
19 #
20  class Qhull;
21 
22 #
23  class QhullFacetSet;
25  typedef QhullSetIterator<QhullFacet> QhullFacetSetIterator;
26 
27 class QhullFacetSet : public QhullSet<QhullFacet> {
28 
29 #
30 public:
31  typedef facetT * base_type; // for QhullVertexSet
32 
33 private:
34 #
35  bool select_all;
36 
37 public:
38 #
39  //Conversion from setT* is not type-safe. Implicit conversion for void* to T
40  QhullFacetSet(const Qhull &q, setT *s) : QhullSet<QhullFacet>(q, s), select_all(false) {}
41  QhullFacetSet(QhullQh *qqh, setT *s) : QhullSet<QhullFacet>(qqh, s), select_all(false) {}
46 
47 private:
49  QhullFacetSet();
50 public:
51 
52 #
53 #ifndef QHULL_NO_STL
54  std::vector<QhullFacet> toStdVector() const;
55 #endif //QHULL_NO_STL
56 #ifdef QHULL_USES_QT
57  QList<QhullFacet> toQList() const;
58 #endif //QHULL_USES_QT
59 
60 #
61  countT count() const;
63  bool contains(const QhullFacet &f) const;
64  countT count(const QhullFacet &f) const;
65  bool isSelectAll() const { return select_all; }
67  void selectAll() { select_all= true; }
68  void selectGood() { select_all= false; }
69 
70 #
71  // Not same as QhullFacetList#IO. A QhullFacetSet is a component of a QhullFacetList.
72 
73  struct PrintFacetSet{
75  const char * print_message;
76  PrintFacetSet(const char *message, const QhullFacetSet *s) : facet_set(s), print_message(message) {}
77  };//PrintFacetSet
78  const PrintFacetSet print(const char *message) const { return PrintFacetSet(message, this); }
79 
82  const char * print_message;
83  PrintIdentifiers(const char *message, const QhullFacetSet *s) : facet_set(s), print_message(message) {}
84  };//PrintIdentifiers
85  PrintIdentifiers printIdentifiers(const char *message) const { return PrintIdentifiers(message, this); }
86 
87 };//class QhullFacetSet
88 
89 }//namespace orgQhull
90 
91 #
92 
93 std::ostream &operator<<(std::ostream &os, const orgQhull::QhullFacetSet &fs);
94 std::ostream &operator<<(std::ostream &os, const orgQhull::QhullFacetSet::PrintFacetSet &pr);
95 std::ostream &operator<<(std::ostream &os, const orgQhull::QhullFacetSet::PrintIdentifiers &p);
96 
97 #endif // QHULLFACETSET_H
const char * print_message
non-null message
Definition: QhullFacetSet.h:82
QhullFacetSet()
Disable default constructor. See QhullSetBase.
Definition: qset.h:83
QhullRidge – Qhull&#39;s ridge structure, ridgeT, as a C++ class.
Definition: Coordinates.cpp:21
QhullSet< T > & operator=(const QhullSet< T > &other)
Definition: QhullSet.h:120
POD type equivalent to qhT. No virtual members.
Definition: QhullQh.h:58
A QhullFacet is the C++ equivalent to Qhull&#39;s facetT*.
Definition: QhullFacet.h:37
bool contains(const QhullFacet &f) const
const char * print_message
non-null message
Definition: QhullFacetSet.h:75
countT count() const
Filtered by facet.isGood(). May be 0 when !isEmpty().
QhullSetIterator< QhullFacet > QhullFacetSetIterator
Definition: QhullFacetSet.h:24
Interface to Qhull from C++.
Definition: Qhull.h:43
PrintFacetSet(const char *message, const QhullFacetSet *s)
Definition: QhullFacetSet.h:76
QhullFacetSet & operator=(const QhullFacetSet &other)
Assignment copies pointers but not contents.
Definition: QhullFacetSet.h:45
QhullFacetSet(QhullQh *qqh, setT *s)
Definition: QhullFacetSet.h:41
PrintIdentifiers(const char *message, const QhullFacetSet *s)
Definition: QhullFacetSet.h:83
PrintIdentifiers printIdentifiers(const char *message) const
Definition: QhullFacetSet.h:85
void selectAll()
operator==() does not depend on isGood()
Definition: QhullFacetSet.h:67
QhullFacetSet(const QhullFacetSet &other)
Copy constructor copies pointers but not contents. Needed for return by value and parameter passing...
Definition: QhullFacetSet.h:43
QhullFacetSet(const Qhull &q, setT *s)
Definition: QhullFacetSet.h:40
std::ostream & operator<<(std::ostream &os, const orgQhull::QhullFacetSet &fs)
bool isSelectAll() const
Definition: QhullFacetSet.h:65
int countT
Definition: user_r.h:182
const PrintFacetSet print(const char *message) const
Definition: QhullFacetSet.h:78
std::vector< QhullFacet > toStdVector() const


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