Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Qhull
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Grant Kim
Qhull
Commits
a020ee2b
Commit
a020ee2b
authored
15 years ago
by
Brad Barber
Browse files
Options
Downloads
Patches
Plain Diff
Delete qhull_interface.cpp. Obsolete.
parent
e196d233
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cpp/qhull_interface.cpp
+0
-96
0 additions, 96 deletions
cpp/qhull_interface.cpp
with
0 additions
and
96 deletions
cpp/qhull_interface.cpp
deleted
100644 → 0
+
0
−
96
View file @
e196d233
/*<html><pre> -<a href="qh-user.htm"
>-------------------------------</a><a name="TOP">-</a>
*/
#include
<iostream.h>
#include
<conio.h>
//--- Include qhull, so it works from with in a C++ source file
//---
//--- In MVC one cannot just do:
//---
//--- extern "C"
//--- {
//--- #include "qhull_a.h"
//--- }
//---
//--- Because qhull_a.h includes math.h, which can not appear
//--- inside a extern "C" declaration.
//---
//--- Maybe that why Numerical recipes in C avoid this problem, by removing
//--- standard include headers from its header files and add them in the
//--- respective source files instead.
//---
//--- [K. Erleben]
#if defined(__cplusplus)
extern
"C"
{
#endif
#include
<stdio.h>
#include
<stdlib.h>
#include
<qhull/qhulllib.h>
#include
<qhull/mem.h>
#include
<qhull/qset.h>
#include
<qhull/geom.h>
#include
<qhull/merge.h>
#include
<qhull/poly.h>
#include
<qhull/io.h>
#include
<qhull/stat.h>
#if defined(__cplusplus)
}
#endif
/*********************************************************************/
/* */
/* */
/* */
/* */
/*********************************************************************/
void
compute_convex_hull
(
void
)
{
int
dim
;
/* dimension of points */
int
numpoints
;
/* number of points */
coordT
*
points
;
/* array of coordinates for each point */
boolT
ismalloc
;
/* True if qhull should free points in qh_freeqhull() or reallocation */
char
flags
[]
=
"qhull Tv"
;
/* option flags for qhull, see qh_opt.htm */
FILE
*
outfile
=
stdout
;
/* output from qh_produce_output()
use NULL to skip qh_produce_output() */
FILE
*
errfile
=
stderr
;
/* error messages from qhull code */
int
exitcode
;
/* 0 if no error from qhull */
facetT
*
facet
;
/* set by FORALLfacets */
int
curlong
,
totlong
;
/* memory remaining after qh_memfreeshort */
/* initialize dim, numpoints, points[], ismalloc here */
exitcode
=
qh_new_qhull
(
dim
,
numpoints
,
points
,
ismalloc
,
flags
,
outfile
,
errfile
);
if
(
!
exitcode
)
{
/* if no error */
/* 'qh facet_list' contains the convex hull */
FORALLfacets
{
/* ... your code ... */
}
}
qh_freeqhull
(
!
qh_ALL
);
qh_memfreeshort
(
&
curlong
,
&
totlong
);
if
(
curlong
||
totlong
)
fprintf
(
errfile
,
"qhull internal warning (main): did not free %d bytes of long memory(%d pieces)
\n
"
,
totlong
,
curlong
);
};
/*********************************************************************/
/* */
/* */
/* */
/* */
/*********************************************************************/
void
main
()
{
cout
<<
"Hello world"
<<
endl
;
cout
<<
"Press any key..."
<<
endl
;
while
(
!
_kbhit
());
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment