File indexing completed on 2025-01-18 10:01:56
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef QhullUser_H
0010 #define QhullUser_H
0011
0012 #include "libqhull_r/qhull_ra.h"
0013 #include "libqhullcpp/QhullPoint.h"
0014 #include "libqhullcpp/PointCoordinates.h"
0015
0016 #include <stdarg.h>
0017 #include <string>
0018 #include <vector>
0019 #include <istream>
0020 #include <ostream>
0021 #include <sstream>
0022
0023 namespace orgQhull{
0024
0025 #
0026
0027 class QhullUser;
0028
0029
0030 #
0031 class QhullQh;
0032
0033 class QhullUser{
0034
0035 private:
0036 #
0037 QhullQh * qh_qh;
0038 void * previous_user;
0039 std::vector<std::vector<double> > doubles_vector;
0040 std::vector<std::vector<int> > ints_vector;
0041 std::vector<int> fprintf_ints;
0042 std::vector<double> fprintf_doubles;
0043 std::vector<int> fprintf_codes;
0044 std::vector<std::string> fprintf_strings;
0045 int num_facets;
0046 int num_neighbors;
0047 int num_numbers;
0048 int num_points;
0049 int num_results;
0050 int num_ridges;
0051 int num_vectors;
0052 int num_vertices;
0053 int qhull_dim;
0054 int delaunay_dim;
0055
0056 public:
0057 #
0058 QhullUser(QhullQh *qqh);
0059 ~QhullUser();
0060 private:
0061 QhullUser();
0062 QhullUser(const QhullUser &);
0063 QhullUser & operator=(const QhullUser &);
0064 private:
0065
0066 public:
0067 #
0068 void appendCode(int msgCode) { fprintf_codes.push_back(msgCode); }
0069 void appendDouble(double a) { fprintf_doubles.push_back(a); }
0070 void appendInt(int i) { fprintf_ints.push_back(i); }
0071 void appendAndClearDoubles() { doubles_vector.push_back(fprintf_doubles); fprintf_doubles.clear(); }
0072 void appendAndClearInts() { ints_vector.push_back(fprintf_ints); fprintf_ints.clear(); }
0073 void clear();
0074 void clearDoubles() { fprintf_doubles.clear(); }
0075 void clearDoublesVector() { doubles_vector.clear(); }
0076 void clearInts() { fprintf_ints.clear(); }
0077 void clearIntsVector() { ints_vector.clear(); }
0078 const std::vector<int> &codes() const { return fprintf_codes; }
0079 int delaunayDim() const { return delaunay_dim; }
0080 const std::vector<std::vector<double> > &doublesVector() const { return doubles_vector; }
0081 const std::vector<double> &doubles() const { return fprintf_doubles; }
0082 int firstCode() const { return (fprintf_codes.size() == 0 ? -1 : fprintf_codes[0]); }
0083 const std::vector<int> &ints() const { return fprintf_ints; }
0084 const std::vector<std::vector<int> > &intsVector() const { return ints_vector; }
0085 int numDoubles() const { return (int)doubles_vector.size(); }
0086 int numFacets() const { return num_facets; }
0087 int numInts() const { return (int)ints_vector.size(); }
0088 int numNeighbors() const { return num_neighbors; }
0089 int numNumbers() const { return num_numbers; }
0090 int numPoints() const { return num_points; }
0091 int numResults() const { return num_results; }
0092 int numRidges() const { return num_ridges; }
0093 int numVectors() const { return num_vectors; }
0094 int numVertices() const { return num_vertices; }
0095 QhullQh * qh() const { return qh_qh; }
0096 int qhullDim() const { return qhull_dim; }
0097 void setDelaunayDim(int i) { delaunay_dim= i; }
0098 void setNumFacets(int i) { num_facets= i; }
0099 void setNumResults(int i) { num_results= i; }
0100 void setNumRidges(int i) { num_ridges= i; }
0101 void setNumNeighbors(int i) { num_neighbors= i; }
0102 void setNumNumbers(int i) { num_numbers= i; }
0103 void setNumPoints(int i) { num_points= i; }
0104 void setNumVectors(int i) { num_vectors= i; }
0105 void setNumVertices(int i) { num_vertices= i; }
0106 void setQhullDim(int i) { qhull_dim= i; }
0107
0108 #
0109 void captureOn();
0110 void captureOff();
0111 };
0112
0113 }
0114
0115 #endif