26 class QhullPointIterator; 44 protected: // For QhullPoints::iterator, QhullPoints::const_iterator 53 QhullPoint() : point_coordinates(0), qh_qh(0), point_dimension(0) {} 62 explicit QhullPoint(
QhullQh *qqh) : point_coordinates(0), qh_qh(qqh), point_dimension(qqh->hull_dim) {}
65 QhullPoint(
QhullQh *qqh,
int pointDimension,
coordT *c) : point_coordinates(c), qh_qh(qqh), point_dimension(pointDimension) {}
67 QhullPoint(
const QhullPoint &other) : point_coordinates(other.point_coordinates), qh_qh(other.qh_qh), point_dimension(other.point_dimension) {}
79 QList<coordT> toQList()
const;
80 #endif //QHULL_USES_QT 92 bool isValid()
const {
return (point_coordinates!=0 && point_dimension>0); };
99 void setDimension(
int pointDimension) { point_dimension= pointDimension; }
102 iterator begin() { return point_coordinates; } 105 const_iterator
constEnd()
const {
return (point_coordinates ? point_coordinates+point_dimension : 0); }
106 int count() {
return (point_coordinates ? point_dimension : 0); }
107 iterator
end() {
return (point_coordinates ? point_coordinates+point_dimension : 0); }
108 const_iterator
end()
const {
return (point_coordinates ? point_coordinates+point_dimension : 0); }
112 void advancePoint(countT idx) { if(point_coordinates) { point_coordinates += idx*point_dimension; } } 121 PrintPoint(
const char *message,
bool withIdentifier,
const QhullPoint &p) : point(&p), point_message(message), with_identifier(withIdentifier) {}
QhullPoint(QhullQh *qqh, coordT *c)
PrintPoint printWithIdentifier(const char *message) const
coordT * coordinates()
0 if undefined
QhullRidge – Qhull's ridge structure, ridgeT, as a C++ class.
const coordT & operator[](int idx) const
0 to hull_dim-1
POD type equivalent to qhT. No virtual members.
const_iterator constBegin() const
const_iterator begin() const
bool operator==(const QhullPoint &other) const
coordT * getBaseT() const
int point_dimension
Default dimension is qh_qh->hull_dim.
int qh_pointid(pointT *point)
QhullPoint::iterator Iterator
const_iterator end() const
QhullPoint & operator=(const QhullPoint &other)
Creates an alias. Does not make a deep copy of the point. Needed for vector<QhullPoint> ...
coordT * point_coordinates
Pointer to first coordinate, 0 if undefined.
PrintPoint(const char *message, bool withIdentifier, const QhullPoint &p)
void setDimension(int pointDimension)
const char * point_message
Interface to Qhull from C++.
QhullPoint(QhullQh *qqh, int pointDimension, coordT *c)
void defineAs(int pointDimension, coordT *c)
QhullPoint::const_iterator ConstIterator
bool operator!=(const QhullPoint &other) const
const coordT * const_iterator
std::vector< coordT > toStdVector() const
const_iterator constEnd() const
void defineAs(QhullPoint &other)
PrintPoint print(const char *message) const
void setCoordinates(coordT *c)
std::ostream & operator<<(std::ostream &os, const orgQhull::QhullPoint::PrintPoint &pr)
QhullPoint(const QhullPoint &other)
Creates an alias. Does not make a deep copy of the point. Needed for return by value and parameter pa...
coordT & operator[](int idx)
0 to hull_dim-1
QhullPoint(QhullQh *qqh, Coordinates &c)
const coordT * coordinates() const
0 if undefined
double distance(const QhullPoint &p) const
Return distance between two points.
#define QHULL_DECLARE_SEQUENTIAL_ITERATOR(C, T)
QhullPoint(int pointDimension, coordT *c)