-- Produced by boxnd-gen; edit the generator, not this file.

module Box3D.GridMesh
  ( create
  )

  where

import Foreign
import Foreign.C.Types (CInt(..), CBool(..))
import Box3D.Tags (MeshData)

foreign import ccall unsafe "b3CreateGridMesh"
  c_b3CreateGridMesh :: CInt -> CInt -> Float -> CInt -> CBool -> IO (Ptr MeshData)

{- | Create a grid mesh along the x and z axes.

Binds @b3CreateGridMesh@.
-}
create
  :: Int
  -- ^ @xCount@: the number of rows in the x direction
  -> Int
  -- ^ @zCount@: the number of rows in the z direction
  -> Float
  -- ^ @cellWidth@: the width of each cell
  -> Int
  -- ^ @materialCount@: the number of materials to generate
  -> Bool
  -- ^ @identifyEdges@: compute adjacency information
  -> IO (Ptr MeshData)
create :: Int -> Int -> Float -> Int -> Bool -> IO (Ptr MeshData)
create Int
a0 Int
a1 Float
a2 Int
a3 Bool
a4 =
  CInt -> CInt -> Float -> CInt -> CBool -> IO (Ptr MeshData)
c_b3CreateGridMesh (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a0) (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1) Float
a2 (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a3) (Bool -> CBool
forall a. Num a => Bool -> a
fromBool Bool
a4)