bindings-gts (empty) → 0.0.1
raw patch · 5 files changed
+565/−0 lines, 5 filesdep +basedep +bindings-DSLdep +bindings-glibsetup-changed
Dependencies added: base, bindings-DSL, bindings-glib, bindings-gobject
Files
- LICENSE +165/−0
- Setup.hs +2/−0
- bindings-gts.cabal +40/−0
- src/Bindings/GTS.hsc +338/−0
- src/Bindings/GTS_inline.c +20/−0
+ LICENSE view
@@ -0,0 +1,165 @@+ GNU LESSER GENERAL PUBLIC LICENSE+ Version 3, 29 June 2007++ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>+ Everyone is permitted to copy and distribute verbatim copies+ of this license document, but changing it is not allowed.+++ This version of the GNU Lesser General Public License incorporates+the terms and conditions of version 3 of the GNU General Public+License, supplemented by the additional permissions listed below.++ 0. Additional Definitions. ++ As used herein, "this License" refers to version 3 of the GNU Lesser+General Public License, and the "GNU GPL" refers to version 3 of the GNU+General Public License.++ "The Library" refers to a covered work governed by this License,+other than an Application or a Combined Work as defined below.++ An "Application" is any work that makes use of an interface provided+by the Library, but which is not otherwise based on the Library.+Defining a subclass of a class defined by the Library is deemed a mode+of using an interface provided by the Library.++ A "Combined Work" is a work produced by combining or linking an+Application with the Library. The particular version of the Library+with which the Combined Work was made is also called the "Linked+Version".++ The "Minimal Corresponding Source" for a Combined Work means the+Corresponding Source for the Combined Work, excluding any source code+for portions of the Combined Work that, considered in isolation, are+based on the Application, and not on the Linked Version.++ The "Corresponding Application Code" for a Combined Work means the+object code and/or source code for the Application, including any data+and utility programs needed for reproducing the Combined Work from the+Application, but excluding the System Libraries of the Combined Work.++ 1. Exception to Section 3 of the GNU GPL.++ You may convey a covered work under sections 3 and 4 of this License+without being bound by section 3 of the GNU GPL.++ 2. Conveying Modified Versions.++ If you modify a copy of the Library, and, in your modifications, a+facility refers to a function or data to be supplied by an Application+that uses the facility (other than as an argument passed when the+facility is invoked), then you may convey a copy of the modified+version:++ a) under this License, provided that you make a good faith effort to+ ensure that, in the event an Application does not supply the+ function or data, the facility still operates, and performs+ whatever part of its purpose remains meaningful, or++ b) under the GNU GPL, with none of the additional permissions of+ this License applicable to that copy.++ 3. Object Code Incorporating Material from Library Header Files.++ The object code form of an Application may incorporate material from+a header file that is part of the Library. You may convey such object+code under terms of your choice, provided that, if the incorporated+material is not limited to numerical parameters, data structure+layouts and accessors, or small macros, inline functions and templates+(ten or fewer lines in length), you do both of the following:++ a) Give prominent notice with each copy of the object code that the+ Library is used in it and that the Library and its use are+ covered by this License.++ b) Accompany the object code with a copy of the GNU GPL and this license+ document.++ 4. Combined Works.++ You may convey a Combined Work under terms of your choice that,+taken together, effectively do not restrict modification of the+portions of the Library contained in the Combined Work and reverse+engineering for debugging such modifications, if you also do each of+the following:++ a) Give prominent notice with each copy of the Combined Work that+ the Library is used in it and that the Library and its use are+ covered by this License.++ b) Accompany the Combined Work with a copy of the GNU GPL and this license+ document.++ c) For a Combined Work that displays copyright notices during+ execution, include the copyright notice for the Library among+ these notices, as well as a reference directing the user to the+ copies of the GNU GPL and this license document.++ d) Do one of the following:++ 0) Convey the Minimal Corresponding Source under the terms of this+ License, and the Corresponding Application Code in a form+ suitable for, and under terms that permit, the user to+ recombine or relink the Application with a modified version of+ the Linked Version to produce a modified Combined Work, in the+ manner specified by section 6 of the GNU GPL for conveying+ Corresponding Source.++ 1) Use a suitable shared library mechanism for linking with the+ Library. A suitable mechanism is one that (a) uses at run time+ a copy of the Library already present on the user's computer+ system, and (b) will operate properly with a modified version+ of the Library that is interface-compatible with the Linked+ Version. ++ e) Provide Installation Information, but only if you would otherwise+ be required to provide such information under section 6 of the+ GNU GPL, and only to the extent that such information is+ necessary to install and execute a modified version of the+ Combined Work produced by recombining or relinking the+ Application with a modified version of the Linked Version. (If+ you use option 4d0, the Installation Information must accompany+ the Minimal Corresponding Source and Corresponding Application+ Code. If you use option 4d1, you must provide the Installation+ Information in the manner specified by section 6 of the GNU GPL+ for conveying Corresponding Source.)++ 5. Combined Libraries.++ You may place library facilities that are a work based on the+Library side by side in a single library together with other library+facilities that are not Applications and are not covered by this+License, and convey such a combined library under terms of your+choice, if you do both of the following:++ a) Accompany the combined library with a copy of the same work based+ on the Library, uncombined with any other library facilities,+ conveyed under the terms of this License.++ b) Give prominent notice with the combined library that part of it+ is a work based on the Library, and explaining where to find the+ accompanying uncombined form of the same work.++ 6. Revised Versions of the GNU Lesser General Public License.++ The Free Software Foundation may publish revised and/or new versions+of the GNU Lesser General Public License from time to time. Such new+versions will be similar in spirit to the present version, but may+differ in detail to address new problems or concerns.++ Each version is given a distinguishing version number. If the+Library as you received it specifies that a certain numbered version+of the GNU Lesser General Public License "or any later version"+applies to it, you have the option of following the terms and+conditions either of that published version or of any later version+published by the Free Software Foundation. If the Library as you+received it does not specify a version number of the GNU Lesser+General Public License, you may choose any version of the GNU Lesser+General Public License ever published by the Free Software Foundation.++ If the Library as you received it specifies that a proxy can decide+whether future versions of the GNU Lesser General Public License shall+apply, that proxy's public statement of acceptance of any version is+permanent authorization for you to choose that version for the+Library.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ bindings-gts.cabal view
@@ -0,0 +1,40 @@+cabal-version: >= 1.4+name: bindings-gts+homepage: http://gts.sourceforge.net/+synopsis:+ Low level bindings supporting GTS, the GNU Triangulated Surface Library+description:+ This package contains bindings to GTS library using+ bindings-DSL macros and style. Like GObject, it's+ not useful by itself, but as a foundation for other+ libraries making use of its type system. NOTE: these bindings+ were not made by the author(s) of GTS so please don't bug them+ about issues with the bindings! Any errors in these bindings + are my responsibility not that of the GTS team. Not all functionality+ is covered by these bindings at this time, but there should be enough+ to be useful.+version: 0.0.1+license: LGPL-3+license-file: LICENSE+maintainer: Joel Crisp <joel.a.crisp@googlemail.com>+author: Maurício C. Antunes (Bindings-DSL), Joel Crisp (Bindings-GTS), Stephane Popinet <s.popinet at niwa.co.nz> (GTS) +build-type: Simple+stability: prototype+category: FFI+library+ hs-source-dirs: src+ c-sources: src/Bindings/GTS_inline.c+ include-dirs: src/Bindings+ extensions:+ ForeignFunctionInterface+ build-depends:+ base >= 3 && < 5,+ bindings-DSL >= 1.0.6 && < 1.1,+ bindings-glib >= 0.1.3 && < 0.2,+ bindings-gobject >= 0.2.1 && < 1.0 + include-dirs: src+ exposed-modules:+ Bindings.GTS+ pkgconfig-depends: gobject-2.0 >= 2.24.1, gthread-2.0 >= 2.24.1, gmodule-2.0 >=2.24.1, gts >=0.7.6++
+ src/Bindings/GTS.hsc view
@@ -0,0 +1,338 @@+#include <bindings.dsl.h>+#define USE_SURFACE_BTREE+#include <stdio.h>+#include <gts.h>+#include "GTS_inline.h"++-- Bindings DSL file for the Gnu Triangulated Surface Library+-- REMEMBER ForeignPtr for garbage collection!++module Bindings.GTS where +#strict_import+import Bindings.GObject+import Bindings.GLib.Fundamentals+import Bindings.GLib.Fundamentals.BasicTypes++#cinline GTS_CHECK_VERSION, <guint> -> <guint> -> <guint> -> IO <gboolean>++#starttype GSList+#field data, <gpointer>+#field next, Ptr <GSList>+#stoptype++#ccall g_slist_alloc, IO (Ptr <GSList>)+#ccall g_slist_free, Ptr <GSList> -> IO ()+#ccall g_slist_free_1, Ptr <GSList> -> IO ()+#cinline g_slist_next, Ptr <GSList> -> IO (Ptr <GSList>)+#ccall g_slist_last, Ptr <GSList> -> IO (Ptr <GSList>)+#ccall g_slist_length, Ptr <GSList> -> IO <guint>+#ccall g_slist_nth, Ptr <GSList> -> <guint> -> IO (Ptr <GSList>)+#ccall g_slist_append, Ptr <GSList> -> <gpointer> -> IO (Ptr <GSList>)++#callback GtsObjectClassInitFunc, Ptr <GtsObjectClass> -> IO ()+#callback GtsObjectInitFunc, Ptr <GtsObject> -> IO ()+#callback GtsArgSetFunc, Ptr <GtsObject> -> IO ()+#callback GtsArgGetFunc, Ptr <GtsObject> -> IO ()++#num GTS_CLASS_NAME_LENGTH ++#starttype GtsVector+#stoptype++#starttype GtsMatrix+#stoptype++#ccall gts_matrix_new,<gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> IO (Ptr <GtsMatrix>)+#ccall gts_matrix_assign,Ptr <GtsMatrix> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> <gdouble> -> IO (Ptr <GtsMatrix>)+#ccall gts_matrix_destroy,Ptr <GtsMatrix> -> IO ()+#ccall gts_matrix_zero,Ptr <GtsMatrix> -> IO (Ptr <GtsMatrix>)+#ccall gts_matrix_identity,Ptr <GtsMatrix> -> IO (Ptr <GtsMatrix>)+#ccall gts_matrix_transpose,Ptr <GtsMatrix> -> IO (Ptr <GtsMatrix>)+#ccall gts_matrix_inverse,Ptr <GtsMatrix> -> IO (Ptr <GtsMatrix>)+#ccall gts_matrix_product, Ptr <GtsMatrix> -> Ptr <GtsMatrix> -> IO (Ptr <GtsMatrix>)+#ccall gts_matrix_scale, Ptr <GtsMatrix> -> Ptr <GtsVector> -> IO (Ptr <GtsMatrix>)+#ccall gts_matrix_translate, Ptr <GtsMatrix> -> Ptr <GtsVector> -> IO (Ptr <GtsMatrix>)+#ccall gts_matrix_rotate, Ptr <GtsMatrix> -> Ptr <GtsVector> -> <gdouble> -> IO (Ptr <GtsMatrix>)++#starttype GtsColor+#field r, <gfloat>+#field g, <gfloat>+#field b, <gfloat>+#stoptype++#callback GtsFunc, <gpointer> -> <gpointer> -> IO <gint>++#starttype GtsFile+#field line,<guint>+#field pos,<guint>+#field error,Ptr <gchar>+#stoptype++#starttype GtsFileVariable+#stoptype++#ccall fopen,CString -> CString -> IO (Ptr CFile)+#ccall fclose, Ptr CFile -> IO Int+#ccall gts_file_new, Ptr CFile -> IO (Ptr <GtsFile>)+#ccall gts_file_new_from_string, Ptr <gchar> -> IO ( Ptr <GtsFile>)+#ccall gts_file_getc, Ptr <GtsFile> -> IO <gint>+#ccall gts_file_destroy, IO (Ptr <GtsFile>)++-- #cinline GTS_OBJECT_FLAGS, Ptr <GtsObject> -> <guint32>++#starttype GtsObjectClassInfo+#array_field name,<gchar>+#field object_size,<guint>+#field class_size,<guint>+#stoptype++#starttype GtsObjectClass+#field info,<GtsObjectClassInfo>+#field parent_class,Ptr <GtsObjectClass>+#stoptype++#starttype GtsObject+#field klass, Ptr <GtsObjectClass>+#field flags, <guint32>+#stoptype++#starttype GtsPointClass+#field parent_class, <GtsObjectClass>+#field binary, <gboolean>+#stoptype++#starttype GtsPoint+#field object, Ptr <GtsObject>+#field x,<gdouble>+#field y,<gdouble>+#field z,<gdouble>+#stoptype++#ccall gts_object_class, IO <gpointer>+#ccall gts_object_class_new, Ptr <GtsObjectClass> -> Ptr <GtsObjectClassInfo> -> IO <gpointer>+#ccall gts_object_check_cast, <gpointer> -> <gpointer> -> IO <gpointer>+#ccall gts_object_class_check_cast, <gpointer> -> <gpointer> -> IO <gpointer>+-- #cinline gts_object_is_from_class, <gpointer> -> <gpointer> -> IO <gpointer>+-- #cinline gts_object_class_is_from_class, <gpointer> -> <gpointer> -> IO <gpointer>+#ccall gts_object_class_from_name,Ptr <gchar> -> IO (Ptr <GtsObjectClass>)++#starttype GtsRange+#field min, <gdouble>+#field max, <gdouble>+#field sum, <gdouble>+#field sum2, <gdouble>+#field mean, <gdouble>+#field stddev, <gdouble>+#field n,<guint>+#stoptype++#starttype GtsSegment+#stoptype++#starttype GtsTriangleClass+#stoptype++#starttype GtsTriangle+#field e1, Ptr <GtsEdge>+#field e2, Ptr <GtsEdge>+#field e3, Ptr <GtsEdge>+#stoptype++#ccall gts_triangle_enclosing, Ptr <GtsTriangleClass> -> Ptr <GSList> -> <gdouble> -> IO (Ptr <GtsTriangle>)+#ccall gts_triangle_class, IO (Ptr <GtsTriangleClass>)+#ccall gts_triangle_new, Ptr <GtsTriangleClass> -> Ptr <GtsEdge> -> Ptr <GtsEdge> -> Ptr <GtsEdge> -> IO (Ptr <GtsTriangle>)+#ccall gts_triangle_set, Ptr <GtsTriangleClass> -> Ptr <GtsEdge> -> Ptr <GtsEdge> -> Ptr <GtsEdge> -> IO ()+#ccall gts_triangle_area, Ptr <GtsTriangle> -> IO <gdouble>+#ccall gts_triangle_perimeter, Ptr <GtsTriangle> -> IO <gdouble> +#ccall gts_triangle_quality, Ptr <GtsTriangle> -> IO <gdouble>+#ccall gts_triangle_normal, Ptr <GtsTriangle> -> Ptr <gdouble> -> Ptr <gdouble> -> Ptr <gdouble> -> IO ()+#ccall gts_triangle_revert, Ptr <GtsTriangle> -> IO ()+#ccall gts_triangle_orientation, Ptr <GtsTriangle> -> IO <gdouble>+#ccall gts_triangle_neighbors, Ptr <GtsTriangle> -> IO (Ptr <GSList>)+#ccall gts_triangle_vertices_edges, Ptr <GtsTriangle> -> Ptr <GtsEdge> -> Ptr (Ptr <GtsVertex>) -> Ptr (Ptr <GtsVertex>) -> Ptr (Ptr <GtsVertex>) -> Ptr (Ptr <GtsEdge>) -> Ptr (Ptr <GtsEdge>) -> Ptr (Ptr <GtsEdge>) -> IO ()+#ccall gts_triangle_vertices, Ptr <GtsTriangle> -> Ptr <GtsEdge> -> Ptr (Ptr <GtsVertex>) -> Ptr (Ptr <GtsVertex>) -> Ptr (Ptr <GtsVertex>) -> IO ()+#ccall gts_triangle_vertex_opposite, Ptr <GtsTriangle> -> Ptr <GtsEdge> -> IO (Ptr <GtsVertex)+#ccall gts_triangle_edge_opposite, Ptr <GtsTriangle> -> Ptr <GtsVertex> -> IO (Ptr <GtsEdge) +#ccall gts_triangle_is_ok, Ptr <GtsTriangle> -> IO <gboolean>+#ccall gts_triangle_circumcircle_center, Ptr <GtsTriangle> -> Ptr <GtsPointClass> -> IO (Ptr <GtsPoint>)+#ccall gts_triangle_interpolate_height, Ptr <GtsTriangle> -> Ptr <GtsPoint> -> IO ()+#ccall gts_triangles_from_edges, Ptr <GSList> -> IO (Ptr <GSList>)++#starttype GtsVertex+#field p,<GtsPoint>+#stoptype++#starttype GtsVertexClass+#stoptype++#ccall gts_range_init, Ptr <GtsRange> -> IO ()+#ccall gts_range_reset,Ptr <GtsRange> -> IO () +#ccall gts_range_add_value,Ptr <GtsRange> -> <gdouble> -> IO () +#ccall gts_range_update,Ptr <GtsRange> -> IO () ++#ccall gts_point_class, IO (Ptr <GtsPointClass>)+#ccall gts_point_new, Ptr <GtsPointClass> -> <gdouble> -> <gdouble> -> <gdouble> -> IO ( Ptr <GtsPoint> )+#ccall gts_point_set, Ptr <GtsPoint> -> <gdouble> -> <gdouble> -> <gdouble> -> IO ()+#cinline gts_point_is_in_rectangle, Ptr <GtsPoint> -> Ptr <GtsPoint> -> Ptr <GtsPoint> -> IO <gboolean>+#ccall gts_vertex_class,IO (Ptr <GtsVertexClass>)+#ccall gts_vertex_new,Ptr <GtsVertexClass> -> <gdouble> -> <gdouble> -> <gdouble> -> IO (Ptr <GtsVertex>)++#starttype GtsVertexNormal+#field n,<GtsVector>+#stoptype++#ccall gts_vertex_normal_class,IO (Ptr <GtsVertexClass>)++#starttype GtsColorVertex+#field c,<GtsColor>+#stoptype++#ccall gts_color_vertex_class,IO (Ptr <GtsVertexClass>)++#starttype GtsSurface+#field keep_faces,<gboolean>+#stoptype++#starttype GtsSurfaceClass+#stoptype++#starttype GtsEdgeClass+#stoptype++#starttype GtsEdge+#field triangles,Ptr <GSList>+#field segment,Ptr <GtsSegment>+#stoptype++#starttype GtsFaceClass+#stoptype++#starttype GtsFace+#stoptype++#starttype GtsSurfaceStats+#stoptype++#starttype GtsSurfaceQualityStats+#stoptype++#ccall gts_face_class,IO (Ptr <GtsFaceClass>)+#ccall gts_edge_class,IO (Ptr <GtsEdgeClass>)++#ccall gts_surface_class,IO (Ptr <GtsSurfaceClass>)+#ccall gts_surface_new,Ptr <GtsSurfaceClass> -> Ptr <GtsFaceClass> -> Ptr <GtsEdgeClass> -> Ptr <GtsVertexClass> -> IO (Ptr <GtsSurface>)+#ccall gts_surface_add_face, Ptr <GtsSurface> -> Ptr <GtsFace> -> IO ()+#ccall gts_surface_read, Ptr <GtsSurface> -> Ptr <GtsFile> -> IO <guint>+#ccall gts_surface_remove_face,Ptr <GtsSurface> -> Ptr <GtsFace> -> IO ()+#ccall gts_surface_area, Ptr <GtsSurface> -> IO <gdouble>+#ccall gts_surface_stats, Ptr <GtsSurface> -> Ptr <GtsSurfaceStats> -> IO ()+#ccall gts_surface_quality_stats, Ptr <GtsSurface> -> Ptr <GtsSurfaceQualityStats> -> IO ()+#ccall gts_surface_foreach_vertex, Ptr <GtsSurface> -> <GtsFunc> -> <gpointer> -> IO ()+#ccall gts_surface_foreach_edge, Ptr <GtsSurface> -> <GtsFunc> -> <gpointer> -> IO ()+#ccall gts_surface_foreach_face, Ptr <GtsSurface> -> <GtsFunc> -> <gpointer> -> IO ()+#ccall gts_surface_foreach_face_remove, Ptr <GtsSurface> -> <GtsFunc> -> <gpointer> -> IO <guint>++#ccall gts_surface_generate_sphere, Ptr <GtsSurface> -> <guint> -> IO ( Ptr <GtsSurface> )+#ccall gts_surface_copy, Ptr <GtsSurface> -> Ptr <GtsSurface> -> IO (Ptr <GtsSurface> )+#ccall gts_surface_merge, Ptr <GtsSurface> -> Ptr <GtsSurface> -> IO ()++#ccall gts_surface_is_manifold, Ptr <GtsSurface> -> IO <gboolean>+#ccall gts_surface_is_closed, Ptr <GtsSurface> -> IO <gboolean>+#ccall gts_surface_is_orientable, Ptr <GtsSurface> -> IO <gboolean>+#ccall gts_surface_volume, Ptr <GtsSurface> -> IO <gdouble>+#ccall gts_surface_center_of_mass, Ptr <GtsSurface> -> Ptr <GtsVector> -> IO <gdouble>+#ccall gts_surface_center_of_area, Ptr <GtsSurface> -> Ptr <GtsVector> -> IO <gdouble>++#ccall gts_surface_vertex_number, Ptr <GtsSurface> -> IO <guint>+#ccall gts_surface_edge_number, Ptr <GtsSurface> -> IO <guint>+#ccall gts_surface_face_number, Ptr <GtsSurface> -> IO <guint>++#ccall gts_surface_boundary, Ptr <GtsSurface> -> IO (Ptr <GSList>)+#ccall gts_surface_split, Ptr <GtsSurface> -> IO (Ptr <GSList>)+#ccall gts_surface_write, Ptr <GtsSurface> -> Ptr CFile -> IO ()++#starttype GtsSurfaceInterClass+#stoptype++#starttype GtsSurfaceInter+#field s1,Ptr <GtsSurface>+#field s2,Ptr <GtsSurface>+#stoptype++#starttype GNode+#stoptype++#ccall gts_face_new, Ptr <GtsFaceClass> -> Ptr <GtsEdge> -> Ptr <GtsEdge> -> Ptr <GtsEdge> -> IO (Ptr <GtsFace>)+#ccall gts_surface_inter_class,IO (Ptr <GtsSurfaceInterClass>)+#ccall gts_surface_inter_new, Ptr <GtsSurfaceInterClass> -> Ptr <GtsSurface> -> Ptr <GtsSurface> -> Ptr <GNode> -> Ptr <GNode> -> <gboolean> -> <gboolean> -> IO (Ptr <GtsSurfaceInter>)+#ccall gts_surface_inter_check, Ptr <GtsSurfaceInter> -> Ptr <gboolean> -> IO <gboolean>+#ccall gts_surface_inter_boolean, Ptr <GtsSurfaceInter> -> Ptr <GtsSurface> -> <guint> -> IO ()+#ccall gts_surface_is_self_intersecting, Ptr <GtsSurface> -> IO (Ptr <GtsSurface>)++#ccall gts_surface_intersection, Ptr <GtsSurface> -> Ptr <GtsSurface> -> Ptr <GNode> -> Ptr <GNode> -> IO (Ptr <GSList>)++#ccall gts_bb_tree_new, Ptr <GSList> -> IO (Ptr <GNode>)+#ccall gts_bb_tree_surface, Ptr <GtsSurface> -> IO (Ptr <GNode>)++#ccall gts_bb_tree_destroy, Ptr <GNode> -> <gboolean> -> IO ()+#ccall gts_bb_tree_stabbed, Ptr <GNode> -> Ptr <GtsPoint> -> IO (Ptr <GSList>)++#ccall gts_object_destroy, Ptr <GtsObject> -> IO ()++-- #starttype GtsConstraintClass+-- #stoptype ++-- #starttype GtsConstraint+-- #stoptype++#callback GtsEncroachFunc, Ptr <GtsVertex> -> Ptr <GtsEdge> -> Ptr <GtsSurface> -> <gpointer> -> IO <gboolean>+#callback GtsKeyFunc, <gpointer> -> <gpointer> -> IO <gdouble>++#ccall gts_constraint_class, IO (Ptr <GtsEdgeClass>)+#ccall gts_point_locate, Ptr <GtsPoint> -> Ptr <GtsSurface> -> Ptr <GtsFace> -> IO (Ptr <GtsFace>)+#ccall gts_delaunay_add_constraint, Ptr <GtsSurface> -> Ptr <GtsEdge> -> IO (Ptr <GSList>)+#ccall gts_delaunay_check, Ptr <GtsSurface> -> IO (Ptr <GtsFace>)+#ccall gts_delaunay_remove_hull, Ptr <GtsSurface> -> IO ()+#ccall gts_delaunay_conform,Ptr <GtsSurface> -> <gint> -> FunPtr <GtsEncroachFunc> -> <gpointer> -> IO <guint>+#ccall gts_delaunay_refine,Ptr <GtsSurface> -> <gint> -> FunPtr <GtsEncroachFunc> -> <gpointer> -> FunPtr <GtsKeyFunc> -> <gpointer> -> IO <guint>+#ccall gts_vertex_encroaches_edge,Ptr <GtsVertex> -> Ptr <GtsEdge> -> IO <gboolean>++#ccall gts_edge_new, Ptr <GtsEdgeClass> -> Ptr <GtsVertex> -> Ptr <GtsVertex> -> IO (Ptr <GtsEdge>)+#ccall gts_edge_replace, Ptr <GtsEdge> -> Ptr <GtsEdge> -> IO ()+#ccall gts_edge_swap, Ptr <GtsEdge> -> Ptr <GtsSurface> -> IO ()++#ccall gts_segment_triangle_intersection, Ptr <GtsSegment> -> Ptr <GtsTriangle> -> <gboolean> -> IO (Ptr <GtsPoint>)++#ccall gts_point_in_triangle_circle,Ptr <GtsPoint> -> Ptr <GtsTriangle> -> IO <gdouble>+#ccall gts_point_orientation, Ptr <GtsPoint> -> Ptr <GtsPoint> -> Ptr <GtsPoint> -> IO <gdouble>++#ccall gts_point_is_inside_surface, Ptr <GtsPoint> -> Ptr <GNode> -> <gboolean> -> IO <gboolean>+#ccall gts_point_in_circle, Ptr <GtsPoint> -> Ptr <GtsPoint> -> Ptr <GtsPoint> -> Ptr <GtsPoint> -> IO <gdouble>+#ccall gts_point_orientation_3d, Ptr <GtsPoint> -> Ptr <GtsPoint> -> Ptr <GtsPoint> -> Ptr <GtsPoint> -> Ptr <GtsPoint> -> IO <gdouble>++#starttype GtsBBoxClass+#stoptype+#ccall gts_bbox_class, IO (Ptr <GtsBBoxClass>)++#starttype GtsBBox+#field x1,<gdouble>+#field y1,<gdouble>+#field z1,<gdouble>+#field x2,<gdouble>+#field y2,<gdouble>+#field z2,<gdouble>+#field bounded, <gpointer>+#stoptype++#ccall gts_surface_strip, Ptr <GtsSurface> -> IO (Ptr <GSList>)+#ccall gts_surface_distance, Ptr <GtsSurface> -> Ptr <GtsSurface> -> <gdouble> -> Ptr <GtsRange> -> Ptr <GtsRange> -> IO ()+#ccall gts_bbox_surface, Ptr <GtsBBoxClass> -> Ptr <GtsSurface> -> IO ( Ptr <GtsBBox> )+#ccall gts_bboxes_are_overlapping, Ptr <GtsBBox> -> Ptr <GtsBBox> -> IO <gboolean>++#ccall gts_delaunay_add_vertex, Ptr <GtsSurface> -> Ptr <GtsVertex> -> Ptr <GtsFace> -> IO (Ptr <GtsVertex>)+#ccall gts_delaunay_add_vertex_to_face, Ptr <GtsSurface> -> Ptr <GtsVertex> -> Ptr <GtsFace> -> IO (Ptr <GtsVertex>)++-- Typed helper functions+#ccall gts_surface_destroy, Ptr <GtsSurface> -> IO ()+#ccall gts_triangle_destroy, Ptr <GtsTriangle> -> IO ()+#ccall gts_vertex_destory, Ptr <GtsVertex> -> IO ()
+ src/Bindings/GTS_inline.c view
@@ -0,0 +1,20 @@++#include <bindings.cmacros.h>+#include <stdio.h>+#include <gts.h>++BC_INLINE3(GTS_CHECK_VERSION,guint,guint,guint,gboolean)+BC_INLINE3(gts_point_is_in_rectangle,GtsPoint*,GtsPoint*,GtsPoint*,gboolean)+BC_INLINE1(g_slist_next,GSList*,GSList*)++void gts_surface_destroy(GtsSurface* s) {+ gts_object_destroy(GTS_OBJECT(s));+}++void gts_triangle_destroy(GtsTriangle *t) {+ gts_object_destroy(GTS_OBJECT(t));+}++void gts_vertex_destroy(GtsVertex *v) {+ gts_object_destroy(GTS_OBJECT(v));+}