{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Graphene.Structs.Plane
(
Plane(..) ,
newZeroPlane ,
#if defined(ENABLE_OVERLOADING)
ResolvePlaneMethod ,
#endif
planeAlloc ,
#if defined(ENABLE_OVERLOADING)
PlaneDistanceMethodInfo ,
#endif
planeDistance ,
#if defined(ENABLE_OVERLOADING)
PlaneEqualMethodInfo ,
#endif
planeEqual ,
#if defined(ENABLE_OVERLOADING)
PlaneFreeMethodInfo ,
#endif
planeFree ,
#if defined(ENABLE_OVERLOADING)
PlaneGetConstantMethodInfo ,
#endif
planeGetConstant ,
#if defined(ENABLE_OVERLOADING)
PlaneGetNormalMethodInfo ,
#endif
planeGetNormal ,
#if defined(ENABLE_OVERLOADING)
PlaneInitMethodInfo ,
#endif
planeInit ,
#if defined(ENABLE_OVERLOADING)
PlaneInitFromPlaneMethodInfo ,
#endif
planeInitFromPlane ,
#if defined(ENABLE_OVERLOADING)
PlaneInitFromPointMethodInfo ,
#endif
planeInitFromPoint ,
#if defined(ENABLE_OVERLOADING)
PlaneInitFromPointsMethodInfo ,
#endif
planeInitFromPoints ,
#if defined(ENABLE_OVERLOADING)
PlaneInitFromVec4MethodInfo ,
#endif
planeInitFromVec4 ,
#if defined(ENABLE_OVERLOADING)
PlaneNegateMethodInfo ,
#endif
planeNegate ,
#if defined(ENABLE_OVERLOADING)
PlaneNormalizeMethodInfo ,
#endif
planeNormalize ,
#if defined(ENABLE_OVERLOADING)
PlaneTransformMethodInfo ,
#endif
planeTransform ,
) 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.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.Matrix as Graphene.Matrix
import {-# SOURCE #-} qualified GI.Graphene.Structs.Point3D as Graphene.Point3D
import {-# SOURCE #-} qualified GI.Graphene.Structs.Vec3 as Graphene.Vec3
import {-# SOURCE #-} qualified GI.Graphene.Structs.Vec4 as Graphene.Vec4
newtype Plane = Plane (SP.ManagedPtr Plane)
deriving (Plane -> Plane -> Bool
(Plane -> Plane -> Bool) -> (Plane -> Plane -> Bool) -> Eq Plane
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Plane -> Plane -> Bool
$c/= :: Plane -> Plane -> Bool
== :: Plane -> Plane -> Bool
$c== :: Plane -> Plane -> Bool
Eq)
instance SP.ManagedPtrNewtype Plane where
toManagedPtr :: Plane -> ManagedPtr Plane
toManagedPtr (Plane ManagedPtr Plane
p) = ManagedPtr Plane
p
foreign import ccall "graphene_plane_get_type" c_graphene_plane_get_type ::
IO GType
type instance O.ParentTypes Plane = '[]
instance O.HasParentTypes Plane
instance B.Types.TypedObject Plane where
glibType :: IO GType
glibType = IO GType
c_graphene_plane_get_type
instance B.Types.GBoxed Plane
instance B.GValue.IsGValue (Maybe Plane) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_graphene_plane_get_type
gvalueSet_ :: Ptr GValue -> Maybe Plane -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Plane
P.Nothing = Ptr GValue -> Ptr Plane -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr Plane
forall a. Ptr a
FP.nullPtr :: FP.Ptr Plane)
gvalueSet_ Ptr GValue
gv (P.Just Plane
obj) = Plane -> (Ptr Plane -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Plane
obj (Ptr GValue -> Ptr Plane -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Plane)
gvalueGet_ Ptr GValue
gv = do
Ptr Plane
ptr <- Ptr GValue -> IO (Ptr Plane)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr Plane)
if Ptr Plane
ptr Ptr Plane -> Ptr Plane -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Plane
forall a. Ptr a
FP.nullPtr
then Plane -> Maybe Plane
forall a. a -> Maybe a
P.Just (Plane -> Maybe Plane) -> IO Plane -> IO (Maybe Plane)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Plane -> Plane) -> Ptr Plane -> IO Plane
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr Plane -> Plane
Plane Ptr Plane
ptr
else Maybe Plane -> IO (Maybe Plane)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Plane
forall a. Maybe a
P.Nothing
newZeroPlane :: MonadIO m => m Plane
newZeroPlane :: forall (m :: * -> *). MonadIO m => m Plane
newZeroPlane = IO Plane -> m Plane
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Plane -> m Plane) -> IO Plane -> m Plane
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr Plane)
forall a. GBoxed a => Int -> IO (Ptr a)
callocBoxedBytes Int
20 IO (Ptr Plane) -> (Ptr Plane -> IO Plane) -> IO Plane
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr Plane -> Plane) -> Ptr Plane -> IO Plane
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Plane -> Plane
Plane
instance tag ~ 'AttrSet => Constructible Plane tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr Plane -> Plane) -> [AttrOp Plane tag] -> m Plane
new ManagedPtr Plane -> Plane
_ [AttrOp Plane tag]
attrs = do
Plane
o <- m Plane
forall (m :: * -> *). MonadIO m => m Plane
newZeroPlane
Plane -> [AttrOp Plane 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set Plane
o [AttrOp Plane tag]
[AttrOp Plane 'AttrSet]
attrs
Plane -> m Plane
forall (m :: * -> *) a. Monad m => a -> m a
return Plane
o
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Plane
type instance O.AttributeList Plane = PlaneAttributeList
type PlaneAttributeList = ('[ ] :: [(Symbol, *)])
#endif
foreign import ccall "graphene_plane_alloc" graphene_plane_alloc ::
IO (Ptr Plane)
planeAlloc ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Plane
planeAlloc :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Plane
planeAlloc = IO Plane -> m Plane
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Plane -> m Plane) -> IO Plane -> m Plane
forall a b. (a -> b) -> a -> b
$ do
Ptr Plane
result <- IO (Ptr Plane)
graphene_plane_alloc
Text -> Ptr Plane -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"planeAlloc" Ptr Plane
result
Plane
result' <- ((ManagedPtr Plane -> Plane) -> Ptr Plane -> IO Plane
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Plane -> Plane
Plane) Ptr Plane
result
Plane -> IO Plane
forall (m :: * -> *) a. Monad m => a -> m a
return Plane
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "graphene_plane_distance" graphene_plane_distance ::
Ptr Plane ->
Ptr Graphene.Point3D.Point3D ->
IO CFloat
planeDistance ::
(B.CallStack.HasCallStack, MonadIO m) =>
Plane
-> Graphene.Point3D.Point3D
-> m Float
planeDistance :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Plane -> Point3D -> m Float
planeDistance Plane
p Point3D
point = IO Float -> m Float
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 Plane
p' <- Plane -> IO (Ptr Plane)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Plane
p
Ptr Point3D
point' <- Point3D -> IO (Ptr Point3D)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Point3D
point
CFloat
result <- Ptr Plane -> Ptr Point3D -> IO CFloat
graphene_plane_distance Ptr Plane
p' Ptr Point3D
point'
let result' :: Float
result' = CFloat -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac CFloat
result
Plane -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Plane
p
Point3D -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Point3D
point
Float -> IO Float
forall (m :: * -> *) a. Monad m => a -> m a
return Float
result'
#if defined(ENABLE_OVERLOADING)
data PlaneDistanceMethodInfo
instance (signature ~ (Graphene.Point3D.Point3D -> m Float), MonadIO m) => O.OverloadedMethod PlaneDistanceMethodInfo Plane signature where
overloadedMethod = planeDistance
instance O.OverloadedMethodInfo PlaneDistanceMethodInfo Plane where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Plane.planeDistance",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.4/docs/GI-Graphene-Structs-Plane.html#v:planeDistance"
})
#endif
foreign import ccall "graphene_plane_equal" graphene_plane_equal ::
Ptr Plane ->
Ptr Plane ->
IO CInt
planeEqual ::
(B.CallStack.HasCallStack, MonadIO m) =>
Plane
-> Plane
-> m Bool
planeEqual :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Plane -> Plane -> m Bool
planeEqual Plane
a Plane
b = IO Bool -> m Bool
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 Plane
a' <- Plane -> IO (Ptr Plane)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Plane
a
Ptr Plane
b' <- Plane -> IO (Ptr Plane)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Plane
b
CInt
result <- Ptr Plane -> Ptr Plane -> IO CInt
graphene_plane_equal Ptr Plane
a' Ptr Plane
b'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Plane -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Plane
a
Plane -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Plane
b
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data PlaneEqualMethodInfo
instance (signature ~ (Plane -> m Bool), MonadIO m) => O.OverloadedMethod PlaneEqualMethodInfo Plane signature where
overloadedMethod = planeEqual
instance O.OverloadedMethodInfo PlaneEqualMethodInfo Plane where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Plane.planeEqual",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.4/docs/GI-Graphene-Structs-Plane.html#v:planeEqual"
})
#endif
foreign import ccall "graphene_plane_free" graphene_plane_free ::
Ptr Plane ->
IO ()
planeFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
Plane
-> m ()
planeFree :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Plane -> m ()
planeFree Plane
p = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Plane
p' <- Plane -> IO (Ptr Plane)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Plane
p
Ptr Plane -> IO ()
graphene_plane_free Ptr Plane
p'
Plane -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Plane
p
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PlaneFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod PlaneFreeMethodInfo Plane signature where
overloadedMethod = planeFree
instance O.OverloadedMethodInfo PlaneFreeMethodInfo Plane where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Plane.planeFree",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.4/docs/GI-Graphene-Structs-Plane.html#v:planeFree"
})
#endif
foreign import ccall "graphene_plane_get_constant" graphene_plane_get_constant ::
Ptr Plane ->
IO CFloat
planeGetConstant ::
(B.CallStack.HasCallStack, MonadIO m) =>
Plane
-> m Float
planeGetConstant :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Plane -> m Float
planeGetConstant Plane
p = IO Float -> m Float
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 Plane
p' <- Plane -> IO (Ptr Plane)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Plane
p
CFloat
result <- Ptr Plane -> IO CFloat
graphene_plane_get_constant Ptr Plane
p'
let result' :: Float
result' = CFloat -> Float
forall a b. (Real a, Fractional b) => a -> b
realToFrac CFloat
result
Plane -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Plane
p
Float -> IO Float
forall (m :: * -> *) a. Monad m => a -> m a
return Float
result'
#if defined(ENABLE_OVERLOADING)
data PlaneGetConstantMethodInfo
instance (signature ~ (m Float), MonadIO m) => O.OverloadedMethod PlaneGetConstantMethodInfo Plane signature where
overloadedMethod = planeGetConstant
instance O.OverloadedMethodInfo PlaneGetConstantMethodInfo Plane where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Plane.planeGetConstant",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.4/docs/GI-Graphene-Structs-Plane.html#v:planeGetConstant"
})
#endif
foreign import ccall "graphene_plane_get_normal" graphene_plane_get_normal ::
Ptr Plane ->
Ptr Graphene.Vec3.Vec3 ->
IO ()
planeGetNormal ::
(B.CallStack.HasCallStack, MonadIO m) =>
Plane
-> m (Graphene.Vec3.Vec3)
planeGetNormal :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Plane -> m Vec3
planeGetNormal Plane
p = IO Vec3 -> m Vec3
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Vec3 -> m Vec3) -> IO Vec3 -> m Vec3
forall a b. (a -> b) -> a -> b
$ do
Ptr Plane
p' <- Plane -> IO (Ptr Plane)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Plane
p
Ptr Vec3
normal <- Int -> IO (Ptr Vec3)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
16 :: IO (Ptr Graphene.Vec3.Vec3)
Ptr Plane -> Ptr Vec3 -> IO ()
graphene_plane_get_normal Ptr Plane
p' Ptr Vec3
normal
Vec3
normal' <- ((ManagedPtr Vec3 -> Vec3) -> Ptr Vec3 -> IO Vec3
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Vec3 -> Vec3
Graphene.Vec3.Vec3) Ptr Vec3
normal
Plane -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Plane
p
Vec3 -> IO Vec3
forall (m :: * -> *) a. Monad m => a -> m a
return Vec3
normal'
#if defined(ENABLE_OVERLOADING)
data PlaneGetNormalMethodInfo
instance (signature ~ (m (Graphene.Vec3.Vec3)), MonadIO m) => O.OverloadedMethod PlaneGetNormalMethodInfo Plane signature where
overloadedMethod = planeGetNormal
instance O.OverloadedMethodInfo PlaneGetNormalMethodInfo Plane where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Plane.planeGetNormal",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.4/docs/GI-Graphene-Structs-Plane.html#v:planeGetNormal"
})
#endif
foreign import ccall "graphene_plane_init" graphene_plane_init ::
Ptr Plane ->
Ptr Graphene.Vec3.Vec3 ->
CFloat ->
IO (Ptr Plane)
planeInit ::
(B.CallStack.HasCallStack, MonadIO m) =>
Plane
-> Maybe (Graphene.Vec3.Vec3)
-> Float
-> m Plane
planeInit :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Plane -> Maybe Vec3 -> Float -> m Plane
planeInit Plane
p Maybe Vec3
normal Float
constant = IO Plane -> m Plane
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Plane -> m Plane) -> IO Plane -> m Plane
forall a b. (a -> b) -> a -> b
$ do
Ptr Plane
p' <- Plane -> IO (Ptr Plane)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Plane
p
Ptr Vec3
maybeNormal <- case Maybe Vec3
normal of
Maybe Vec3
Nothing -> Ptr Vec3 -> IO (Ptr Vec3)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Vec3
forall a. Ptr a
nullPtr
Just Vec3
jNormal -> do
Ptr Vec3
jNormal' <- Vec3 -> IO (Ptr Vec3)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Vec3
jNormal
Ptr Vec3 -> IO (Ptr Vec3)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Vec3
jNormal'
let constant' :: CFloat
constant' = Float -> CFloat
forall a b. (Real a, Fractional b) => a -> b
realToFrac Float
constant
Ptr Plane
result <- Ptr Plane -> Ptr Vec3 -> CFloat -> IO (Ptr Plane)
graphene_plane_init Ptr Plane
p' Ptr Vec3
maybeNormal CFloat
constant'
Text -> Ptr Plane -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"planeInit" Ptr Plane
result
Plane
result' <- ((ManagedPtr Plane -> Plane) -> Ptr Plane -> IO Plane
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Plane -> Plane
Plane) Ptr Plane
result
Plane -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Plane
p
Maybe Vec3 -> (Vec3 -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Vec3
normal Vec3 -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Plane -> IO Plane
forall (m :: * -> *) a. Monad m => a -> m a
return Plane
result'
#if defined(ENABLE_OVERLOADING)
data PlaneInitMethodInfo
instance (signature ~ (Maybe (Graphene.Vec3.Vec3) -> Float -> m Plane), MonadIO m) => O.OverloadedMethod PlaneInitMethodInfo Plane signature where
overloadedMethod = planeInit
instance O.OverloadedMethodInfo PlaneInitMethodInfo Plane where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Plane.planeInit",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.4/docs/GI-Graphene-Structs-Plane.html#v:planeInit"
})
#endif
foreign import ccall "graphene_plane_init_from_plane" graphene_plane_init_from_plane ::
Ptr Plane ->
Ptr Plane ->
IO (Ptr Plane)
planeInitFromPlane ::
(B.CallStack.HasCallStack, MonadIO m) =>
Plane
-> Plane
-> m Plane
planeInitFromPlane :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Plane -> Plane -> m Plane
planeInitFromPlane Plane
p Plane
src = IO Plane -> m Plane
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Plane -> m Plane) -> IO Plane -> m Plane
forall a b. (a -> b) -> a -> b
$ do
Ptr Plane
p' <- Plane -> IO (Ptr Plane)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Plane
p
Ptr Plane
src' <- Plane -> IO (Ptr Plane)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Plane
src
Ptr Plane
result <- Ptr Plane -> Ptr Plane -> IO (Ptr Plane)
graphene_plane_init_from_plane Ptr Plane
p' Ptr Plane
src'
Text -> Ptr Plane -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"planeInitFromPlane" Ptr Plane
result
Plane
result' <- ((ManagedPtr Plane -> Plane) -> Ptr Plane -> IO Plane
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Plane -> Plane
Plane) Ptr Plane
result
Plane -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Plane
p
Plane -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Plane
src
Plane -> IO Plane
forall (m :: * -> *) a. Monad m => a -> m a
return Plane
result'
#if defined(ENABLE_OVERLOADING)
data PlaneInitFromPlaneMethodInfo
instance (signature ~ (Plane -> m Plane), MonadIO m) => O.OverloadedMethod PlaneInitFromPlaneMethodInfo Plane signature where
overloadedMethod = planeInitFromPlane
instance O.OverloadedMethodInfo PlaneInitFromPlaneMethodInfo Plane where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Plane.planeInitFromPlane",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.4/docs/GI-Graphene-Structs-Plane.html#v:planeInitFromPlane"
})
#endif
foreign import ccall "graphene_plane_init_from_point" graphene_plane_init_from_point ::
Ptr Plane ->
Ptr Graphene.Vec3.Vec3 ->
Ptr Graphene.Point3D.Point3D ->
IO (Ptr Plane)
planeInitFromPoint ::
(B.CallStack.HasCallStack, MonadIO m) =>
Plane
-> Graphene.Vec3.Vec3
-> Graphene.Point3D.Point3D
-> m Plane
planeInitFromPoint :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Plane -> Vec3 -> Point3D -> m Plane
planeInitFromPoint Plane
p Vec3
normal Point3D
point = IO Plane -> m Plane
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Plane -> m Plane) -> IO Plane -> m Plane
forall a b. (a -> b) -> a -> b
$ do
Ptr Plane
p' <- Plane -> IO (Ptr Plane)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Plane
p
Ptr Vec3
normal' <- Vec3 -> IO (Ptr Vec3)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Vec3
normal
Ptr Point3D
point' <- Point3D -> IO (Ptr Point3D)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Point3D
point
Ptr Plane
result <- Ptr Plane -> Ptr Vec3 -> Ptr Point3D -> IO (Ptr Plane)
graphene_plane_init_from_point Ptr Plane
p' Ptr Vec3
normal' Ptr Point3D
point'
Text -> Ptr Plane -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"planeInitFromPoint" Ptr Plane
result
Plane
result' <- ((ManagedPtr Plane -> Plane) -> Ptr Plane -> IO Plane
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Plane -> Plane
Plane) Ptr Plane
result
Plane -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Plane
p
Vec3 -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Vec3
normal
Point3D -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Point3D
point
Plane -> IO Plane
forall (m :: * -> *) a. Monad m => a -> m a
return Plane
result'
#if defined(ENABLE_OVERLOADING)
data PlaneInitFromPointMethodInfo
instance (signature ~ (Graphene.Vec3.Vec3 -> Graphene.Point3D.Point3D -> m Plane), MonadIO m) => O.OverloadedMethod PlaneInitFromPointMethodInfo Plane signature where
overloadedMethod = planeInitFromPoint
instance O.OverloadedMethodInfo PlaneInitFromPointMethodInfo Plane where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Plane.planeInitFromPoint",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.4/docs/GI-Graphene-Structs-Plane.html#v:planeInitFromPoint"
})
#endif
foreign import ccall "graphene_plane_init_from_points" graphene_plane_init_from_points ::
Ptr Plane ->
Ptr Graphene.Point3D.Point3D ->
Ptr Graphene.Point3D.Point3D ->
Ptr Graphene.Point3D.Point3D ->
IO (Ptr Plane)
planeInitFromPoints ::
(B.CallStack.HasCallStack, MonadIO m) =>
Plane
-> Graphene.Point3D.Point3D
-> Graphene.Point3D.Point3D
-> Graphene.Point3D.Point3D
-> m Plane
planeInitFromPoints :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Plane -> Point3D -> Point3D -> Point3D -> m Plane
planeInitFromPoints Plane
p Point3D
a Point3D
b Point3D
c = IO Plane -> m Plane
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Plane -> m Plane) -> IO Plane -> m Plane
forall a b. (a -> b) -> a -> b
$ do
Ptr Plane
p' <- Plane -> IO (Ptr Plane)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Plane
p
Ptr Point3D
a' <- Point3D -> IO (Ptr Point3D)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Point3D
a
Ptr Point3D
b' <- Point3D -> IO (Ptr Point3D)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Point3D
b
Ptr Point3D
c' <- Point3D -> IO (Ptr Point3D)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Point3D
c
Ptr Plane
result <- Ptr Plane
-> Ptr Point3D -> Ptr Point3D -> Ptr Point3D -> IO (Ptr Plane)
graphene_plane_init_from_points Ptr Plane
p' Ptr Point3D
a' Ptr Point3D
b' Ptr Point3D
c'
Text -> Ptr Plane -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"planeInitFromPoints" Ptr Plane
result
Plane
result' <- ((ManagedPtr Plane -> Plane) -> Ptr Plane -> IO Plane
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Plane -> Plane
Plane) Ptr Plane
result
Plane -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Plane
p
Point3D -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Point3D
a
Point3D -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Point3D
b
Point3D -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Point3D
c
Plane -> IO Plane
forall (m :: * -> *) a. Monad m => a -> m a
return Plane
result'
#if defined(ENABLE_OVERLOADING)
data PlaneInitFromPointsMethodInfo
instance (signature ~ (Graphene.Point3D.Point3D -> Graphene.Point3D.Point3D -> Graphene.Point3D.Point3D -> m Plane), MonadIO m) => O.OverloadedMethod PlaneInitFromPointsMethodInfo Plane signature where
overloadedMethod = planeInitFromPoints
instance O.OverloadedMethodInfo PlaneInitFromPointsMethodInfo Plane where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Plane.planeInitFromPoints",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.4/docs/GI-Graphene-Structs-Plane.html#v:planeInitFromPoints"
})
#endif
foreign import ccall "graphene_plane_init_from_vec4" graphene_plane_init_from_vec4 ::
Ptr Plane ->
Ptr Graphene.Vec4.Vec4 ->
IO (Ptr Plane)
planeInitFromVec4 ::
(B.CallStack.HasCallStack, MonadIO m) =>
Plane
-> Graphene.Vec4.Vec4
-> m Plane
planeInitFromVec4 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Plane -> Vec4 -> m Plane
planeInitFromVec4 Plane
p Vec4
src = IO Plane -> m Plane
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Plane -> m Plane) -> IO Plane -> m Plane
forall a b. (a -> b) -> a -> b
$ do
Ptr Plane
p' <- Plane -> IO (Ptr Plane)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Plane
p
Ptr Vec4
src' <- Vec4 -> IO (Ptr Vec4)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Vec4
src
Ptr Plane
result <- Ptr Plane -> Ptr Vec4 -> IO (Ptr Plane)
graphene_plane_init_from_vec4 Ptr Plane
p' Ptr Vec4
src'
Text -> Ptr Plane -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"planeInitFromVec4" Ptr Plane
result
Plane
result' <- ((ManagedPtr Plane -> Plane) -> Ptr Plane -> IO Plane
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Plane -> Plane
Plane) Ptr Plane
result
Plane -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Plane
p
Vec4 -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Vec4
src
Plane -> IO Plane
forall (m :: * -> *) a. Monad m => a -> m a
return Plane
result'
#if defined(ENABLE_OVERLOADING)
data PlaneInitFromVec4MethodInfo
instance (signature ~ (Graphene.Vec4.Vec4 -> m Plane), MonadIO m) => O.OverloadedMethod PlaneInitFromVec4MethodInfo Plane signature where
overloadedMethod = planeInitFromVec4
instance O.OverloadedMethodInfo PlaneInitFromVec4MethodInfo Plane where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Plane.planeInitFromVec4",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.4/docs/GI-Graphene-Structs-Plane.html#v:planeInitFromVec4"
})
#endif
foreign import ccall "graphene_plane_negate" graphene_plane_negate ::
Ptr Plane ->
Ptr Plane ->
IO ()
planeNegate ::
(B.CallStack.HasCallStack, MonadIO m) =>
Plane
-> m (Plane)
planeNegate :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Plane -> m Plane
planeNegate Plane
p = IO Plane -> m Plane
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Plane -> m Plane) -> IO Plane -> m Plane
forall a b. (a -> b) -> a -> b
$ do
Ptr Plane
p' <- Plane -> IO (Ptr Plane)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Plane
p
Ptr Plane
res <- Int -> IO (Ptr Plane)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
20 :: IO (Ptr Plane)
Ptr Plane -> Ptr Plane -> IO ()
graphene_plane_negate Ptr Plane
p' Ptr Plane
res
Plane
res' <- ((ManagedPtr Plane -> Plane) -> Ptr Plane -> IO Plane
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Plane -> Plane
Plane) Ptr Plane
res
Plane -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Plane
p
Plane -> IO Plane
forall (m :: * -> *) a. Monad m => a -> m a
return Plane
res'
#if defined(ENABLE_OVERLOADING)
data PlaneNegateMethodInfo
instance (signature ~ (m (Plane)), MonadIO m) => O.OverloadedMethod PlaneNegateMethodInfo Plane signature where
overloadedMethod = planeNegate
instance O.OverloadedMethodInfo PlaneNegateMethodInfo Plane where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Plane.planeNegate",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.4/docs/GI-Graphene-Structs-Plane.html#v:planeNegate"
})
#endif
foreign import ccall "graphene_plane_normalize" graphene_plane_normalize ::
Ptr Plane ->
Ptr Plane ->
IO ()
planeNormalize ::
(B.CallStack.HasCallStack, MonadIO m) =>
Plane
-> m (Plane)
planeNormalize :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Plane -> m Plane
planeNormalize Plane
p = IO Plane -> m Plane
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Plane -> m Plane) -> IO Plane -> m Plane
forall a b. (a -> b) -> a -> b
$ do
Ptr Plane
p' <- Plane -> IO (Ptr Plane)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Plane
p
Ptr Plane
res <- Int -> IO (Ptr Plane)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
20 :: IO (Ptr Plane)
Ptr Plane -> Ptr Plane -> IO ()
graphene_plane_normalize Ptr Plane
p' Ptr Plane
res
Plane
res' <- ((ManagedPtr Plane -> Plane) -> Ptr Plane -> IO Plane
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Plane -> Plane
Plane) Ptr Plane
res
Plane -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Plane
p
Plane -> IO Plane
forall (m :: * -> *) a. Monad m => a -> m a
return Plane
res'
#if defined(ENABLE_OVERLOADING)
data PlaneNormalizeMethodInfo
instance (signature ~ (m (Plane)), MonadIO m) => O.OverloadedMethod PlaneNormalizeMethodInfo Plane signature where
overloadedMethod = planeNormalize
instance O.OverloadedMethodInfo PlaneNormalizeMethodInfo Plane where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Plane.planeNormalize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.4/docs/GI-Graphene-Structs-Plane.html#v:planeNormalize"
})
#endif
foreign import ccall "graphene_plane_transform" graphene_plane_transform ::
Ptr Plane ->
Ptr Graphene.Matrix.Matrix ->
Ptr Graphene.Matrix.Matrix ->
Ptr Plane ->
IO ()
planeTransform ::
(B.CallStack.HasCallStack, MonadIO m) =>
Plane
-> Graphene.Matrix.Matrix
-> Maybe (Graphene.Matrix.Matrix)
-> m (Plane)
planeTransform :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Plane -> Matrix -> Maybe Matrix -> m Plane
planeTransform Plane
p Matrix
matrix Maybe Matrix
normalMatrix = IO Plane -> m Plane
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Plane -> m Plane) -> IO Plane -> m Plane
forall a b. (a -> b) -> a -> b
$ do
Ptr Plane
p' <- Plane -> IO (Ptr Plane)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Plane
p
Ptr Matrix
matrix' <- Matrix -> IO (Ptr Matrix)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Matrix
matrix
Ptr Matrix
maybeNormalMatrix <- case Maybe Matrix
normalMatrix of
Maybe Matrix
Nothing -> Ptr Matrix -> IO (Ptr Matrix)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Matrix
forall a. Ptr a
nullPtr
Just Matrix
jNormalMatrix -> do
Ptr Matrix
jNormalMatrix' <- Matrix -> IO (Ptr Matrix)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Matrix
jNormalMatrix
Ptr Matrix -> IO (Ptr Matrix)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Matrix
jNormalMatrix'
Ptr Plane
res <- Int -> IO (Ptr Plane)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
20 :: IO (Ptr Plane)
Ptr Plane -> Ptr Matrix -> Ptr Matrix -> Ptr Plane -> IO ()
graphene_plane_transform Ptr Plane
p' Ptr Matrix
matrix' Ptr Matrix
maybeNormalMatrix Ptr Plane
res
Plane
res' <- ((ManagedPtr Plane -> Plane) -> Ptr Plane -> IO Plane
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Plane -> Plane
Plane) Ptr Plane
res
Plane -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Plane
p
Matrix -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Matrix
matrix
Maybe Matrix -> (Matrix -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Matrix
normalMatrix Matrix -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Plane -> IO Plane
forall (m :: * -> *) a. Monad m => a -> m a
return Plane
res'
#if defined(ENABLE_OVERLOADING)
data PlaneTransformMethodInfo
instance (signature ~ (Graphene.Matrix.Matrix -> Maybe (Graphene.Matrix.Matrix) -> m (Plane)), MonadIO m) => O.OverloadedMethod PlaneTransformMethodInfo Plane signature where
overloadedMethod = planeTransform
instance O.OverloadedMethodInfo PlaneTransformMethodInfo Plane where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Graphene.Structs.Plane.planeTransform",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-graphene-1.0.4/docs/GI-Graphene-Structs-Plane.html#v:planeTransform"
})
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolvePlaneMethod (t :: Symbol) (o :: *) :: * where
ResolvePlaneMethod "distance" o = PlaneDistanceMethodInfo
ResolvePlaneMethod "equal" o = PlaneEqualMethodInfo
ResolvePlaneMethod "free" o = PlaneFreeMethodInfo
ResolvePlaneMethod "init" o = PlaneInitMethodInfo
ResolvePlaneMethod "initFromPlane" o = PlaneInitFromPlaneMethodInfo
ResolvePlaneMethod "initFromPoint" o = PlaneInitFromPointMethodInfo
ResolvePlaneMethod "initFromPoints" o = PlaneInitFromPointsMethodInfo
ResolvePlaneMethod "initFromVec4" o = PlaneInitFromVec4MethodInfo
ResolvePlaneMethod "negate" o = PlaneNegateMethodInfo
ResolvePlaneMethod "normalize" o = PlaneNormalizeMethodInfo
ResolvePlaneMethod "transform" o = PlaneTransformMethodInfo
ResolvePlaneMethod "getConstant" o = PlaneGetConstantMethodInfo
ResolvePlaneMethod "getNormal" o = PlaneGetNormalMethodInfo
ResolvePlaneMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolvePlaneMethod t Plane, O.OverloadedMethod info Plane p) => OL.IsLabel t (Plane -> 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 ~ ResolvePlaneMethod t Plane, O.OverloadedMethod info Plane p, R.HasField t Plane p) => R.HasField t Plane p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolvePlaneMethod t Plane, O.OverloadedMethodInfo info Plane) => OL.IsLabel t (O.MethodProxy info Plane) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif