packages feed

HODE-2008.10.27: src/Physics/ODE/Objects.th

module Physics.ODE.Objects
    ( -- * Sphere class
      createSphere
    , sphereSetRadius
    , sphereGetRadius
    , spherePointDepth
    -- * Box class
    , createBox
    , boxSetLengths
    , boxGetLengths
    , boxPointDepth
    -- * Plane class
    , createPlane
    , planeSetParams
    , planeGetParams
    , planePointDepth
    ) where

import Foreign
import Data.Maybe

import Physics.ODE.Types
import Physics.ODE.Utilities

#ifdef HASTH
import Foreign.HacanonLight.DIS
import Foreign.HacanonLight.Generate
import Physics.ODE.DIS
#endif

--foreign import ccall unsafe "&dGeomDestroy" cDestroy :: FinalizerPtr GeomStruct

---------------------------------------------
-- Sphere class

$(bind "createSphere" "dCreateSphere" [maybePtr space,ode,geom])

$(bind "sphereSetRadius" "dGeomSphereSetRadius" [geom,ode,unit])
$(bind "sphereGetRadius" "dGeomSphereGetRadius" [geom,ode])
$(bind "spherePointDepth" "dGeomSpherePointDepth" [geom,ode,ode,ode,ode])

---------------------------------------------
-- Box class

$(bind "createBox" "dCreateBox" [maybePtr space,ode,ode,ode,geom])

$(bind "boxSetLengths" "dGeomBoxSetLengths" [geom,ode,ode,ode,unit])
$(bind "boxGetLengths" "dGeomBoxGetLengths" [geom,vector3Out,unit])
$(bind "boxPointDepth" "dGeomBoxPointDepth" [geom,ode,ode,ode,ode])

---------------------------------------------
-- Plane class

$(bind "createPlane" "dCreatePlane" [maybePtr space,ode,ode,ode,ode,geom])

$(bind "planeSetParams" "dGeomPlaneSetParams" [geom,ode,ode,ode,ode,unit])
$(bind "planeGetParams" "dGeomPlaneGetParams" [geom,vector4Out,unit])
$(bind "planePointDepth" "dGeomPlanePointDepth" [geom,ode,ode,ode,ode])


-- FIXME: Do the rest.