QhullFacetList.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/QhullFacetList.h#2 $$Change: 2066 $
5 ** $DateTime: 2016/01/18 19:29:17 $$Author: bbarber $
6 **
7 ****************************************************************************/
8 
9 #ifndef QHULLFACETLIST_H
10 #define QHULLFACETLIST_H
11 
13 #include "libqhullcpp/QhullFacet.h"
14 
15 #include <ostream>
16 
17 #ifndef QHULL_NO_STL
18 #include <vector>
19 #endif
20 
21 namespace orgQhull {
22 
23 #
24  class Qhull;
25  class QhullFacet;
26  class QhullQh;
27 
28 #
29  class QhullFacetList;
32  typedef QhullLinkedListIterator<QhullFacet> QhullFacetListIterator;
34 
35 class QhullFacetList : public QhullLinkedList<QhullFacet> {
36 
37 #
38 private:
39  bool select_all;
40 
41 #
42 public:
43  QhullFacetList(const Qhull &q, facetT *b, facetT *e);
44  QhullFacetList(QhullQh *qqh, facetT *b, facetT *e);
46  //Copy constructor copies pointer but not contents. Needed for return by value and parameter passing.
47  QhullFacetList(const QhullFacetList &other) : QhullLinkedList<QhullFacet>(*other.begin(), *other.end()), select_all(other.select_all) {}
48  QhullFacetList & operator=(const QhullFacetList &other) { QhullLinkedList<QhullFacet>::operator =(other); select_all= other.select_all; return *this; }
49  ~QhullFacetList() {}
50 
51 private:
53 public:
54 
55 #
56 #ifndef QHULL_NO_STL
57  std::vector<QhullFacet> toStdVector() const;
58  std::vector<QhullVertex> vertices_toStdVector() const;
59 #endif //QHULL_NO_STL
60 #ifdef QHULL_USES_QT
61  QList<QhullFacet> toQList() const;
62  QList<QhullVertex> vertices_toQList() const;
63 #endif //QHULL_USES_QT
64 
65 #
66  countT count() const;
68  bool contains(const QhullFacet &f) const;
69  countT count(const QhullFacet &f) const;
70  bool isSelectAll() const { return select_all; }
71  QhullQh * qh() const { return first().qh(); }
72  void selectAll() { select_all= true; }
73  void selectGood() { select_all= false; }
75 
76 #
77  struct PrintFacetList{
78  const QhullFacetList *facet_list;
79  const char * print_message;
80  PrintFacetList(const QhullFacetList &fl, const char *message) : facet_list(&fl), print_message(message) {}
81  };//PrintFacetList
82  PrintFacetList print(const char *message) const { return PrintFacetList(*this, message); }
83 
84  struct PrintFacets{
85  const QhullFacetList *facet_list;
86  PrintFacets(const QhullFacetList &fl) : facet_list(&fl) {}
87  };//PrintFacets
88  PrintFacets printFacets() const { return PrintFacets(*this); }
89 
90  struct PrintVertices{
92  PrintVertices(const QhullFacetList &fl) : facet_list(&fl) {}
93  };//PrintVertices
94  PrintVertices printVertices() const { return PrintVertices(*this); }
95 };//class QhullFacetList
96 
97 }//namespace orgQhull
98 
99 #
100 
101 std::ostream &operator<<(std::ostream &os, const orgQhull::QhullFacetList::PrintFacetList &p);
102 std::ostream &operator<<(std::ostream &os, const orgQhull::QhullFacetList::PrintFacets &p);
103 std::ostream &operator<<(std::ostream &os, const orgQhull::QhullFacetList::PrintVertices &p);
104 std::ostream &operator<<(std::ostream &os, const orgQhull::QhullFacetList &fs);
105 
106 #endif // QHULLFACETLIST_H
QhullFacet.h
countT
int countT
Definition: user_r.h:182
print
void print(const Eigen::SparseMatrix< Scalar, Options > &mat)
orgQhull::QhullFacetList::operator=
QhullFacetList & operator=(const QhullFacetList &other)
Definition: QhullFacetList.h:54
orgQhull::QhullLinkedList< QhullFacet >::end
iterator end()
Definition: QhullLinkedList.h:124
orgQhull
QhullRidge – Qhull's ridge structure, ridgeT, as a C++ class.
Definition: Coordinates.cpp:21
orgQhull::QhullFacetList::QhullFacetList
QhullFacetList()
Disable default constructor. See QhullLinkedList.
facetT
Definition: libqhull.h:262
orgQhull::QhullFacetList::PrintFacets::facet_list
const QhullFacetList * facet_list
Definition: QhullFacetList.h:91
orgQhull::QhullFacet::qh
QhullQh * qh() const
Definition: QhullFacet.h:92
orgQhull::QhullFacetList::isSelectAll
bool isSelectAll() const
Definition: QhullFacetList.h:76
orgQhull::QhullFacetList
Definition: QhullFacetList.h:41
orgQhull::QhullFacetListIterator
QhullLinkedListIterator< QhullFacet > QhullFacetListIterator
QhullFacetListIterator – if(f.isGood()){ ... }.
Definition: QhullFacetList.h:37
orgQhull::Qhull
Interface to Qhull from C++.
Definition: Qhull.h:49
orgQhull::QhullFacetList::toStdVector
std::vector< QhullFacet > toStdVector() const
Definition: QhullFacetList.cpp:43
orgQhull::QhullFacetList::~QhullFacetList
~QhullFacetList()
Definition: QhullFacetList.h:55
orgQhull::QhullFacetList::select_all
bool select_all
Definition: QhullFacetList.h:45
orgQhull::QhullQh
POD type equivalent to qhT. No virtual members.
Definition: QhullQh.h:58
orgQhull::QhullFacetList::PrintFacetList
Definition: QhullFacetList.h:83
orgQhull::QhullFacetList::selectAll
void selectAll()
Definition: QhullFacetList.h:78
orgQhull::QhullFacetList::PrintVertices
Definition: QhullFacetList.h:96
orgQhull::QhullLinkedList::operator=
QhullLinkedList< T > & operator=(const QhullLinkedList< T > &other)
Copy assignment copies begin_node and end_node, but not the list elements.
Definition: QhullLinkedList.h:77
orgQhull::QhullLinkedList< QhullFacet >::begin
iterator begin()
Definition: QhullLinkedList.h:120
orgQhull::QhullFacet
A QhullFacet is the C++ equivalent to Qhull's facetT*.
Definition: QhullFacet.h:43
generate_distance_plot.b
float b
Definition: generate_distance_plot.py:7
orgQhull::QhullFacetList::contains
bool contains(const QhullFacet &f) const
Definition: QhullFacetList.cpp:75
orgQhull::QhullLinkedList< QhullFacet >::first
const QhullFacet & first() const
Definition: QhullLinkedList.h:106
orgQhull::QhullFacetList::PrintFacets
Definition: QhullFacetList.h:90
orgQhull::QhullFacetList::qh
QhullQh * qh() const
Definition: QhullFacetList.h:77
orgQhull::QhullFacetList::vertices_toStdVector
std::vector< QhullVertex > vertices_toStdVector() const
Same as PrintVertices.
Definition: QhullFacetList.cpp:60
orgQhull::QhullLinkedList
Definition: QhullLinkedList.h:50
orgQhull::QhullFacetList::count
countT count() const
Filtered by facet.isGood(). May be 0 when !isEmpty().
Definition: QhullFacetList.cpp:90
operator<<
std::ostream & operator<<(std::ostream &os, const orgQhull::QhullFacetList::PrintFacetList &p)
QhullLinkedList.h


hpp-fcl
Author(s):
autogenerated on Fri Aug 2 2024 02:45:14