{-# LINE 1 "src/Bindings/Gts/SurfaceOperations/SurfaceSimplificationAndRefinement.hsc" #-}

{-# LINE 2 "src/Bindings/Gts/SurfaceOperations/SurfaceSimplificationAndRefinement.hsc" #-}

{-# LINE 3 "src/Bindings/Gts/SurfaceOperations/SurfaceSimplificationAndRefinement.hsc" #-}

-- | <http://gts.sourceforge.net/reference/gts-surface-simplification-and-refinement.html>

module Bindings.Gts.SurfaceOperations.SurfaceSimplificationAndRefinement where
import Bindings.GLib
import Bindings.Gts.Types
import Foreign.Ptr (Ptr,FunPtr,plusPtr)
import Foreign.Ptr (wordPtrToPtr,castPtrToFunPtr)
import Foreign.Storable
import Foreign.C.Types
import Foreign.C.String (CString,CStringLen,CWString,CWStringLen)
import Foreign.Marshal.Alloc (alloca)
import Foreign.Marshal.Array (peekArray,pokeArray)
import Data.Int
import Data.Word

{-# LINE 10 "src/Bindings/Gts/SurfaceOperations/SurfaceSimplificationAndRefinement.hsc" #-}

foreign import ccall "gts_surface_refine" c'gts_surface_refine
  :: Ptr C'GtsSurface -> C'GtsKeyFunc -> C'gpointer -> C'GtsRefineFunc -> C'gpointer -> C'GtsStopFunc -> C'gpointer -> IO ()
foreign import ccall "&gts_surface_refine" p'gts_surface_refine
  :: FunPtr (Ptr C'GtsSurface -> C'GtsKeyFunc -> C'gpointer -> C'GtsRefineFunc -> C'gpointer -> C'GtsStopFunc -> C'gpointer -> IO ())

{-# LINE 12 "src/Bindings/Gts/SurfaceOperations/SurfaceSimplificationAndRefinement.hsc" #-}

foreign import ccall "gts_surface_coarsen" c'gts_surface_coarsen
  :: Ptr C'GtsSurface -> C'GtsKeyFunc -> C'gpointer -> C'GtsCoarsenFunc -> C'gpointer -> C'GtsStopFunc -> C'gpointer -> C'gdouble -> IO ()
foreign import ccall "&gts_surface_coarsen" p'gts_surface_coarsen
  :: FunPtr (Ptr C'GtsSurface -> C'GtsKeyFunc -> C'gpointer -> C'GtsCoarsenFunc -> C'gpointer -> C'GtsStopFunc -> C'gpointer -> C'gdouble -> IO ())

{-# LINE 14 "src/Bindings/Gts/SurfaceOperations/SurfaceSimplificationAndRefinement.hsc" #-}
foreign import ccall "gts_coarsen_stop_number" c'gts_coarsen_stop_number
  :: C'gdouble -> C'guint -> Ptr C'guint -> IO C'gboolean
foreign import ccall "&gts_coarsen_stop_number" p'gts_coarsen_stop_number
  :: FunPtr (C'gdouble -> C'guint -> Ptr C'guint -> IO C'gboolean)

{-# LINE 15 "src/Bindings/Gts/SurfaceOperations/SurfaceSimplificationAndRefinement.hsc" #-}
foreign import ccall "gts_coarsen_stop_cost" c'gts_coarsen_stop_cost
  :: C'gdouble -> C'guint -> Ptr C'gdouble -> IO C'gboolean
foreign import ccall "&gts_coarsen_stop_cost" p'gts_coarsen_stop_cost
  :: FunPtr (C'gdouble -> C'guint -> Ptr C'gdouble -> IO C'gboolean)

{-# LINE 16 "src/Bindings/Gts/SurfaceOperations/SurfaceSimplificationAndRefinement.hsc" #-}

foreign import ccall "gts_volume_optimized_vertex" c'gts_volume_optimized_vertex
  :: Ptr C'GtsEdge -> Ptr C'GtsVertexClass -> Ptr C'GtsVolumeOptimizedParams -> IO (Ptr C'GtsVertex)
foreign import ccall "&gts_volume_optimized_vertex" p'gts_volume_optimized_vertex
  :: FunPtr (Ptr C'GtsEdge -> Ptr C'GtsVertexClass -> Ptr C'GtsVolumeOptimizedParams -> IO (Ptr C'GtsVertex))

{-# LINE 18 "src/Bindings/Gts/SurfaceOperations/SurfaceSimplificationAndRefinement.hsc" #-}
foreign import ccall "gts_volume_optimized_cost" c'gts_volume_optimized_cost
  :: Ptr C'GtsEdge -> Ptr C'GtsVolumeOptimizedParams -> IO C'gdouble
foreign import ccall "&gts_volume_optimized_cost" p'gts_volume_optimized_cost
  :: FunPtr (Ptr C'GtsEdge -> Ptr C'GtsVolumeOptimizedParams -> IO C'gdouble)

{-# LINE 19 "src/Bindings/Gts/SurfaceOperations/SurfaceSimplificationAndRefinement.hsc" #-}
foreign import ccall "gts_edge_collapse_is_valid" c'gts_edge_collapse_is_valid
  :: Ptr C'GtsEdge -> IO C'gboolean
foreign import ccall "&gts_edge_collapse_is_valid" p'gts_edge_collapse_is_valid
  :: FunPtr (Ptr C'GtsEdge -> IO C'gboolean)

{-# LINE 20 "src/Bindings/Gts/SurfaceOperations/SurfaceSimplificationAndRefinement.hsc" #-}
foreign import ccall "gts_edge_collapse_creates_fold" c'gts_edge_collapse_creates_fold
  :: Ptr C'GtsEdge -> Ptr C'GtsVertex -> C'gdouble -> IO C'gboolean
foreign import ccall "&gts_edge_collapse_creates_fold" p'gts_edge_collapse_creates_fold
  :: FunPtr (Ptr C'GtsEdge -> Ptr C'GtsVertex -> C'gdouble -> IO C'gboolean)

{-# LINE 21 "src/Bindings/Gts/SurfaceOperations/SurfaceSimplificationAndRefinement.hsc" #-}