Go to the documentation of this file.00001
00002
00003
00004
00005 #include <iostream.h>
00006 #include <conio.h>
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #if defined(__cplusplus)
00027 extern "C"
00028 {
00029 #endif
00030 #include <stdio.h>
00031 #include <stdlib.h>
00032 #include <libqhull/qhulllib.h>
00033 #include <libqhull/mem.h>
00034 #include <libqhull/qset.h>
00035 #include <libqhull/geom.h>
00036 #include <libqhull/merge.h>
00037 #include <libqhull/poly.h>
00038 #include <libqhull/io.h>
00039 #include <libqhull/stat.h>
00040 #if defined(__cplusplus)
00041 }
00042 #endif
00043
00044
00045
00046
00047
00048
00049
00050
00051 void compute_convex_hull(void)
00052 {
00053 int dim;
00054 int numpoints;
00055 coordT *points;
00056 boolT ismalloc;
00057 char flags[]= "qhull Tv";
00058 FILE *outfile= stdout;
00059
00060 FILE *errfile= stderr;
00061 int exitcode;
00062 facetT *facet;
00063 int curlong, totlong;
00064
00065
00066 exitcode= qh_new_qhull(dim, numpoints, points, ismalloc,
00067 flags, outfile, errfile);
00068 if (!exitcode) {
00069
00070 FORALLfacets {
00071
00072 }
00073 }
00074 qh_freeqhull(!qh_ALL);
00075 qh_memfreeshort(&curlong, &totlong);
00076 if (curlong || totlong)
00077 fprintf(errfile, "qhull internal warning (main): did not free %d bytes of long memory(%d pieces)\n",
00078 totlong, curlong);
00079 };
00080
00081
00082
00083
00084
00085
00086
00087
00088 void main()
00089 {
00090 cout << "Hello world" << endl;
00091
00092 cout << "Press any key..." << endl;
00093
00094 while (!_kbhit());
00095
00096 };