Skip to content

Instantly share code, notes, and snippets.

@stevengj
Last active November 20, 2020 21:52
Show Gist options
  • Save stevengj/0cf9bcc9f338ad8fcf78e5862d4ff851 to your computer and use it in GitHub Desktop.
Save stevengj/0cf9bcc9f338ad8fcf78e5862d4ff851 to your computer and use it in GitHub Desktop.
libqhull_r Julia bindings
module LibQhull
using Qhull_jll, CEnum
const realT = Cdouble
const DBL_MAX = floatmax(realT)
const DBL_MIN = floatmin(realT)
const DBL_EPSILON = eps(floatmax(realT))
const INT_MAX = typemax(Cint)
# The following is the output of converting the libqhull_r.h header file
# to Julia using:
# using Clang, Qhull_jll
# wc = init(; headers = [Qhull_jll.user_r_h, Qhull_jll.mem_r_h, Qhull_jll.qset_r_h, Qhull_jll.stat_r_h, Qhull_jll.libqhull_r_h],
# output_file = joinpath(@__DIR__, "libqhull_out.jl"),
# common_file = joinpath(@__DIR__, "libqhull_common.jl"),
# header_wrapped = (root, current)->root == current,
# header_library = x->"libqhull_r"
# )
# run(wc)
# It will need to be re-generated if the libqhull_r API is updated.
#################################################################################
# Automatically generated using Clang.jl
const qhDEFuser = 1
const qh_FILENAMElen = 500
const MSG_TRACE0 = 0
const MSG_TRACE1 = 1000
const MSG_TRACE2 = 2000
const MSG_TRACE3 = 3000
const MSG_TRACE4 = 4000
const MSG_TRACE5 = 5000
const MSG_ERROR = 6000
const MSG_WARNING = 7000
const MSG_STDERR = 8000
const MSG_OUTPUT = 9000
const MSG_QHULL_ERROR = 10000
const MSG_FIX = 11000
const MSG_MAXLEN = 3000
const qh_OPTIONline = 80
const REALfloat = 0
const REALmax = DBL_MAX
const REALmin = DBL_MIN
const REALepsilon = DBL_EPSILON
const qh_REALdigits = 16
const qh_REAL_1 = "%6.16g "
const qh_REAL_2n = "%6.16g %6.16g\n"
const qh_REAL_3n = "%6.16g %6.16g %6.16g\n"
const DEFcountT = 1
const COUNTmax = INT_MAX
const qh_POINTSmax = INT_MAX - 16
const qh_CLOCKtype = 1
# Skipping MacroDefinition: qh_CPUclock ( ( unsigned long ) clock ( ) )
const qh_SECticks = 1.0e6
const qh_RANDOMtype = 5
# Skipping MacroDefinition: qh_RANDOMmax ( ( realT ) 2147483646UL )
# Skipping MacroDefinition: qh_RANDOMint qh_rand ( qh )
# Skipping MacroDefinition: qh_RANDOMseed_ ( qh , seed ) qh_srand ( qh , seed ) ;
const qh_ORIENTclock = 0
const qh_JOGGLEdefault = 30000.0
const qh_JOGGLEincrease = 10.0
const qh_JOGGLEretry = 2
const qh_JOGGLEagain = 1
const qh_JOGGLEmaxincrease = 0.01
const qh_JOGGLEmaxretry = 50
const qh_HASHfactor = 2
const qh_VERIFYdirect = 1000000
const qh_INITIALsearch = 6
const qh_INITIALmax = 8
# Skipping MacroDefinition: qh_MEMalign ( ( int ) ( fmax_ ( sizeof ( realT ) , sizeof ( void * ) ) ) )
const qh_MEMbufsize = 0x00010000
const qh_MEMinitbuf = 0x00020000
const qh_INFINITE = -10.101
const qh_DEFAULTbox = 0.5
const qh_DEFAULTzbox = 1.0e6
const qh_COMPUTEfurthest = 0
const qh_KEEPstatistics = 1
const qh_MAXoutside = 1
const qh_QUICKhelp = 0
const qh_BESTcentrum = 20
const qh_BESTcentrum2 = 2
const qh_BESTnonconvex = 15
const qh_COPLANARratio = 3
const qh_DIMmergeVertex = 6
const qh_DIMreduceBuild = 5
# Skipping MacroDefinition: qh_DISToutside ( ( qh_USEfindbestnew ? 2 : 1 ) * fmax_ ( ( qh -> MERGING ? 2 : 1 ) * qh -> MINoutside , qh -> max_outside ) )
const qh_MAXcheckpoint = 10
const qh_MAXcoplanarcentrum = 10
const qh_MAXnewcentrum = 5
const qh_MAXnewmerges = 2
const qh_RATIOconcavehorizon = 20.0
const qh_RATIOconvexmerge = 10.0
const qh_RATIOcoplanarapex = 3.0
const qh_RATIOcoplanaroutside = 30.0
const qh_RATIOmaxsimplex = 0.001
const qh_RATIOnearinside = 5
const qh_RATIOpinchedsubridge = 10.0
const qh_RATIOtrypinched = 4.0
const qh_RATIOtwisted = 20.0
# Skipping MacroDefinition: qh_SEARCHdist ( ( qh_USEfindbestnew ? 2 : 1 ) * ( qh -> max_outside + 2 * qh -> DISTround + fmax_ ( qh -> MINvisible , qh -> MAXcoplanar ) ) ) ;
# Skipping MacroDefinition: qh_USEfindbestnew ( zzval_ ( Ztotmerge ) > 50 )
const qh_MAXnarrow = -0.99999999
const qh_WARNnarrow = -0.999999999999999
const qh_WIDEcoplanar = 6
const qh_WIDEduplicate = 100
const qh_WIDEdupridge = 50
const qh_WIDEmaxoutside = 100
const qh_WIDEmaxoutside2 = 10qh_WIDEmaxoutside
const qh_WIDEpinched = 100
const qh_ZEROdelaunay = 2
const countT = Cint
const qhDEFmem = 1
const DEFsetT = 1
const DEFqhT = 1
const qhmem_ERRmem = 4
const qhmem_ERRqhull = 5
# Skipping MacroDefinition: qh_memalloc_ ( qh , insize , freelistp , object , type ) { ( void ) freelistp ; /* Avoid warnings */ object = ( type * ) qh_memalloc ( qh , insize ) ; }
# Skipping MacroDefinition: qh_memfree_ ( qh , object , insize , freelistp ) { ( void ) freelistp ; /* Avoid warnings */ qh_memfree ( qh , object , insize ) ; }
struct setelemT
p::Ptr{Cvoid}
end
struct setT
maxsize::Cint
e::NTuple{1, setelemT}
end
@cenum qh_PRINT::UInt32 begin
qh_PRINTnone = 0
qh_PRINTarea = 1
qh_PRINTaverage = 2
qh_PRINTcoplanars = 3
qh_PRINTcentrums = 4
qh_PRINTfacets = 5
qh_PRINTfacets_xridge = 6
qh_PRINTgeom = 7
qh_PRINTids = 8
qh_PRINTinner = 9
qh_PRINTneighbors = 10
qh_PRINTnormals = 11
qh_PRINTouter = 12
qh_PRINTmaple = 13
qh_PRINTincidences = 14
qh_PRINTmathematica = 15
qh_PRINTmerges = 16
qh_PRINToff = 17
qh_PRINToptions = 18
qh_PRINTpointintersect = 19
qh_PRINTpointnearest = 20
qh_PRINTpoints = 21
qh_PRINTqhull = 22
qh_PRINTsize = 23
qh_PRINTsummary = 24
qh_PRINTtriangles = 25
qh_PRINTvertices = 26
qh_PRINTvneighbors = 27
qh_PRINTextremes = 28
qh_PRINTEND = 29
end
struct ANONYMOUS1_f
area::Cdouble
end
struct facetT
furthestdist::Cdouble
maxoutside::Cdouble
offset::Cdouble
normal::Ptr{Cdouble}
f::ANONYMOUS1_f
center::Ptr{Cdouble}
previous::Ptr{facetT}
next::Ptr{facetT}
vertices::Ptr{setT}
ridges::Ptr{setT}
neighbors::Ptr{setT}
outsideset::Ptr{setT}
coplanarset::Ptr{setT}
visitid::UInt32
id::UInt32
nummerge::UInt32
tricoplanar::UInt32
newfacet::UInt32
visible::UInt32
toporient::UInt32
simplicial::UInt32
seen::UInt32
seen2::UInt32
flipped::UInt32
upperdelaunay::UInt32
notfurthest::UInt32
good::UInt32
isarea::UInt32
dupridge::UInt32
mergeridge::UInt32
mergeridge2::UInt32
coplanarhorizon::UInt32
mergehorizon::UInt32
cycledone::UInt32
tested::UInt32
keepcentrum::UInt32
newmerge::UInt32
degenerate::UInt32
redundant::UInt32
end
struct ridgeT
vertices::Ptr{setT}
top::Ptr{facetT}
bottom::Ptr{facetT}
id::UInt32
seen::UInt32
tested::UInt32
nonconvex::UInt32
mergevertex::UInt32
mergevertex2::UInt32
simplicialtop::UInt32
simplicialbot::UInt32
end
struct vertexT
next::Ptr{vertexT}
previous::Ptr{vertexT}
point::Ptr{Cdouble}
neighbors::Ptr{setT}
id::UInt32
visitid::UInt32
seen::UInt32
seen2::UInt32
deleted::UInt32
delridge::UInt32
newfacet::UInt32
partitioned::UInt32
end
@cenum qh_CENTER::UInt32 begin
qh_ASnone = 0
qh_ASvoronoi = 1
qh_AScentrum = 2
end
struct qhmemT
BUFsize::Cint
BUFinit::Cint
TABLEsize::Cint
NUMsizes::Cint
LASTsize::Cint
ALIGNmask::Cint
freelists::Ptr{Ptr{Cvoid}}
sizetable::Ptr{Cint}
indextable::Ptr{Cint}
curbuffer::Ptr{Cvoid}
freemem::Ptr{Cvoid}
freesize::Cint
tempstack::Ptr{setT}
ferr::Ptr{Cint}
IStracing::Cint
cntquick::Cint
cntshort::Cint
cntlong::Cint
freeshort::Cint
freelong::Cint
totbuffer::Cint
totdropped::Cint
totfree::Cint
totlong::Cint
maxlong::Cint
totshort::Cint
totunused::Cint
cntlarger::Cint
totlarger::Cint
end
struct intrealT
i::Cint
end
struct qhstatT
stats::NTuple{249, intrealT}
id::NTuple{259, Cuchar}
doc::NTuple{249, Cstring}
count::NTuple{249, Int16}
type::NTuple{249, UInt8}
printed::NTuple{249, UInt8}
init::NTuple{9, intrealT}
next::Cint
precision::Cint
vridges::Cint
tempi::Cint
tempr::Cint
end
struct qhT
ALLpoints::UInt32
ALLOWshort::UInt32
ALLOWwarning::UInt32
ALLOWwide::UInt32
ANGLEmerge::UInt32
APPROXhull::UInt32
MINoutside::Cdouble
ANNOTATEoutput::UInt32
ATinfinity::UInt32
AVOIDold::UInt32
BESToutside::UInt32
CDDinput::UInt32
CDDoutput::UInt32
CHECKduplicates::UInt32
CHECKfrequently::UInt32
premerge_cos::Cdouble
postmerge_cos::Cdouble
DELAUNAY::UInt32
DOintersections::UInt32
DROPdim::Cint
FLUSHprint::UInt32
FORCEoutput::UInt32
GOODpoint::Cint
GOODpointp::Ptr{Cdouble}
GOODthreshold::UInt32
GOODvertex::Cint
GOODvertexp::Ptr{Cdouble}
HALFspace::UInt32
ISqhullQh::UInt32
IStracing::Cint
KEEParea::Cint
KEEPcoplanar::UInt32
KEEPinside::UInt32
KEEPmerge::Cint
KEEPminArea::Cdouble
MAXcoplanar::Cdouble
MAXwide::Cint
MERGEexact::UInt32
MERGEindependent::UInt32
MERGING::UInt32
premerge_centrum::Cdouble
postmerge_centrum::Cdouble
MERGEpinched::UInt32
MERGEvertices::UInt32
MINvisible::Cdouble
NOnarrow::UInt32
NOnearinside::UInt32
NOpremerge::UInt32
ONLYgood::UInt32
ONLYmax::UInt32
PICKfurthest::UInt32
POSTmerge::UInt32
PREmerge::UInt32
PRINTcentrums::UInt32
PRINTcoplanar::UInt32
PRINTdim::Cint
PRINTdots::UInt32
PRINTgood::UInt32
PRINTinner::UInt32
PRINTneighbors::UInt32
PRINTnoplanes::UInt32
PRINToptions1st::UInt32
PRINTouter::UInt32
PRINTprecision::UInt32
PRINTout::NTuple{29, qh_PRINT}
PRINTridges::UInt32
PRINTspheres::UInt32
PRINTstatistics::UInt32
PRINTsummary::UInt32
PRINTtransparent::UInt32
PROJECTdelaunay::UInt32
PROJECTinput::Cint
RANDOMdist::UInt32
RANDOMfactor::Cdouble
RANDOMa::Cdouble
RANDOMb::Cdouble
RANDOMoutside::UInt32
REPORTfreq::Cint
REPORTfreq2::Cint
RERUN::Cint
ROTATErandom::Cint
SCALEinput::UInt32
SCALElast::UInt32
SETroundoff::UInt32
SKIPcheckmax::UInt32
SKIPconvex::UInt32
SPLITthresholds::UInt32
STOPadd::Cint
STOPcone::Cint
STOPpoint::Cint
TESTpoints::Cint
TESTvneighbors::UInt32
TRACElevel::Cint
TRACElastrun::Cint
TRACEpoint::Cint
TRACEdist::Cdouble
TRACEmerge::Cint
TRIangulate::UInt32
TRInormals::UInt32
UPPERdelaunay::UInt32
USEstdout::UInt32
VERIFYoutput::UInt32
VIRTUALmemory::UInt32
VORONOI::UInt32
AREAfactor::Cdouble
DOcheckmax::UInt32
feasible_string::Cstring
feasible_point::Ptr{Cdouble}
GETarea::UInt32
KEEPnearinside::UInt32
hull_dim::Cint
input_dim::Cint
num_points::Cint
first_point::Ptr{Cdouble}
POINTSmalloc::UInt32
input_points::Ptr{Cdouble}
input_malloc::UInt32
qhull_command::NTuple{256, UInt8}
qhull_commandsiz2::Cint
rbox_command::NTuple{256, UInt8}
qhull_options::NTuple{512, UInt8}
qhull_optionlen::Cint
qhull_optionsiz::Cint
qhull_optionsiz2::Cint
run_id::Cint
VERTEXneighbors::UInt32
ZEROcentrum::UInt32
upper_threshold::Ptr{Cdouble}
lower_threshold::Ptr{Cdouble}
upper_bound::Ptr{Cdouble}
lower_bound::Ptr{Cdouble}
ANGLEround::Cdouble
centrum_radius::Cdouble
cos_max::Cdouble
DISTround::Cdouble
MAXabs_coord::Cdouble
MAXlastcoord::Cdouble
MAXoutside::Cdouble
MAXsumcoord::Cdouble
MAXwidth::Cdouble
MINdenom_1::Cdouble
MINdenom::Cdouble
MINdenom_1_2::Cdouble
MINdenom_2::Cdouble
MINlastcoord::Cdouble
NEARzero::Ptr{Cdouble}
NEARinside::Cdouble
ONEmerge::Cdouble
outside_err::Cdouble
WIDEfacet::Cdouble
NARROWhull::UInt32
qhull::NTuple{6, UInt8}
errexit::Cint
jmpXtra::NTuple{40, UInt8}
restartexit::Cint
jmpXtra2::NTuple{40, UInt8}
fin::Ptr{Cint}
fout::Ptr{Cint}
ferr::Ptr{Cint}
interior_point::Ptr{Cdouble}
normal_size::Cint
center_size::Cint
TEMPsize::Cint
facet_list::Ptr{facetT}
facet_tail::Ptr{facetT}
facet_next::Ptr{facetT}
newfacet_list::Ptr{facetT}
visible_list::Ptr{facetT}
num_visible::Cint
tracefacet_id::UInt32
tracefacet::Ptr{facetT}
traceridge_id::UInt32
traceridge::Ptr{ridgeT}
tracevertex_id::UInt32
tracevertex::Ptr{vertexT}
vertex_list::Ptr{vertexT}
vertex_tail::Ptr{vertexT}
newvertex_list::Ptr{vertexT}
num_facets::Cint
num_vertices::Cint
num_outside::Cint
num_good::Cint
facet_id::UInt32
ridge_id::UInt32
vertex_id::UInt32
first_newfacet::UInt32
hulltime::Culong
ALLOWrestart::UInt32
build_cnt::Cint
CENTERtype::qh_CENTER
furthest_id::Cint
last_errcode::Cint
GOODclosest::Ptr{facetT}
coplanar_apex::Ptr{Cdouble}
hasAreaVolume::UInt32
hasTriangulation::UInt32
isRenameVertex::UInt32
JOGGLEmax::Cdouble
maxoutdone::UInt32
max_outside::Cdouble
max_vertex::Cdouble
min_vertex::Cdouble
NEWfacets::UInt32
NEWtentative::UInt32
findbestnew::UInt32
findbest_notsharp::UInt32
NOerrexit::UInt32
PRINTcradius::Cdouble
PRINTradius::Cdouble
POSTmerging::UInt32
printoutvar::Cint
printoutnum::Cint
repart_facetid::UInt32
retry_addpoint::Cint
QHULLfinished::UInt32
totarea::Cdouble
totvol::Cdouble
visit_id::UInt32
vertex_visit::UInt32
WAScoplanar::UInt32
ZEROall_ok::UInt32
facet_mergeset::Ptr{setT}
degen_mergeset::Ptr{setT}
vertex_mergeset::Ptr{setT}
hash_table::Ptr{setT}
other_points::Ptr{setT}
del_vertices::Ptr{setT}
gm_matrix::Ptr{Cdouble}
gm_row::Ptr{Ptr{Cdouble}}
line::Cstring
maxline::Cint
half_space::Ptr{Cdouble}
temp_malloc::Ptr{Cdouble}
ERREXITcalled::UInt32
firstcentrum::UInt32
old_randomdist::UInt32
coplanarfacetset::Ptr{setT}
last_low::Cdouble
last_high::Cdouble
last_newhigh::Cdouble
lastcpu::Cdouble
lastfacets::Cint
lastmerges::Cint
lastplanes::Cint
lastdist::Cint
lastreport::UInt32
mergereport::Cint
old_tempstack::Ptr{setT}
ridgeoutnum::Cint
last_random::Cint
rbox_errexit::Cint
jmpXtra3::NTuple{40, UInt8}
rbox_isinteger::Cint
rbox_out_offset::Cdouble
cpp_object::Ptr{Cvoid}
cpp_other::Ptr{Cvoid}
cpp_user::Ptr{Cvoid}
qhmem::qhmemT
qhstat::qhstatT
end
const ptr_intT = Clong
const qhDEFset = 1
# Skipping MacroDefinition: SETelemsize ( ( int ) sizeof ( setelemT ) )
# Skipping MacroDefinition: FOREACHsetelement_ ( type , set , variable ) if ( ( ( variable = NULL ) , set ) ) for ( variable ## p = ( type * * ) & ( ( set ) -> e [ 0 ] . p ) ; ( variable = * variable ## p ++ ) ; )
# Skipping MacroDefinition: FOREACHsetelement_i_ ( qh , type , set , variable ) if ( ( ( variable = NULL ) , set ) ) for ( variable ## _i = 0 , variable = ( type * ) ( ( set ) -> e [ 0 ] . p ) , variable ## _n = qh_setsize ( qh , set ) ; variable ## _i < variable ## _n ; variable = ( type * ) ( ( set ) -> e [ ++ variable ## _i ] . p ) )
# Skipping MacroDefinition: FOREACHsetelementreverse_ ( qh , type , set , variable ) if ( ( ( variable = NULL ) , set ) ) for ( variable ## temp = qh_setsize ( qh , set ) - 1 , variable = qh_setlast ( qh , set ) ; variable ; variable = ( ( -- variable ## temp >= 0 ) ? SETelemt_ ( set , variable ## temp , type ) : NULL ) )
# Skipping MacroDefinition: FOREACHsetelementreverse12_ ( type , set , variable ) if ( ( ( variable = NULL ) , set ) ) for ( variable ## p = ( type * * ) & ( ( set ) -> e [ 1 ] . p ) ; ( variable = * variable ## p ) ; variable ## p == ( ( type * * ) & ( ( set ) -> e [ 0 ] . p ) ) ? variable ## p += 2 : ( variable ## p == ( ( type * * ) & ( ( set ) -> e [ 1 ] . p ) ) ? variable ## p -- : variable ## p ++ ) )
# Skipping MacroDefinition: FOREACHelem_ ( set ) FOREACHsetelement_ ( void , set , elem )
# Skipping MacroDefinition: FOREACHset_ ( sets ) FOREACHsetelement_ ( setT , sets , set )
# Skipping MacroDefinition: SETindex_ ( set , elem ) ( ( int ) ( ( void * * ) elem ## p - ( void * * ) & ( set ) -> e [ 1 ] . p ) )
# Skipping MacroDefinition: SETref_ ( elem ) ( elem ## p [ - 1 ] )
# Skipping MacroDefinition: SETelem_ ( set , n ) ( ( set ) -> e [ n ] . p )
# Skipping MacroDefinition: SETelemt_ ( set , n , type ) ( ( type * ) ( ( set ) -> e [ n ] . p ) )
# Skipping MacroDefinition: SETelemaddr_ ( set , n , type ) ( ( type * * ) ( & ( ( set ) -> e [ n ] . p ) ) )
# Skipping MacroDefinition: SETfirst_ ( set ) ( ( set ) -> e [ 0 ] . p )
# Skipping MacroDefinition: SETfirstt_ ( set , type ) ( ( type * ) ( ( set ) -> e [ 0 ] . p ) )
# Skipping MacroDefinition: SETsecond_ ( set ) ( ( set ) -> e [ 1 ] . p )
# Skipping MacroDefinition: SETsecondt_ ( set , type ) ( ( type * ) ( ( set ) -> e [ 1 ] . p ) )
# Skipping MacroDefinition: SETaddr_ ( set , type ) ( ( type * * ) ( & ( ( set ) -> e [ 0 ] . p ) ) )
# Skipping MacroDefinition: SETreturnsize_ ( set , size ) ( ( ( size ) = ( ( set ) -> e [ ( set ) -> maxsize ] . i ) ) ? ( -- ( size ) ) : ( ( size ) = ( set ) -> maxsize ) )
# Skipping MacroDefinition: SETempty_ ( set ) ( ! set || ( SETfirst_ ( set ) ? 0 : 1 ) )
# Skipping MacroDefinition: SETsizeaddr_ ( set ) ( & ( ( set ) -> e [ ( set ) -> maxsize ] ) )
# Skipping MacroDefinition: SETtruncate_ ( set , size ) { set -> e [ set -> maxsize ] . i = size + 1 ; /* maybe overwritten */ set -> e [ size ] . p = NULL ; }
const qhDEFstat = 1
const DEFqhstatT = 1
# Skipping MacroDefinition: zzdef_ ( stype , name , string , cnt ) qh -> qhstat . id [ qh -> qhstat . next ++ ] = name ; qh -> qhstat . doc [ name ] = string ; qh -> qhstat . count [ name ] = cnt ; qh -> qhstat . type [ name ] = stype
# Skipping MacroDefinition: zdef_ ( stype , name , string , cnt ) qh -> qhstat . id [ qh -> qhstat . next ++ ] = name ; qh -> qhstat . doc [ name ] = string ; qh -> qhstat . count [ name ] = cnt ; qh -> qhstat . type [ name ] = stype
# Skipping MacroDefinition: zzinc_ ( id ) { MAYdebugx ; qh -> qhstat . stats [ id ] . i ++ ; }
# Skipping MacroDefinition: zinc_ ( id ) { MAYdebugx ; qh -> qhstat . stats [ id ] . i ++ ; }
# Skipping MacroDefinition: zzadd_ ( id , val ) { MAYdebugx ; qh -> qhstat . stats [ id ] . i += ( val ) ; }
# Skipping MacroDefinition: wwadd_ ( id , val ) { MAYdebugx ; qh -> qhstat . stats [ id ] . r += ( val ) ; }
# Skipping MacroDefinition: zadd_ ( id , val ) { MAYdebugx ; qh -> qhstat . stats [ id ] . i += ( val ) ; }
# Skipping MacroDefinition: wadd_ ( id , val ) { MAYdebugx ; qh -> qhstat . stats [ id ] . r += ( val ) ; }
# Skipping MacroDefinition: zzval_ ( id ) ( ( qh -> qhstat . stats [ id ] ) . i )
# Skipping MacroDefinition: wwval_ ( id ) ( ( qh -> qhstat . stats [ id ] ) . r )
# Skipping MacroDefinition: zval_ ( id ) ( ( qh -> qhstat . stats [ id ] ) . i )
# Skipping MacroDefinition: wval_ ( id ) ( ( qh -> qhstat . stats [ id ] ) . r )
# Skipping MacroDefinition: wwmax_ ( id , val ) { MAYdebugx ; maximize_ ( qh -> qhstat . stats [ id ] . r , ( val ) ) ; }
# Skipping MacroDefinition: zmax_ ( id , val ) { MAYdebugx ; maximize_ ( qh -> qhstat . stats [ id ] . i , ( val ) ) ; }
# Skipping MacroDefinition: wmax_ ( id , val ) { MAYdebugx ; maximize_ ( qh -> qhstat . stats [ id ] . r , ( val ) ) ; }
# Skipping MacroDefinition: zmin_ ( id , val ) { MAYdebugx ; minimize_ ( qh -> qhstat . stats [ id ] . i , ( val ) ) ; }
# Skipping MacroDefinition: wmin_ ( id , val ) { MAYdebugx ; minimize_ ( qh -> qhstat . stats [ id ] . r , ( val ) ) ; }
@cenum qh_statistics::UInt32 begin
Zacoplanar = 0
Wacoplanarmax = 1
Wacoplanartot = 2
Zangle = 3
Wangle = 4
Wanglemax = 5
Wanglemin = 6
Zangletests = 7
Wareatot = 8
Wareamax = 9
Wareamin = 10
Zavoidold = 11
Wavoidoldmax = 12
Wavoidoldtot = 13
Zback0 = 14
Zbestcentrum = 15
Zbestdist = 16
Zbestlower = 17
Zbestlowerall = 18
Zbestloweralln = 19
Zbestlowerv = 20
Zcentrumtests = 21
Zcheckpart = 22
Zcomputefurthest = 23
Zconcave = 24
Wconcavemax = 25
Wconcavetot = 26
Zconcavecoplanar = 27
Wconcavecoplanarmax = 28
Wconcavecoplanartot = 29
Zconcavecoplanarridge = 30
Zconcaveridge = 31
Zconcaveridges = 32
Zcoplanar = 33
Wcoplanarmax = 34
Wcoplanartot = 35
Zcoplanarangle = 36
Zcoplanarcentrum = 37
Zcoplanarhorizon = 38
Zcoplanarinside = 39
Zcoplanarpart = 40
Zcoplanarridges = 41
Wcpu = 42
Zcyclefacetmax = 43
Zcyclefacettot = 44
Zcyclehorizon = 45
Zcyclevertex = 46
Zdegen = 47
Wdegenmax = 48
Wdegentot = 49
Zdegenvertex = 50
Zdelfacetdup = 51
Zdelridge = 52
Zdelvertextot = 53
Zdelvertexmax = 54
Zdetfacetarea = 55
Zdetsimplex = 56
Zdistcheck = 57
Zdistconvex = 58
Zdistgood = 59
Zdistio = 60
Zdistplane = 61
Zdiststat = 62
Zdistvertex = 63
Zdistzero = 64
Zdoc1 = 65
Zdoc2 = 66
Zdoc3 = 67
Zdoc4 = 68
Zdoc5 = 69
Zdoc6 = 70
Zdoc7 = 71
Zdoc8 = 72
Zdoc9 = 73
Zdoc10 = 74
Zdoc11 = 75
Zdoc12 = 76
Zdropdegen = 77
Zdropneighbor = 78
Zdupflip = 79
Zduplicate = 80
Wduplicatemax = 81
Wduplicatetot = 82
Zdupsame = 83
Zflipped = 84
Wflippedmax = 85
Wflippedtot = 86
Zflippedfacets = 87
Zflipridge = 88
Zflipridge2 = 89
Zfindbest = 90
Zfindbestmax = 91
Zfindbesttot = 92
Zfindcoplanar = 93
Zfindfail = 94
Zfindhorizon = 95
Zfindhorizonmax = 96
Zfindhorizontot = 97
Zfindjump = 98
Zfindnew = 99
Zfindnewmax = 100
Zfindnewtot = 101
Zfindnewjump = 102
Zfindnewsharp = 103
Zgauss0 = 104
Zgoodfacet = 105
Zhashlookup = 106
Zhashridge = 107
Zhashridgetest = 108
Zhashtests = 109
Zinsidevisible = 110
Zintersect = 111
Zintersectfail = 112
Zintersectmax = 113
Zintersectnum = 114
Zintersecttot = 115
Zmaxneighbors = 116
Wmaxout = 117
Wmaxoutside = 118
Zmaxridges = 119
Zmaxvertex = 120
Zmaxvertices = 121
Zmaxvneighbors = 122
Zmemfacets = 123
Zmempoints = 124
Zmemridges = 125
Zmemvertices = 126
Zmergeflipdup = 127
Zmergehorizon = 128
Zmergeinittot = 129
Zmergeinitmax = 130
Zmergeinittot2 = 131
Zmergeintocoplanar = 132
Zmergeintohorizon = 133
Zmergenew = 134
Zmergesettot = 135
Zmergesetmax = 136
Zmergesettot2 = 137
Zmergesimplex = 138
Zmergevertex = 139
Wmindenom = 140
Wminvertex = 141
Zminnorm = 142
Zmultiridge = 143
Znearlysingular = 144
Zredundant = 145
Wnewbalance = 146
Wnewbalance2 = 147
Znewbesthorizon = 148
Znewfacettot = 149
Znewfacetmax = 150
Znewvertex = 151
Wnewvertex = 152
Wnewvertexmax = 153
Znewvertexridge = 154
Znoarea = 155
Znonsimplicial = 156
Znowsimplicial = 157
Znotgood = 158
Znotgoodnew = 159
Znotmax = 160
Znumfacets = 161
Znummergemax = 162
Znummergetot = 163
Znumneighbors = 164
Znumridges = 165
Znumvertices = 166
Znumvisibility = 167
Znumvneighbors = 168
Zonehorizon = 169
Zpartangle = 170
Zpartcoplanar = 171
Zpartcorner = 172
Zparthidden = 173
Zpartinside = 174
Zpartition = 175
Zpartitionall = 176
Zpartnear = 177
Zparttwisted = 178
Zpbalance = 179
Wpbalance = 180
Wpbalance2 = 181
Zpinchduplicate = 182
Zpinchedapex = 183
Zpinchedvertex = 184
Zpostfacets = 185
Zpremergetot = 186
Zprocessed = 187
Zremvertex = 188
Zremvertexdel = 189
Zredundantmerge = 190
Zrenameall = 191
Zrenamepinch = 192
Zrenameshare = 193
Zretry = 194
Wretrymax = 195
Zretryadd = 196
Zretryaddmax = 197
Zretryaddtot = 198
Zridge = 199
Wridge = 200
Wridgemax = 201
Zridge0 = 202
Wridge0 = 203
Wridge0max = 204
Zridgemid = 205
Wridgemid = 206
Wridgemidmax = 207
Zridgeok = 208
Wridgeok = 209
Wridgeokmax = 210
Zsearchpoints = 211
Zsetplane = 212
Ztestvneighbor = 213
Ztotcheck = 214
Ztothorizon = 215
Ztotmerge = 216
Ztotpartcoplanar = 217
Ztotpartition = 218
Ztotridges = 219
Ztotvertices = 220
Ztotvisible = 221
Ztricoplanar = 222
Ztricoplanarmax = 223
Ztricoplanartot = 224
Ztridegen = 225
Ztrimirror = 226
Ztrinull = 227
Ztwisted = 228
Wtwistedtot = 229
Wtwistedmax = 230
Ztwistedridge = 231
Zvertextests = 232
Wvertexmax = 233
Wvertexmin = 234
Zvertexridge = 235
Zvertexridgetot = 236
Zvertexridgemax = 237
Zvertices = 238
Zvisfacettot = 239
Zvisfacetmax = 240
Zvisit = 241
Zvisit2max = 242
Zvisvertextot = 243
Zvisvertexmax = 244
Zvvisit = 245
Zvvisit2max = 246
Zwidefacet = 247
Zwidevertices = 248
ZEND = 249
end
@cenum ztypes::UInt32 begin
zdoc = 0
zinc = 1
zadd = 2
zmax = 3
zmin = 4
ZTYPEreal = 5
wadd = 6
wmax = 7
wmin = 8
ZTYPEend = 9
end
const qhDEFlibqhull = 1
const coordT = realT
const pointT = coordT
# Skipping MacroDefinition: flagT unsigned int
# Skipping MacroDefinition: boolT unsigned int
const False = 0
const True = 1
const qh_False = 0
const qh_True = 1
const qh_ALL = True
const qh_NOupper = True
const qh_IScheckmax = True
const qh_ISnewfacets = True
const qh_RESETvisible = True
const qh_ERRnone = 0
const qh_ERRinput = 1
const qh_ERRsingular = 2
const qh_ERRprec = 3
const qh_ERRmem = 4
const qh_ERRqhull = 5
const qh_ERRother = 6
const qh_ERRtopology = 7
const qh_ERRwide = 8
const qh_ERRdebug = 9
# Skipping MacroDefinition: qh_FILEstderr ( ( FILE * ) 1 )
const qh_MAXnummerge = 511
const QHULL_NON_REENTRANT = 0
const QHULL_QH_POINTER = 1
const QHULL_REENTRANT = 2
const QHULL_LIB_TYPE = QHULL_REENTRANT
# Skipping MacroDefinition: QHULL_LIB_CHECK qh_lib_check ( QHULL_LIB_TYPE , sizeof ( qhT ) , sizeof ( vertexT ) , sizeof ( ridgeT ) , sizeof ( facetT ) , sizeof ( setT ) , sizeof ( qhmemT ) ) ;
# Skipping MacroDefinition: QHULL_LIB_CHECK_RBOX qh_lib_check ( QHULL_LIB_TYPE , sizeof ( qhT ) , sizeof ( vertexT ) , sizeof ( ridgeT ) , sizeof ( facetT ) , 0 , 0 ) ;
# Skipping MacroDefinition: otherfacet_ ( ridge , facet ) ( ( ( ridge ) -> top == ( facet ) ) ? ( ridge ) -> bottom : ( ridge ) -> top )
# Skipping MacroDefinition: getid_ ( p ) ( ( p ) ? ( int ) ( ( p ) -> id ) : qh_IDunknown )
# Skipping MacroDefinition: FORALLfacets for ( facet = qh -> facet_list ; facet && facet -> next ; facet = facet -> next )
# Skipping MacroDefinition: FORALLpoints FORALLpoint_ ( qh , qh -> first_point , qh -> num_points )
# Skipping MacroDefinition: FORALLpoint_ ( qh , points , num ) for ( point = ( points ) , pointtemp = ( points ) + qh -> hull_dim * ( num ) ; point < pointtemp ; point += qh -> hull_dim )
# Skipping MacroDefinition: FORALLvertices for ( vertex = qh -> vertex_list ; vertex && vertex -> next ; vertex = vertex -> next )
# Skipping MacroDefinition: FOREACHfacet_ ( facets ) FOREACHsetelement_ ( facetT , facets , facet )
# Skipping MacroDefinition: FOREACHneighbor_ ( facet ) FOREACHsetelement_ ( facetT , facet -> neighbors , neighbor )
# Skipping MacroDefinition: FOREACHpoint_ ( points ) FOREACHsetelement_ ( pointT , points , point )
# Skipping MacroDefinition: FOREACHridge_ ( ridges ) FOREACHsetelement_ ( ridgeT , ridges , ridge )
# Skipping MacroDefinition: FOREACHvertex_ ( vertices ) FOREACHsetelement_ ( vertexT , vertices , vertex )
# Skipping MacroDefinition: FOREACHfacet_i_ ( qh , facets ) FOREACHsetelement_i_ ( qh , facetT , facets , facet )
# Skipping MacroDefinition: FOREACHneighbor_i_ ( qh , facet ) FOREACHsetelement_i_ ( qh , facetT , facet -> neighbors , neighbor )
# Skipping MacroDefinition: FOREACHpoint_i_ ( qh , points ) FOREACHsetelement_i_ ( qh , pointT , points , point )
# Skipping MacroDefinition: FOREACHridge_i_ ( qh , ridges ) FOREACHsetelement_i_ ( qh , ridgeT , ridges , ridge )
# Skipping MacroDefinition: FOREACHvertex_i_ ( qh , vertices ) FOREACHsetelement_i_ ( qh , vertexT , vertices , vertex )
@cenum qh_pointT::Int32 begin
qh_IDnone = -3
qh_IDinterior = -2
qh_IDunknown = -1
end
struct ANONYMOUS2_f
area::Cdouble
end
# Julia wrapper for header: user_r.h
# Automatically generated using Clang.jl
# Julia wrapper for header: mem_r.h
# Automatically generated using Clang.jl
function qh_memalloc(qh, insize)
ccall((:qh_memalloc, libqhull_r), Ptr{Cvoid}, (Ptr{qhT}, Cint), qh, insize)
end
function qh_memcheck(qh)
ccall((:qh_memcheck, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_memfree(qh, object, insize)
ccall((:qh_memfree, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cvoid}, Cint), qh, object, insize)
end
function qh_memfreeshort(qh, curlong, totlong)
ccall((:qh_memfreeshort, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}, Ptr{Cint}), qh, curlong, totlong)
end
function qh_meminit(qh, ferr)
ccall((:qh_meminit, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}), qh, ferr)
end
function qh_meminitbuffers(qh, tracelevel, alignment, numsizes, bufsize, bufinit)
ccall((:qh_meminitbuffers, libqhull_r), Cvoid, (Ptr{qhT}, Cint, Cint, Cint, Cint, Cint), qh, tracelevel, alignment, numsizes, bufsize, bufinit)
end
function qh_memsetup(qh)
ccall((:qh_memsetup, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_memsize(qh, size)
ccall((:qh_memsize, libqhull_r), Cvoid, (Ptr{qhT}, Cint), qh, size)
end
function qh_memstatistics(qh, fp)
ccall((:qh_memstatistics, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}), qh, fp)
end
function qh_memtotal(qh, totlong, curlong, totshort, curshort, maxlong, totbuffer)
ccall((:qh_memtotal, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}), qh, totlong, curlong, totshort, curshort, maxlong, totbuffer)
end
# Julia wrapper for header: qset_r.h
# Automatically generated using Clang.jl
function qh_setaddsorted(qh, setp, elem)
ccall((:qh_setaddsorted, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Ptr{setT}}, Ptr{Cvoid}), qh, setp, elem)
end
function qh_setaddnth(qh, setp, nth, newelem)
ccall((:qh_setaddnth, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Ptr{setT}}, Cint, Ptr{Cvoid}), qh, setp, nth, newelem)
end
function qh_setappend(qh, setp, elem)
ccall((:qh_setappend, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Ptr{setT}}, Ptr{Cvoid}), qh, setp, elem)
end
function qh_setappend_set(qh, setp, setA)
ccall((:qh_setappend_set, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Ptr{setT}}, Ptr{setT}), qh, setp, setA)
end
function qh_setappend2ndlast(qh, setp, elem)
ccall((:qh_setappend2ndlast, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Ptr{setT}}, Ptr{Cvoid}), qh, setp, elem)
end
function qh_setcheck(qh, set, tname, id)
ccall((:qh_setcheck, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{setT}, Cstring, UInt32), qh, set, tname, id)
end
function qh_setcompact(qh, set)
ccall((:qh_setcompact, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{setT}), qh, set)
end
function qh_setcopy(qh, set, extra)
ccall((:qh_setcopy, libqhull_r), Ptr{setT}, (Ptr{qhT}, Ptr{setT}, Cint), qh, set, extra)
end
function qh_setdel(set, elem)
ccall((:qh_setdel, libqhull_r), Ptr{Cvoid}, (Ptr{setT}, Ptr{Cvoid}), set, elem)
end
function qh_setdellast(set)
ccall((:qh_setdellast, libqhull_r), Ptr{Cvoid}, (Ptr{setT},), set)
end
function qh_setdelnth(qh, set, nth)
ccall((:qh_setdelnth, libqhull_r), Ptr{Cvoid}, (Ptr{qhT}, Ptr{setT}, Cint), qh, set, nth)
end
function qh_setdelnthsorted(qh, set, nth)
ccall((:qh_setdelnthsorted, libqhull_r), Ptr{Cvoid}, (Ptr{qhT}, Ptr{setT}, Cint), qh, set, nth)
end
function qh_setdelsorted(set, newelem)
ccall((:qh_setdelsorted, libqhull_r), Ptr{Cvoid}, (Ptr{setT}, Ptr{Cvoid}), set, newelem)
end
function qh_setduplicate(qh, set, elemsize)
ccall((:qh_setduplicate, libqhull_r), Ptr{setT}, (Ptr{qhT}, Ptr{setT}, Cint), qh, set, elemsize)
end
function qh_setendpointer(set)
ccall((:qh_setendpointer, libqhull_r), Ptr{Ptr{Cvoid}}, (Ptr{setT},), set)
end
function qh_setequal(setA, setB)
ccall((:qh_setequal, libqhull_r), Cint, (Ptr{setT}, Ptr{setT}), setA, setB)
end
function qh_setequal_except(setA, skipelemA, setB, skipelemB)
ccall((:qh_setequal_except, libqhull_r), Cint, (Ptr{setT}, Ptr{Cvoid}, Ptr{setT}, Ptr{Cvoid}), setA, skipelemA, setB, skipelemB)
end
function qh_setequal_skip(setA, skipA, setB, skipB)
ccall((:qh_setequal_skip, libqhull_r), Cint, (Ptr{setT}, Cint, Ptr{setT}, Cint), setA, skipA, setB, skipB)
end
function qh_setfree(qh, set)
ccall((:qh_setfree, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Ptr{setT}}), qh, set)
end
function qh_setfree2(qh, setp, elemsize)
ccall((:qh_setfree2, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Ptr{setT}}, Cint), qh, setp, elemsize)
end
function qh_setfreelong(qh, set)
ccall((:qh_setfreelong, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Ptr{setT}}), qh, set)
end
function qh_setin(set, setelem)
ccall((:qh_setin, libqhull_r), Cint, (Ptr{setT}, Ptr{Cvoid}), set, setelem)
end
function qh_setindex(set, setelem)
ccall((:qh_setindex, libqhull_r), Cint, (Ptr{setT}, Ptr{Cvoid}), set, setelem)
end
function qh_setlarger(qh, setp)
ccall((:qh_setlarger, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Ptr{setT}}), qh, setp)
end
function qh_setlarger_quick(qh, setsize, newsize)
ccall((:qh_setlarger_quick, libqhull_r), Cint, (Ptr{qhT}, Cint, Ptr{Cint}), qh, setsize, newsize)
end
function qh_setlast(set)
ccall((:qh_setlast, libqhull_r), Ptr{Cvoid}, (Ptr{setT},), set)
end
function qh_setnew(qh, size)
ccall((:qh_setnew, libqhull_r), Ptr{setT}, (Ptr{qhT}, Cint), qh, size)
end
function qh_setnew_delnthsorted(qh, set, size, nth, prepend)
ccall((:qh_setnew_delnthsorted, libqhull_r), Ptr{setT}, (Ptr{qhT}, Ptr{setT}, Cint, Cint, Cint), qh, set, size, nth, prepend)
end
function qh_setprint(qh, fp, string, set)
ccall((:qh_setprint, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}, Cstring, Ptr{setT}), qh, fp, string, set)
end
function qh_setreplace(qh, set, oldelem, newelem)
ccall((:qh_setreplace, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{setT}, Ptr{Cvoid}, Ptr{Cvoid}), qh, set, oldelem, newelem)
end
function qh_setsize(qh, set)
ccall((:qh_setsize, libqhull_r), Cint, (Ptr{qhT}, Ptr{setT}), qh, set)
end
function qh_settemp(qh, setsize)
ccall((:qh_settemp, libqhull_r), Ptr{setT}, (Ptr{qhT}, Cint), qh, setsize)
end
function qh_settempfree(qh, set)
ccall((:qh_settempfree, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Ptr{setT}}), qh, set)
end
function qh_settempfree_all(qh)
ccall((:qh_settempfree_all, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_settemppop(qh)
ccall((:qh_settemppop, libqhull_r), Ptr{setT}, (Ptr{qhT},), qh)
end
function qh_settemppush(qh, set)
ccall((:qh_settemppush, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{setT}), qh, set)
end
function qh_settruncate(qh, set, size)
ccall((:qh_settruncate, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{setT}, Cint), qh, set, size)
end
function qh_setunique(qh, set, elem)
ccall((:qh_setunique, libqhull_r), Cint, (Ptr{qhT}, Ptr{Ptr{setT}}, Ptr{Cvoid}), qh, set, elem)
end
function qh_setzero(qh, set, idx, size)
ccall((:qh_setzero, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{setT}, Cint, Cint), qh, set, idx, size)
end
# Julia wrapper for header: stat_r.h
# Automatically generated using Clang.jl
function qh_allstatA(qh)
ccall((:qh_allstatA, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_allstatB(qh)
ccall((:qh_allstatB, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_allstatC(qh)
ccall((:qh_allstatC, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_allstatD(qh)
ccall((:qh_allstatD, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_allstatE(qh)
ccall((:qh_allstatE, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_allstatE2(qh)
ccall((:qh_allstatE2, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_allstatF(qh)
ccall((:qh_allstatF, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_allstatG(qh)
ccall((:qh_allstatG, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_allstatH(qh)
ccall((:qh_allstatH, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_allstatI(qh)
ccall((:qh_allstatI, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_allstatistics(qh)
ccall((:qh_allstatistics, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_collectstatistics(qh)
ccall((:qh_collectstatistics, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_initstatistics(qh)
ccall((:qh_initstatistics, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_newstats()
ccall((:qh_newstats, libqhull_r), Cint, ())
end
function qh_nostatistic()
ccall((:qh_nostatistic, libqhull_r), Cint, ())
end
function qh_printallstatistics(qh, fp, string)
ccall((:qh_printallstatistics, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}, Cstring), qh, fp, string)
end
function qh_printstatistics(qh, fp, string)
ccall((:qh_printstatistics, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}, Cstring), qh, fp, string)
end
function qh_printstatlevel(qh, fp, id)
ccall((:qh_printstatlevel, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}, Cint), qh, fp, id)
end
function qh_printstats(qh, fp, idx, nextindex)
ccall((:qh_printstats, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}, Cint, Ptr{Cint}), qh, fp, idx, nextindex)
end
function qh_stddev()
ccall((:qh_stddev, libqhull_r), Cint, ())
end
# Julia wrapper for header: libqhull_r.h
# Automatically generated using Clang.jl
function qh_qhull(qh)
ccall((:qh_qhull, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_addpoint(qh, furthest, facet, checkdist)
ccall((:qh_addpoint, libqhull_r), UInt32, (Ptr{qhT}, Ptr{Cdouble}, Ptr{facetT}, UInt32), qh, furthest, facet, checkdist)
end
function qh_errexit2(qh, exitcode, facet, otherfacet)
ccall((:qh_errexit2, libqhull_r), Cvoid, (Ptr{qhT}, Cint, Ptr{facetT}, Ptr{facetT}), qh, exitcode, facet, otherfacet)
end
function qh_printsummary(qh, fp)
ccall((:qh_printsummary, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}), qh, fp)
end
function qh_errexit(qh, exitcode, facet, ridge)
ccall((:qh_errexit, libqhull_r), Cvoid, (Ptr{qhT}, Cint, Ptr{facetT}, Ptr{ridgeT}), qh, exitcode, facet, ridge)
end
function qh_errprint(qh, string, atfacet, otherfacet, atridge, atvertex)
ccall((:qh_errprint, libqhull_r), Cvoid, (Ptr{qhT}, Cstring, Ptr{facetT}, Ptr{facetT}, Ptr{ridgeT}, Ptr{vertexT}), qh, string, atfacet, otherfacet, atridge, atvertex)
end
function qh_new_qhull(qh, dim, numpoints, points, ismalloc, qhull_cmd, outfile, errfile)
ccall((:qh_new_qhull, libqhull_r), Cint, (Ptr{qhT}, Cint, Cint, Ptr{Cdouble}, UInt32, Cstring, Ptr{Cint}, Ptr{Cint}), qh, dim, numpoints, points, ismalloc, qhull_cmd, outfile, errfile)
end
function qh_printfacetlist(qh, facetlist, facets, printall)
ccall((:qh_printfacetlist, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{facetT}, Ptr{setT}, UInt32), qh, facetlist, facets, printall)
end
function qh_printhelp_degenerate(qh, fp)
ccall((:qh_printhelp_degenerate, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}), qh, fp)
end
function qh_printhelp_internal(qh, fp)
ccall((:qh_printhelp_internal, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}), qh, fp)
end
function qh_printhelp_narrowhull(qh, fp, minangle)
ccall((:qh_printhelp_narrowhull, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}, Cdouble), qh, fp, minangle)
end
function qh_printhelp_singular(qh, fp)
ccall((:qh_printhelp_singular, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}), qh, fp)
end
function qh_printhelp_topology(qh, fp)
ccall((:qh_printhelp_topology, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}), qh, fp)
end
function qh_printhelp_wide(qh, fp)
ccall((:qh_printhelp_wide, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}), qh, fp)
end
function qh_user_memsizes(qh)
ccall((:qh_user_memsizes, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_exit(exitcode)
ccall((:qh_exit, libqhull_r), Cvoid, (Cint,), exitcode)
end
function qh_free(mem)
ccall((:qh_free, libqhull_r), Cvoid, (Ptr{Cvoid},), mem)
end
function qh_malloc(size)
ccall((:qh_malloc, libqhull_r), Ptr{Cvoid}, (Cint,), size)
end
function qh_findbest(qh, point, startfacet, bestoutside, newfacets, noupper, dist, isoutside, numpart)
ccall((:qh_findbest, libqhull_r), Ptr{facetT}, (Ptr{qhT}, Ptr{Cdouble}, Ptr{facetT}, UInt32, UInt32, UInt32, Ptr{Cdouble}, Ptr{UInt32}, Ptr{Cint}), qh, point, startfacet, bestoutside, newfacets, noupper, dist, isoutside, numpart)
end
function qh_findbestnew(qh, point, startfacet, dist, bestoutside, isoutside, numpart)
ccall((:qh_findbestnew, libqhull_r), Ptr{facetT}, (Ptr{qhT}, Ptr{Cdouble}, Ptr{facetT}, Ptr{Cdouble}, UInt32, Ptr{UInt32}, Ptr{Cint}), qh, point, startfacet, dist, bestoutside, isoutside, numpart)
end
function qh_gram_schmidt(qh, dim, rows)
ccall((:qh_gram_schmidt, libqhull_r), UInt32, (Ptr{qhT}, Cint, Ptr{Ptr{Cdouble}}), qh, dim, rows)
end
function qh_outerinner(qh, facet, outerplane, innerplane)
ccall((:qh_outerinner, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{facetT}, Ptr{Cdouble}, Ptr{Cdouble}), qh, facet, outerplane, innerplane)
end
function qh_projectinput(qh)
ccall((:qh_projectinput, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_randommatrix(qh, buffer, dim, row)
ccall((:qh_randommatrix, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cdouble}, Cint, Ptr{Ptr{Cdouble}}), qh, buffer, dim, row)
end
function qh_rotateinput(qh, rows)
ccall((:qh_rotateinput, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Ptr{Cdouble}}), qh, rows)
end
function qh_scaleinput(qh)
ccall((:qh_scaleinput, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_setdelaunay(qh, dim, count, points)
ccall((:qh_setdelaunay, libqhull_r), Cvoid, (Ptr{qhT}, Cint, Cint, Ptr{Cdouble}), qh, dim, count, points)
end
function qh_sethalfspace_all(qh, dim, count, halfspaces, feasible)
ccall((:qh_sethalfspace_all, libqhull_r), Ptr{Cdouble}, (Ptr{qhT}, Cint, Cint, Ptr{Cdouble}, Ptr{Cdouble}), qh, dim, count, halfspaces, feasible)
end
function qh_clock(qh)
ccall((:qh_clock, libqhull_r), Culong, (Ptr{qhT},), qh)
end
function qh_checkflags(qh, command, hiddenflags)
ccall((:qh_checkflags, libqhull_r), Cvoid, (Ptr{qhT}, Cstring, Cstring), qh, command, hiddenflags)
end
function qh_clear_outputflags(qh)
ccall((:qh_clear_outputflags, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_freebuffers(qh)
ccall((:qh_freebuffers, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_freeqhull(qh, allmem)
ccall((:qh_freeqhull, libqhull_r), Cvoid, (Ptr{qhT}, UInt32), qh, allmem)
end
function qh_init_A(qh, infile, outfile, errfile, argc, argv)
ccall((:qh_init_A, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Cint, Ptr{Cstring}), qh, infile, outfile, errfile, argc, argv)
end
function qh_init_B(qh, points, numpoints, dim, ismalloc)
ccall((:qh_init_B, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cdouble}, Cint, Cint, UInt32), qh, points, numpoints, dim, ismalloc)
end
function qh_init_qhull_command(qh, argc, argv)
ccall((:qh_init_qhull_command, libqhull_r), Cvoid, (Ptr{qhT}, Cint, Ptr{Cstring}), qh, argc, argv)
end
function qh_initbuffers(qh, points, numpoints, dim, ismalloc)
ccall((:qh_initbuffers, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cdouble}, Cint, Cint, UInt32), qh, points, numpoints, dim, ismalloc)
end
function qh_initflags(qh, command)
ccall((:qh_initflags, libqhull_r), Cvoid, (Ptr{qhT}, Cstring), qh, command)
end
function qh_initqhull_buffers(qh)
ccall((:qh_initqhull_buffers, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_initqhull_globals(qh, points, numpoints, dim, ismalloc)
ccall((:qh_initqhull_globals, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cdouble}, Cint, Cint, UInt32), qh, points, numpoints, dim, ismalloc)
end
function qh_initqhull_mem(qh)
ccall((:qh_initqhull_mem, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_initqhull_outputflags(qh)
ccall((:qh_initqhull_outputflags, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_initqhull_start(qh, infile, outfile, errfile)
ccall((:qh_initqhull_start, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}), qh, infile, outfile, errfile)
end
function qh_initqhull_start2(qh, infile, outfile, errfile)
ccall((:qh_initqhull_start2, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}), qh, infile, outfile, errfile)
end
function qh_initthresholds(qh, command)
ccall((:qh_initthresholds, libqhull_r), Cvoid, (Ptr{qhT}, Cstring), qh, command)
end
function qh_lib_check(qhullLibraryType, qhTsize, vertexTsize, ridgeTsize, facetTsize, setTsize, qhmemTsize)
ccall((:qh_lib_check, libqhull_r), Cvoid, (Cint, Cint, Cint, Cint, Cint, Cint, Cint), qhullLibraryType, qhTsize, vertexTsize, ridgeTsize, facetTsize, setTsize, qhmemTsize)
end
function qh_option(qh, option, i, r)
ccall((:qh_option, libqhull_r), Cvoid, (Ptr{qhT}, Cstring, Ptr{Cint}, Ptr{Cdouble}), qh, option, i, r)
end
function qh_zero(qh, errfile)
ccall((:qh_zero, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}), qh, errfile)
end
function qh_dfacet(qh, id)
ccall((:qh_dfacet, libqhull_r), Cvoid, (Ptr{qhT}, UInt32), qh, id)
end
function qh_dvertex(qh, id)
ccall((:qh_dvertex, libqhull_r), Cvoid, (Ptr{qhT}, UInt32), qh, id)
end
function qh_printneighborhood(qh, fp, format, facetA, facetB, printall)
ccall((:qh_printneighborhood, libqhull_r), Cvoid, (Ptr{qhT}, Ptr{Cint}, qh_PRINT, Ptr{facetT}, Ptr{facetT}, UInt32), qh, fp, format, facetA, facetB, printall)
end
function qh_produce_output(qh)
ccall((:qh_produce_output, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_readpoints(qh, numpoints, dimension, ismalloc)
ccall((:qh_readpoints, libqhull_r), Ptr{Cdouble}, (Ptr{qhT}, Ptr{Cint}, Ptr{Cint}, Ptr{UInt32}), qh, numpoints, dimension, ismalloc)
end
function qh_check_output(qh)
ccall((:qh_check_output, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_check_points(qh)
ccall((:qh_check_points, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_facetvertices(qh, facetlist, facets, allfacets)
ccall((:qh_facetvertices, libqhull_r), Ptr{setT}, (Ptr{qhT}, Ptr{facetT}, Ptr{setT}, UInt32), qh, facetlist, facets, allfacets)
end
function qh_findbestfacet(qh, point, bestoutside, bestdist, isoutside)
ccall((:qh_findbestfacet, libqhull_r), Ptr{facetT}, (Ptr{qhT}, Ptr{Cdouble}, UInt32, Ptr{Cdouble}, Ptr{UInt32}), qh, point, bestoutside, bestdist, isoutside)
end
function qh_nearvertex(qh, facet, point, bestdistp)
ccall((:qh_nearvertex, libqhull_r), Ptr{vertexT}, (Ptr{qhT}, Ptr{facetT}, Ptr{Cdouble}, Ptr{Cdouble}), qh, facet, point, bestdistp)
end
function qh_point(qh, id)
ccall((:qh_point, libqhull_r), Ptr{Cdouble}, (Ptr{qhT}, Cint), qh, id)
end
function qh_pointfacet(qh)
ccall((:qh_pointfacet, libqhull_r), Ptr{setT}, (Ptr{qhT},), qh)
end
function qh_pointid(qh, point)
ccall((:qh_pointid, libqhull_r), Cint, (Ptr{qhT}, Ptr{Cdouble}), qh, point)
end
function qh_pointvertex(qh)
ccall((:qh_pointvertex, libqhull_r), Ptr{setT}, (Ptr{qhT},), qh)
end
function qh_setvoronoi_all(qh)
ccall((:qh_setvoronoi_all, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_triangulate(qh)
ccall((:qh_triangulate, libqhull_r), Cvoid, (Ptr{qhT},), qh)
end
function qh_rboxpoints(qh, rbox_command)
ccall((:qh_rboxpoints, libqhull_r), Cint, (Ptr{qhT}, Cstring), qh, rbox_command)
end
function qh_errexit_rbox(qh, exitcode)
ccall((:qh_errexit_rbox, libqhull_r), Cvoid, (Ptr{qhT}, Cint), qh, exitcode)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment