{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Graphene.Structs.Sphere
(
Sphere(..) ,
newZeroSphere ,
#if defined(ENABLE_OVERLOADING)
ResolveSphereMethod ,
#endif
sphereAlloc ,
#if defined(ENABLE_OVERLOADING)
SphereContainsPointMethodInfo ,
#endif
sphereContainsPoint ,
#if defined(ENABLE_OVERLOADING)
SphereDistanceMethodInfo ,
#endif
sphereDistance ,
#if defined(ENABLE_OVERLOADING)
SphereEqualMethodInfo ,
#endif
sphereEqual ,
#if defined(ENABLE_OVERLOADING)
SphereFreeMethodInfo ,
#endif
sphereFree ,
#if defined(ENABLE_OVERLOADING)
SphereGetBoundingBoxMethodInfo ,
#endif
sphereGetBoundingBox ,
#if defined(ENABLE_OVERLOADING)
SphereGetCenterMethodInfo ,
#endif
sphereGetCenter ,
#if defined(ENABLE_OVERLOADING)
SphereGetRadiusMethodInfo ,
#endif
sphereGetRadius ,
#if defined(ENABLE_OVERLOADING)
SphereInitMethodInfo ,
#endif
sphereInit ,
#if defined(ENABLE_OVERLOADING)
SphereInitFromPointsMethodInfo ,
#endif
sphereInitFromPoints ,
#if defined(ENABLE_OVERLOADING)
SphereInitFromVectorsMethodInfo ,
#endif
sphereInitFromVectors ,
#if defined(ENABLE_OVERLOADING)
SphereIsEmptyMethodInfo ,
#endif
sphereIsEmpty ,
#if defined(ENABLE_OVERLOADING)
SphereTranslateMethodInfo ,
#endif
sphereTranslate ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import {-# SOURCE #-} qualified GI.Graphene.Structs.Box as Graphene.Box
import {-# SOURCE #-} qualified GI.Graphene.Structs.Point3D as Graphene.Point3D
import {-# SOURCE #-} qualified GI.Graphene.Structs.Vec3 as Graphene.Vec3
newtype Sphere = Sphere (SP.ManagedPtr Sphere)
deriving (Sphere -> Sphere -> Bool
(Sphere -> Sphere -> Bool)
-> (Sphere -> Sphere -> Bool) -> Eq Sphere
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Sphere -> Sphere -> Bool
== :: Sphere -> Sphere -> Bool
$c/= :: Sphere -> Sphere -> Bool
/= :: Sphere -> Sphere -> Bool
Eq)
instance SP.ManagedPtrNewtype Sphere where
toManagedPtr :: Sphere -> ManagedPtr Sphere
toManagedPtr (Sphere ManagedPtr Sphere
p) = ManagedPtr Sphere
p
foreign import ccall "graphene_sphere_get_type" c_graphene_sphere_get_type ::
IO GType
type instance O.ParentTypes Sphere = '[]
instance O.HasParentTypes Sphere
instance B.Types.TypedObject Sphere where
glibType :: IO GType
glibType = IO GType
c_graphene_sphere_get_type
instance B.Types.GBoxed Sphere
instance B.GValue.IsGValue (Maybe Sphere) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_graphene_sphere_get_type
gvalueSet_ :: Ptr GValue -> Maybe Sphere -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Sphere
P.Nothing = Ptr GValue -> Ptr Sphere -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr Sphere
forall a. Ptr a
FP.nullPtr :: FP.Ptr Sphere)
gvalueSet_ Ptr GValue
gv (P.Just Sphere
obj) = Sphere -> (Ptr Sphere -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Sphere
obj (Ptr GValue -> Ptr Sphere -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Sphere)
gvalueGet_ Ptr GValue
gv = do
Ptr Sphere
ptr <- Ptr GValue -> IO (Ptr Sphere)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr Sphere)
if Ptr Sphere
ptr Ptr Sphere -> Ptr Sphere -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Sphere
forall a. Ptr a
FP.nullPtr
then Sphere -> Maybe Sphere
forall a. a -> Maybe a
P.Just (Sphere -> Maybe Sphere) -> IO Sphere -> IO (Maybe Sphere)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Sphere -> Sphere) -> Ptr Sphere -> IO Sphere
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr Sphere -> Sphere
Sphere Ptr Sphere
ptr
else Maybe Sphere -> IO (Maybe Sphere)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Sphere
forall a. Maybe a
P.Nothing
newZeroSphere :: MonadIO m => m Sphere
newZeroSphere :: forall (m :: * -> *). MonadIO m => m Sphere
newZeroSphere = IO Sphere -> m Sphere
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Sphere -> m Sphere) -> IO Sphere -> m Sphere
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr Sphere)
forall a. GBoxed a => Int -> IO (Ptr a)
callocBoxedBytes Int
20 IO (Ptr Sphere) -> (Ptr Sphere -> IO Sphere) -> IO Sphere
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr Sphere -> Sphere) -> Ptr Sphere -> IO Sphere
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Sphere -> Sphere
Sphere
instance tag ~ 'AttrSet => Constructible Sphere tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr Sphere -> Sphere) -> [AttrOp Sphere tag] -> m Sphere
new ManagedPtr Sphere -> Sphere
_ [AttrOp Sphere tag]
attrs = do
Sphere
o <- m Sphere
forall (m :: * -> *). MonadIO m => m Sphere
newZeroSphere
Sphere -> [AttrOp Sphere 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set Sphere
o [AttrOp Sphere tag]
[AttrOp Sphere 'AttrSet]
attrs
Sphere -> m Sphere
forall a. a -> m a
forall (m :: * -> *) a. Monad m => a -> m a
return Sphere
o
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Sphere
type instance O.AttributeList Sphere = SphereAttributeList
type SphereAttributeList = ('[ ] :: [(Symbol, *)])
#endif
foreign import ccall "graphene_sphere_alloc" graphene_sphere_alloc ::
IO (Ptr Sphere)
sphereAlloc ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Sphere
sphereAlloc :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Sphere
sphereAlloc = IO Sphere -> m Sphere
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Sphere -> m Sphere) -> IO Sphere -> m Sphere
forall a b. (a -> b) -> a -> b
$ do
Ptr Sphere
result <- IO (Ptr Sphere)
graphene_sphere_alloc
Text -> Ptr Sphere -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"sphereAlloc" Ptr Sphere
result
Sphere
result' <- ((ManagedPtr Sphere -> Sphere) -> Ptr Sphere -> IO Sphere
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Sphere -> Sphere
Sphere) Ptr Sphere
result
Sphere -> IO Sphere
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Sphere
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "graphene_sphere_contains_point" graphene_sphere_contains_point ::
Ptr Sphere ->
Ptr Graphene.Point3D.Point3D ->
IO CInt
sphereContainsPoint ::
(B.CallStack.HasCallStack, MonadIO m) =>
Sphere
-> Graphene.Point3D.Point3D
-> m Bool
sphereContainsPoint :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Sphere -> Point3D -> m Bool
sphereContainsPoint Sphere
s Point3D
point = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Sphere
s' <- Sphere -> IO (Ptr Sphere)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Sphere
s
Ptr Point3D
point' <- Point3D -> IO (Ptr Point3D)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Point3D
point
CInt
result <- Ptr Sphere -> Ptr Point3D -> IO CInt
graphene_sphere_contains_point Ptr Sphere
s' Ptr Point3D
point'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Sphere -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Sphere
s
Point3D -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Point3D
point
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SphereContainsPointMethodInfo
instance (signature ~ (Graphene.Point3D.Point3D -> m Bool), MonadIO m) => O.OverloadedMethod SphereContainsPointMethodInfo Sphere signature where
overloadedMethod = sphereContainsPoint
instance O.OverloadedMethodInfo SphereContainsPointMethodInfo Sphere where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Sphere.sphereContainsPoint",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.5/docs/GI-Graphene-Structs-Sphere.html#v:sphereContainsPoint"
})
#endif
foreign import ccall "graphene_sphere_distance" graphene_sphere_distance ::
Ptr Sphere ->
Ptr Graphene.Point3D.Point3D ->
IO CFloat
sphereDistance ::
(B.CallStack.HasCallStack, MonadIO m) =>
Sphere
-> Graphene.Point3D.Point3D
-> m Float
sphereDistance :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Sphere -> Point3D -> m Float
sphereDistance Sphere
s Point3D
point = IO Float -> m Float
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Float -> m Float) -> IO Float -> m Float
forall a b. (a -> b) -> a -> b
$ do
Ptr Sphere
s' <- Sphere -> IO (Ptr Sphere)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Sphere
s
Ptr Point3D
point' <- Point3D -> IO (Ptr Point3D)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Point3D
point
CFloat
result <- Ptr Sphere -> Ptr Point3D -> IO CFloat
graphene_sphere_distance Ptr Sphere
s' Ptr Point3D
point'
let result' :: Float
result' = CFloat -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac CFloat
result
Sphere -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Sphere
s
Point3D -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Point3D
point
Float -> IO Float
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Float
result'
#if defined(ENABLE_OVERLOADING)
data SphereDistanceMethodInfo
instance (signature ~ (Graphene.Point3D.Point3D -> m Float), MonadIO m) => O.OverloadedMethod SphereDistanceMethodInfo Sphere signature where
overloadedMethod = sphereDistance
instance O.OverloadedMethodInfo SphereDistanceMethodInfo Sphere where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Sphere.sphereDistance",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.5/docs/GI-Graphene-Structs-Sphere.html#v:sphereDistance"
})
#endif
foreign import ccall "graphene_sphere_equal" graphene_sphere_equal ::
Ptr Sphere ->
Ptr Sphere ->
IO CInt
sphereEqual ::
(B.CallStack.HasCallStack, MonadIO m) =>
Sphere
-> Sphere
-> m Bool
sphereEqual :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Sphere -> Sphere -> m Bool
sphereEqual Sphere
a Sphere
b = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Sphere
a' <- Sphere -> IO (Ptr Sphere)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Sphere
a
Ptr Sphere
b' <- Sphere -> IO (Ptr Sphere)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Sphere
b
CInt
result <- Ptr Sphere -> Ptr Sphere -> IO CInt
graphene_sphere_equal Ptr Sphere
a' Ptr Sphere
b'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Sphere -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Sphere
a
Sphere -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Sphere
b
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SphereEqualMethodInfo
instance (signature ~ (Sphere -> m Bool), MonadIO m) => O.OverloadedMethod SphereEqualMethodInfo Sphere signature where
overloadedMethod = sphereEqual
instance O.OverloadedMethodInfo SphereEqualMethodInfo Sphere where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Sphere.sphereEqual",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.5/docs/GI-Graphene-Structs-Sphere.html#v:sphereEqual"
})
#endif
foreign import ccall "graphene_sphere_free" graphene_sphere_free ::
Ptr Sphere ->
IO ()
sphereFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
Sphere
-> m ()
sphereFree :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Sphere -> m ()
sphereFree Sphere
s = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Sphere
s' <- Sphere -> IO (Ptr Sphere)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Sphere
s
Ptr Sphere -> IO ()
graphene_sphere_free Ptr Sphere
s'
Sphere -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Sphere
s
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SphereFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod SphereFreeMethodInfo Sphere signature where
overloadedMethod = sphereFree
instance O.OverloadedMethodInfo SphereFreeMethodInfo Sphere where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Sphere.sphereFree",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.5/docs/GI-Graphene-Structs-Sphere.html#v:sphereFree"
})
#endif
foreign import ccall "graphene_sphere_get_bounding_box" graphene_sphere_get_bounding_box ::
Ptr Sphere ->
Ptr Graphene.Box.Box ->
IO ()
sphereGetBoundingBox ::
(B.CallStack.HasCallStack, MonadIO m) =>
Sphere
-> m (Graphene.Box.Box)
sphereGetBoundingBox :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Sphere -> m Box
sphereGetBoundingBox Sphere
s = IO Box -> m Box
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Box -> m Box) -> IO Box -> m Box
forall a b. (a -> b) -> a -> b
$ do
Ptr Sphere
s' <- Sphere -> IO (Ptr Sphere)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Sphere
s
Ptr Box
box <- Int -> IO (Ptr Box)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
32 :: IO (Ptr Graphene.Box.Box)
Ptr Sphere -> Ptr Box -> IO ()
graphene_sphere_get_bounding_box Ptr Sphere
s' Ptr Box
box
Box
box' <- ((ManagedPtr Box -> Box) -> Ptr Box -> IO Box
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Box -> Box
Graphene.Box.Box) Ptr Box
box
Sphere -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Sphere
s
Box -> IO Box
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Box
box'
#if defined(ENABLE_OVERLOADING)
data SphereGetBoundingBoxMethodInfo
instance (signature ~ (m (Graphene.Box.Box)), MonadIO m) => O.OverloadedMethod SphereGetBoundingBoxMethodInfo Sphere signature where
overloadedMethod = sphereGetBoundingBox
instance O.OverloadedMethodInfo SphereGetBoundingBoxMethodInfo Sphere where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Sphere.sphereGetBoundingBox",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.5/docs/GI-Graphene-Structs-Sphere.html#v:sphereGetBoundingBox"
})
#endif
foreign import ccall "graphene_sphere_get_center" graphene_sphere_get_center ::
Ptr Sphere ->
Ptr Graphene.Point3D.Point3D ->
IO ()
sphereGetCenter ::
(B.CallStack.HasCallStack, MonadIO m) =>
Sphere
-> m (Graphene.Point3D.Point3D)
sphereGetCenter :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Sphere -> m Point3D
sphereGetCenter Sphere
s = IO Point3D -> m Point3D
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Point3D -> m Point3D) -> IO Point3D -> m Point3D
forall a b. (a -> b) -> a -> b
$ do
Ptr Sphere
s' <- Sphere -> IO (Ptr Sphere)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Sphere
s
Ptr Point3D
center <- Int -> IO (Ptr Point3D)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
12 :: IO (Ptr Graphene.Point3D.Point3D)
Ptr Sphere -> Ptr Point3D -> IO ()
graphene_sphere_get_center Ptr Sphere
s' Ptr Point3D
center
Point3D
center' <- ((ManagedPtr Point3D -> Point3D) -> Ptr Point3D -> IO Point3D
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Point3D -> Point3D
Graphene.Point3D.Point3D) Ptr Point3D
center
Sphere -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Sphere
s
Point3D -> IO Point3D
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Point3D
center'
#if defined(ENABLE_OVERLOADING)
data SphereGetCenterMethodInfo
instance (signature ~ (m (Graphene.Point3D.Point3D)), MonadIO m) => O.OverloadedMethod SphereGetCenterMethodInfo Sphere signature where
overloadedMethod = sphereGetCenter
instance O.OverloadedMethodInfo SphereGetCenterMethodInfo Sphere where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Sphere.sphereGetCenter",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.5/docs/GI-Graphene-Structs-Sphere.html#v:sphereGetCenter"
})
#endif
foreign import ccall "graphene_sphere_get_radius" graphene_sphere_get_radius ::
Ptr Sphere ->
IO CFloat
sphereGetRadius ::
(B.CallStack.HasCallStack, MonadIO m) =>
Sphere
-> m Float
sphereGetRadius :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Sphere -> m Float
sphereGetRadius Sphere
s = IO Float -> m Float
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Float -> m Float) -> IO Float -> m Float
forall a b. (a -> b) -> a -> b
$ do
Ptr Sphere
s' <- Sphere -> IO (Ptr Sphere)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Sphere
s
CFloat
result <- Ptr Sphere -> IO CFloat
graphene_sphere_get_radius Ptr Sphere
s'
let result' :: Float
result' = CFloat -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac CFloat
result
Sphere -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Sphere
s
Float -> IO Float
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Float
result'
#if defined(ENABLE_OVERLOADING)
data SphereGetRadiusMethodInfo
instance (signature ~ (m Float), MonadIO m) => O.OverloadedMethod SphereGetRadiusMethodInfo Sphere signature where
overloadedMethod = sphereGetRadius
instance O.OverloadedMethodInfo SphereGetRadiusMethodInfo Sphere where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Sphere.sphereGetRadius",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.5/docs/GI-Graphene-Structs-Sphere.html#v:sphereGetRadius"
})
#endif
foreign import ccall "graphene_sphere_init" graphene_sphere_init ::
Ptr Sphere ->
Ptr Graphene.Point3D.Point3D ->
CFloat ->
IO (Ptr Sphere)
sphereInit ::
(B.CallStack.HasCallStack, MonadIO m) =>
Sphere
-> Maybe (Graphene.Point3D.Point3D)
-> Float
-> m Sphere
sphereInit :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Sphere -> Maybe Point3D -> Float -> m Sphere
sphereInit Sphere
s Maybe Point3D
center Float
radius = IO Sphere -> m Sphere
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Sphere -> m Sphere) -> IO Sphere -> m Sphere
forall a b. (a -> b) -> a -> b
$ do
Ptr Sphere
s' <- Sphere -> IO (Ptr Sphere)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Sphere
s
Ptr Point3D
maybeCenter <- case Maybe Point3D
center of
Maybe Point3D
Nothing -> Ptr Point3D -> IO (Ptr Point3D)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Point3D
forall a. Ptr a
nullPtr
Just Point3D
jCenter -> do
Ptr Point3D
jCenter' <- Point3D -> IO (Ptr Point3D)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Point3D
jCenter
Ptr Point3D -> IO (Ptr Point3D)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Point3D
jCenter'
let radius' :: CFloat
radius' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
radius
Ptr Sphere
result <- Ptr Sphere -> Ptr Point3D -> CFloat -> IO (Ptr Sphere)
graphene_sphere_init Ptr Sphere
s' Ptr Point3D
maybeCenter CFloat
radius'
Text -> Ptr Sphere -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"sphereInit" Ptr Sphere
result
Sphere
result' <- ((ManagedPtr Sphere -> Sphere) -> Ptr Sphere -> IO Sphere
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Sphere -> Sphere
Sphere) Ptr Sphere
result
Sphere -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Sphere
s
Maybe Point3D -> (Point3D -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Point3D
center Point3D -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Sphere -> IO Sphere
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Sphere
result'
#if defined(ENABLE_OVERLOADING)
data SphereInitMethodInfo
instance (signature ~ (Maybe (Graphene.Point3D.Point3D) -> Float -> m Sphere), MonadIO m) => O.OverloadedMethod SphereInitMethodInfo Sphere signature where
overloadedMethod = sphereInit
instance O.OverloadedMethodInfo SphereInitMethodInfo Sphere where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Sphere.sphereInit",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.5/docs/GI-Graphene-Structs-Sphere.html#v:sphereInit"
})
#endif
foreign import ccall "graphene_sphere_init_from_points" graphene_sphere_init_from_points ::
Ptr Sphere ->
Word32 ->
Ptr Graphene.Point3D.Point3D ->
Ptr Graphene.Point3D.Point3D ->
IO (Ptr Sphere)
sphereInitFromPoints ::
(B.CallStack.HasCallStack, MonadIO m) =>
Sphere
-> [Graphene.Point3D.Point3D]
-> Maybe (Graphene.Point3D.Point3D)
-> m Sphere
sphereInitFromPoints :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Sphere -> [Point3D] -> Maybe Point3D -> m Sphere
sphereInitFromPoints Sphere
s [Point3D]
points Maybe Point3D
center = IO Sphere -> m Sphere
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Sphere -> m Sphere) -> IO Sphere -> m Sphere
forall a b. (a -> b) -> a -> b
$ do
let nPoints :: Word32
nPoints = Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [Point3D] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Point3D]
points
Ptr Sphere
s' <- Sphere -> IO (Ptr Sphere)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Sphere
s
[Ptr Point3D]
points' <- (Point3D -> IO (Ptr Point3D)) -> [Point3D] -> IO [Ptr Point3D]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM Point3D -> IO (Ptr Point3D)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [Point3D]
points
Ptr Point3D
points'' <- Int -> [Ptr Point3D] -> IO (Ptr Point3D)
forall a. Int -> [Ptr a] -> IO (Ptr a)
packBlockArray Int
12 [Ptr Point3D]
points'
Ptr Point3D
maybeCenter <- case Maybe Point3D
center of
Maybe Point3D
Nothing -> Ptr Point3D -> IO (Ptr Point3D)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Point3D
forall a. Ptr a
nullPtr
Just Point3D
jCenter -> do
Ptr Point3D
jCenter' <- Point3D -> IO (Ptr Point3D)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Point3D
jCenter
Ptr Point3D -> IO (Ptr Point3D)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Point3D
jCenter'
Ptr Sphere
result <- Ptr Sphere
-> Word32 -> Ptr Point3D -> Ptr Point3D -> IO (Ptr Sphere)
graphene_sphere_init_from_points Ptr Sphere
s' Word32
nPoints Ptr Point3D
points'' Ptr Point3D
maybeCenter
Text -> Ptr Sphere -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"sphereInitFromPoints" Ptr Sphere
result
Sphere
result' <- ((ManagedPtr Sphere -> Sphere) -> Ptr Sphere -> IO Sphere
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Sphere -> Sphere
Sphere) Ptr Sphere
result
Sphere -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Sphere
s
(Point3D -> IO ()) -> [Point3D] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Point3D -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [Point3D]
points
Maybe Point3D -> (Point3D -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Point3D
center Point3D -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Ptr Point3D -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Point3D
points''
Sphere -> IO Sphere
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Sphere
result'
#if defined(ENABLE_OVERLOADING)
data SphereInitFromPointsMethodInfo
instance (signature ~ ([Graphene.Point3D.Point3D] -> Maybe (Graphene.Point3D.Point3D) -> m Sphere), MonadIO m) => O.OverloadedMethod SphereInitFromPointsMethodInfo Sphere signature where
overloadedMethod = sphereInitFromPoints
instance O.OverloadedMethodInfo SphereInitFromPointsMethodInfo Sphere where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Sphere.sphereInitFromPoints",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.5/docs/GI-Graphene-Structs-Sphere.html#v:sphereInitFromPoints"
})
#endif
foreign import ccall "graphene_sphere_init_from_vectors" graphene_sphere_init_from_vectors ::
Ptr Sphere ->
Word32 ->
Ptr Graphene.Vec3.Vec3 ->
Ptr Graphene.Point3D.Point3D ->
IO (Ptr Sphere)
sphereInitFromVectors ::
(B.CallStack.HasCallStack, MonadIO m) =>
Sphere
-> [Graphene.Vec3.Vec3]
-> Maybe (Graphene.Point3D.Point3D)
-> m Sphere
sphereInitFromVectors :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Sphere -> [Vec3] -> Maybe Point3D -> m Sphere
sphereInitFromVectors Sphere
s [Vec3]
vectors Maybe Point3D
center = IO Sphere -> m Sphere
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Sphere -> m Sphere) -> IO Sphere -> m Sphere
forall a b. (a -> b) -> a -> b
$ do
let nVectors :: Word32
nVectors = Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Word32) -> Int -> Word32
forall a b. (a -> b) -> a -> b
$ [Vec3] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Vec3]
vectors
Ptr Sphere
s' <- Sphere -> IO (Ptr Sphere)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Sphere
s
[Ptr Vec3]
vectors' <- (Vec3 -> IO (Ptr Vec3)) -> [Vec3] -> IO [Ptr Vec3]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM Vec3 -> IO (Ptr Vec3)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [Vec3]
vectors
Ptr Vec3
vectors'' <- Int -> [Ptr Vec3] -> IO (Ptr Vec3)
forall a. Int -> [Ptr a] -> IO (Ptr a)
packBlockArray Int
16 [Ptr Vec3]
vectors'
Ptr Point3D
maybeCenter <- case Maybe Point3D
center of
Maybe Point3D
Nothing -> Ptr Point3D -> IO (Ptr Point3D)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Point3D
forall a. Ptr a
nullPtr
Just Point3D
jCenter -> do
Ptr Point3D
jCenter' <- Point3D -> IO (Ptr Point3D)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Point3D
jCenter
Ptr Point3D -> IO (Ptr Point3D)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Point3D
jCenter'
Ptr Sphere
result <- Ptr Sphere -> Word32 -> Ptr Vec3 -> Ptr Point3D -> IO (Ptr Sphere)
graphene_sphere_init_from_vectors Ptr Sphere
s' Word32
nVectors Ptr Vec3
vectors'' Ptr Point3D
maybeCenter
Text -> Ptr Sphere -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"sphereInitFromVectors" Ptr Sphere
result
Sphere
result' <- ((ManagedPtr Sphere -> Sphere) -> Ptr Sphere -> IO Sphere
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Sphere -> Sphere
Sphere) Ptr Sphere
result
Sphere -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Sphere
s
(Vec3 -> IO ()) -> [Vec3] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Vec3 -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [Vec3]
vectors
Maybe Point3D -> (Point3D -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Point3D
center Point3D -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Ptr Vec3 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Vec3
vectors''
Sphere -> IO Sphere
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Sphere
result'
#if defined(ENABLE_OVERLOADING)
data SphereInitFromVectorsMethodInfo
instance (signature ~ ([Graphene.Vec3.Vec3] -> Maybe (Graphene.Point3D.Point3D) -> m Sphere), MonadIO m) => O.OverloadedMethod SphereInitFromVectorsMethodInfo Sphere signature where
overloadedMethod = sphereInitFromVectors
instance O.OverloadedMethodInfo SphereInitFromVectorsMethodInfo Sphere where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Sphere.sphereInitFromVectors",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.5/docs/GI-Graphene-Structs-Sphere.html#v:sphereInitFromVectors"
})
#endif
foreign import ccall "graphene_sphere_is_empty" graphene_sphere_is_empty ::
Ptr Sphere ->
IO CInt
sphereIsEmpty ::
(B.CallStack.HasCallStack, MonadIO m) =>
Sphere
-> m Bool
sphereIsEmpty :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Sphere -> m Bool
sphereIsEmpty Sphere
s = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Sphere
s' <- Sphere -> IO (Ptr Sphere)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Sphere
s
CInt
result <- Ptr Sphere -> IO CInt
graphene_sphere_is_empty Ptr Sphere
s'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Sphere -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Sphere
s
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SphereIsEmptyMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod SphereIsEmptyMethodInfo Sphere signature where
overloadedMethod = sphereIsEmpty
instance O.OverloadedMethodInfo SphereIsEmptyMethodInfo Sphere where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Sphere.sphereIsEmpty",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.5/docs/GI-Graphene-Structs-Sphere.html#v:sphereIsEmpty"
})
#endif
foreign import ccall "graphene_sphere_translate" graphene_sphere_translate ::
Ptr Sphere ->
Ptr Graphene.Point3D.Point3D ->
Ptr Sphere ->
IO ()
sphereTranslate ::
(B.CallStack.HasCallStack, MonadIO m) =>
Sphere
-> Graphene.Point3D.Point3D
-> m (Sphere)
sphereTranslate :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Sphere -> Point3D -> m Sphere
sphereTranslate Sphere
s Point3D
point = IO Sphere -> m Sphere
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Sphere -> m Sphere) -> IO Sphere -> m Sphere
forall a b. (a -> b) -> a -> b
$ do
Ptr Sphere
s' <- Sphere -> IO (Ptr Sphere)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Sphere
s
Ptr Point3D
point' <- Point3D -> IO (Ptr Point3D)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Point3D
point
Ptr Sphere
res <- Int -> IO (Ptr Sphere)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
20 :: IO (Ptr Sphere)
Ptr Sphere -> Ptr Point3D -> Ptr Sphere -> IO ()
graphene_sphere_translate Ptr Sphere
s' Ptr Point3D
point' Ptr Sphere
res
Sphere
res' <- ((ManagedPtr Sphere -> Sphere) -> Ptr Sphere -> IO Sphere
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Sphere -> Sphere
Sphere) Ptr Sphere
res
Sphere -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Sphere
s
Point3D -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Point3D
point
Sphere -> IO Sphere
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Sphere
res'
#if defined(ENABLE_OVERLOADING)
data SphereTranslateMethodInfo
instance (signature ~ (Graphene.Point3D.Point3D -> m (Sphere)), MonadIO m) => O.OverloadedMethod SphereTranslateMethodInfo Sphere signature where
overloadedMethod = sphereTranslate
instance O.OverloadedMethodInfo SphereTranslateMethodInfo Sphere where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Sphere.sphereTranslate",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.5/docs/GI-Graphene-Structs-Sphere.html#v:sphereTranslate"
})
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveSphereMethod (t :: Symbol) (o :: *) :: * where
ResolveSphereMethod "containsPoint" o = SphereContainsPointMethodInfo
ResolveSphereMethod "distance" o = SphereDistanceMethodInfo
ResolveSphereMethod "equal" o = SphereEqualMethodInfo
ResolveSphereMethod "free" o = SphereFreeMethodInfo
ResolveSphereMethod "init" o = SphereInitMethodInfo
ResolveSphereMethod "initFromPoints" o = SphereInitFromPointsMethodInfo
ResolveSphereMethod "initFromVectors" o = SphereInitFromVectorsMethodInfo
ResolveSphereMethod "isEmpty" o = SphereIsEmptyMethodInfo
ResolveSphereMethod "translate" o = SphereTranslateMethodInfo
ResolveSphereMethod "getBoundingBox" o = SphereGetBoundingBoxMethodInfo
ResolveSphereMethod "getCenter" o = SphereGetCenterMethodInfo
ResolveSphereMethod "getRadius" o = SphereGetRadiusMethodInfo
ResolveSphereMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSphereMethod t Sphere, O.OverloadedMethod info Sphere p) => OL.IsLabel t (Sphere -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveSphereMethod t Sphere, O.OverloadedMethod info Sphere p, R.HasField t Sphere p) => R.HasField t Sphere p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveSphereMethod t Sphere, O.OverloadedMethodInfo info Sphere) => OL.IsLabel t (O.MethodProxy info Sphere) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif