{-# LANGUAGE CApiFFI #-}
module OpenCascade.BRepGProp 
( volumeProperties
, surfaceProperties
, linearProperties
) where

import OpenCascade.TopoDS.Types (Shape)
import OpenCascade.GProp.Types (GProps)
import Foreign.Ptr (Ptr)
import Foreign.C (CBool (..))
import OpenCascade.Internal.Bool (boolToCBool)

foreign import capi unsafe "hs_BRepGProp.h hs_BRepGProp_VolumeProperties" rawVolumeProperties :: Ptr Shape -> Ptr GProps -> CBool -> CBool -> CBool -> IO ()

volumeProperties :: Ptr Shape -> Ptr GProps -> Bool -> Bool -> Bool -> IO ()
volumeProperties :: Ptr Shape -> Ptr GProps -> Bool -> Bool -> Bool -> IO ()
volumeProperties Ptr Shape
shape Ptr GProps
props Bool
onlyClosed Bool
skipShared Bool
useTriangulation =
    Ptr Shape -> Ptr GProps -> CBool -> CBool -> CBool -> IO ()
rawVolumeProperties Ptr Shape
shape Ptr GProps
props (Bool -> CBool
boolToCBool Bool
onlyClosed) (Bool -> CBool
boolToCBool Bool
skipShared) (Bool -> CBool
boolToCBool Bool
useTriangulation)

foreign import capi unsafe "hs_BRepGProp.h hs_BRepGProp_SurfaceProperties" rawSurfaceProperties :: Ptr Shape -> Ptr GProps -> CBool -> CBool -> IO ()

surfaceProperties :: Ptr Shape -> Ptr GProps -> Bool -> Bool -> IO ()
surfaceProperties :: Ptr Shape -> Ptr GProps -> Bool -> Bool -> IO ()
surfaceProperties Ptr Shape
shape Ptr GProps
props Bool
skipShared Bool
useTriangulation =
    Ptr Shape -> Ptr GProps -> CBool -> CBool -> IO ()
rawSurfaceProperties Ptr Shape
shape Ptr GProps
props (Bool -> CBool
boolToCBool Bool
skipShared) (Bool -> CBool
boolToCBool Bool
useTriangulation)

    
foreign import capi unsafe "hs_BRepGProp.h hs_BRepGProp_LinearProperties" rawLinearProperties :: Ptr Shape -> Ptr GProps -> CBool -> CBool -> IO ()

linearProperties :: Ptr Shape -> Ptr GProps -> Bool -> Bool -> IO ()
linearProperties :: Ptr Shape -> Ptr GProps -> Bool -> Bool -> IO ()
linearProperties Ptr Shape
shape Ptr GProps
props Bool
skipShared Bool
useTriangulation =
    Ptr Shape -> Ptr GProps -> CBool -> CBool -> IO ()
rawLinearProperties Ptr Shape
shape Ptr GProps
props (Bool -> CBool
boolToCBool Bool
skipShared) (Bool -> CBool
boolToCBool Bool
useTriangulation)