qt-qhull.cpp
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/qt-qhull.cpp#1 $$Change: 1981 $
5 ** $DateTime: 2015/09/28 20:26:32 $$Author: bbarber $
6 **
7 ****************************************************************************/
8 
9 #include <QList>
10 #include "qhulltest/RoadTest.h"
11 
12 #ifndef QHULL_USES_QT
13 #define QHULL_USES_QT 1
14 #endif
15 
16 #include "Coordinates.h"
17 #include "QhullFacetList.h"
18 #include "QhullFacetSet.h"
19 #include "QhullHyperplane.h"
20 #include "QhullPoint.h"
21 #include "QhullPoints.h"
22 #include "QhullPointSet.h"
23 #include "QhullVertex.h"
24 #include "QhullVertexSet.h"
25 
26 namespace orgQhull {
27 
28 #
29 
30 QList<coordT> Coordinates::
31 toQList() const
32 {
33  CoordinatesIterator i(*this);
34  QList<coordT> cs;
35  while(i.hasNext()){
36  cs.append(i.next());
37  }
38  return cs;
39 }//toQList
40 
41 QList<QhullFacet> QhullFacetList::
42 toQList() const
43 {
44  QhullLinkedListIterator<QhullFacet> i(*this);
45  QList<QhullFacet> vs;
46  while(i.hasNext()){
47  QhullFacet f= i.next();
48  if(isSelectAll() || f.isGood()){
49  vs.append(f);
50  }
51  }
52  return vs;
53 }//toQList
54 
56 QList<QhullVertex> QhullFacetList::
57 vertices_toQList() const
58 {
59  QList<QhullVertex> vs;
60  QhullVertexSet qvs(qh(), first().getFacetT(), NULL, isSelectAll());
61  for(QhullVertexSet::iterator i=qvs.begin(); i!=qvs.end(); ++i){
62  vs.push_back(*i);
63  }
64  return vs;
65 }//vertices_toQList
66 
67 QList<QhullFacet> QhullFacetSet::
68 toQList() const
69 {
70  QhullSetIterator<QhullFacet> i(*this);
71  QList<QhullFacet> vs;
72  while(i.hasNext()){
73  QhullFacet f= i.next();
74  if(isSelectAll() || f.isGood()){
75  vs.append(f);
76  }
77  }
78  return vs;
79 }//toQList
80 
81 #ifdef QHULL_USES_QT
82 QList<coordT> QhullHyperplane::
83 toQList() const
84 {
85  QhullHyperplaneIterator i(*this);
86  QList<coordT> fs;
87  while(i.hasNext()){
88  fs.append(i.next());
89  }
90  fs.append(hyperplane_offset);
91  return fs;
92 }//toQList
93 #endif //QHULL_USES_QT
94 
95 QList<coordT> QhullPoint::
96 toQList() const
97 {
98  QhullPointIterator i(*this);
99  QList<coordT> vs;
100  while(i.hasNext()){
101  vs.append(i.next());
102  }
103  return vs;
104 }//toQList
105 
106 QList<QhullPoint> QhullPoints::
107 toQList() const
108 {
109  QhullPointsIterator i(*this);
110  QList<QhullPoint> vs;
111  while(i.hasNext()){
112  vs.append(i.next());
113  }
114  return vs;
115 }//toQList
116 
117 /******
118 QList<QhullPoint> QhullPointSet::
119 toQList() const
120 {
121  QhullPointSetIterator i(*this);
122  QList<QhullPoint> vs;
123  while(i.hasNext()){
124  vs.append(i.next());
125  }
126  return vs;
127 }//toQList
128 */
129 }//orgQhull
130 
Coordinates.h
QhullHyperplane.h
QhullPoints.h
orgQhull
QhullRidge – Qhull's ridge structure, ridgeT, as a C++ class.
Definition: Coordinates.cpp:21
QhullPointSet.h
QhullFacetSet.h
QhullVertexSet.h
QhullFacetList.h
orgQhull::QhullFacetList::isSelectAll
bool isSelectAll() const
Definition: QhullFacetList.h:76
orgQhull::QhullFacetSet::isSelectAll
bool isSelectAll() const
Definition: QhullFacetSet.h:71
QhullPoint.h
orgQhull::QhullLinkedList< QhullFacet >::first
const QhullFacet & first() const
Definition: QhullLinkedList.h:106
orgQhull::QhullFacetList::qh
QhullQh * qh() const
Definition: QhullFacetList.h:77
RoadTest.h
QhullVertex.h
orgQhull::QhullHyperplane::hyperplane_offset
coordT hyperplane_offset
Distance from hyperplane to origin.
Definition: QhullHyperplane.h:51


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