Go to the documentation of this file.
25 #include <QtCore/QList>
49 static setT s_empty_set;
53 QhullSetBase(const Qhull &q, setT *s);
66 countT count() const { return QhullSetBase::count(qh_set); }
71 QhullQh *
qh()
const {
return qh_qh; }
99 class QhullSet :
public QhullSetBase {
105 static setT s_empty_set;
115 QhullSet<T>(const Qhull &q, setT *s) : QhullSetBase(q, s) { }
134 QList<typename T> toQList()
const;
138 using QhullSetBase::count;
145 // Constructs T. Cannot return reference.
151 const typename T::base_type *
constData()
const {
return reinterpret_cast<const typename T::base_type *
>(
beginPointer()); }
152 typename T::base_type *
data() {
return reinterpret_cast<typename T::base_type *
>(
beginPointer()); }
153 const typename T::base_type *
data()
const {
return reinterpret_cast<const typename T::base_type *
>(
beginPointer()); }
154 typename T::base_type *
endData() {
return reinterpret_cast<typename T::base_type *
>(
endPointer()); }
155 const typename T::base_type *
endData()
const {
return reinterpret_cast<const typename T::base_type *
>(
endPointer()); }
177 iterator begin() { return iterator(qh(), reinterpret_cast<typename T::base_type *>(beginPointer())); }
178 const_iterator
begin()
const {
return const_iterator(
qh(),
data()); }
182 const_iterator
end()
const {
return const_iterator(
qh(),
endData()); }
185 bool contains(const T &t) const;
194 typename T::base_type *
i;
240 const typename T::base_type *
i;
282 template <
typename T>
286 typedef typename QhullSet<T>::const_iterator const_iterator;
290 const typename T::base_type * i; // e.g., facetT**, first for debugger
291 const typename T::base_type *
begin_i;
292 const typename T::base_type *
end_i;
297 QhullSetIterator<T>(const QhullSet<T> &s) : i(s.data()), begin_i(i), end_i(s.endData()), qh_qh(s.qh()) {}
302 countT countRemaining() { return (countT)(end_i-i); } // WARN64
305 bool findNext(const T &t);
309 bool hasNext() const { return i != end_i; }
326 template <
typename T>
338 #endif //QHULL_NO_STL
341 template <
typename T>
342 QList<T> QhullSet<T>::
345 QhullSet<T>::const_iterator i= begin();
346 QhullSet<T>::const_iterator e= end();
357 template <
typename T>
362 const typename T::base_type *p=
reinterpret_cast<const typename T::base_type *
>(&
SETelem_(getSetT(), idx));
363 return (idx>=0 && p<endData()) ? T(
qh(), *p) : T(
qh());
366 template <
typename T>
371 const typename T::base_type *p=
reinterpret_cast<const typename T::base_type *
>(&
SETelem_(getSetT(), idx));
372 return (idx>=0 && p<endData() ? T(
qh(), *p) : defaultValue);
377 template <
typename T>
382 void *p=
t.getBaseT();
387 template <
typename T>
389 count(
const T &t)
const
392 const typename T::base_type *i=
data();
393 const typename T::base_type *e= endData();
394 typename T::base_type p=
t.getBaseT();
404 template <
typename T>
408 const typename T::base_type *
b=
data();
409 const typename T::base_type *i= endData();
410 typename T::base_type p=
t.getBaseT();
421 template <
typename T>
425 typename T::base_type p=
t.getBaseT();
434 template <
typename T>
438 typename T::base_type p=
t.getBaseT();
452 template <
typename T>
456 const typename T::base_type *i= qs.
data();
457 const typename T::base_type *e= qs.
endData();
459 os << T(qs.
qh(), *i++);
const T::base_type * constData() const
end element is NULL
countT operator-(const const_iterator &o)
Assumes same point set.
QhullSet< T >::iterator Iterator
bool operator>(const iterator &o) const
std::ostream & operator<<(std::ostream &os, const orgQhull::QhullSet< T > &qs)
iterator & operator+=(countT j)
std::bidirectional_iterator_tag iterator_category
T value(countT idx) const
QhullRidge – Qhull's ridge structure, ridgeT, as a C++ class.
friend class const_iterator
ptrdiff_t difference_type
const_iterator & operator-=(int j)
countT indexOf(const T &t) const
bool findNext(const T &t)
std::vector< T > toStdVector() const
bool operator!=(const QhullSet< T > &other) const
QhullSetIterator< T > & operator=(const QhullSetIterator< T > &o)
countT lastIndexOf(const T &t) const
QhullSetBase(const QhullSetBase &other)
Copy constructor copies the pointer but not the set. Needed for return by value and parameter passing...
ptrdiff_t difference_type
QhullSet< T >::const_iterator ConstIterator
iterator & operator++()
No error checking.
Faster then interator/const_iterator due to T::base_type.
bool operator<=(const iterator &o) const
iterator operator+(countT j) const
iterator & operator-=(countT j)
iterator & operator=(const iterator &o)
const_iterator & operator--()
const T operator[](countT idx) const
bool operator==(const const_iterator &o) const
void ** endPointer() const
Always points to 0.
const_iterator & operator++()
bool contains(const T &t) const
QhullSetBase & operator=(const QhullSetBase &other)
const_iterator constEnd() const
iterator(QhullQh *qqh, typename T::base_type *p)
int qh_setequal(setT *setA, setT *setB)
void ** beginPointer() const
POD type equivalent to qhT. No virtual members.
std::random_access_iterator_tag iterator_category
const T::base_type * end_i
bool operator>=(const iterator &o) const
bool operator<(const iterator &o) const
const T::base_type * begin_i
void ** elementPointer(countT idx) const
const_iterator & operator=(const const_iterator &o)
const T at(countT idx) const
const_iterator constBegin() const
const T operator*() const
bool operator<(const const_iterator &o) const
const_iterator & operator+=(int j)
bool operator>(const const_iterator &o) const
QhullSetBase()
disabled since memory allocation for QhullSet not defined
bool operator==(const QhullSet< T > &other) const
countT operator-(const iterator &o) const
Assumes same point set.
bool operator<=(const const_iterator &o) const
int qh_setindex(setT *set, void *atelem)
void ** qh_setendpointer(setT *set)
bool findPrevious(const T &t)
bool operator!=(const iterator &o) const
QhullSet< T > & operator=(const QhullSet< T > &other)
bool operator!=(const const_iterator &o) const
int qh_setin(setT *set, void *setelem)
const_iterator(QhullQh *qqh, const typename T::base_type *p)
bool operator==(const iterator &o) const
const_iterator operator+(int j) const
hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:44:59