Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GI.Graphene.Structs.Box
Contents
Description
A 3D box, described as the volume between a minimum and a maximum vertices.
Since: 1.2
Synopsis
- newtype Box = Box (ManagedPtr Box)
- newZeroBox :: MonadIO m => m Box
- boxAlloc :: (HasCallStack, MonadIO m) => m Box
- boxContainsBox :: (HasCallStack, MonadIO m) => Box -> Box -> m Bool
- boxContainsPoint :: (HasCallStack, MonadIO m) => Box -> Point3D -> m Bool
- boxEmpty :: (HasCallStack, MonadIO m) => m Box
- boxEqual :: (HasCallStack, MonadIO m) => Box -> Box -> m Bool
- boxExpand :: (HasCallStack, MonadIO m) => Box -> Point3D -> m Box
- boxExpandScalar :: (HasCallStack, MonadIO m) => Box -> Float -> m Box
- boxExpandVec3 :: (HasCallStack, MonadIO m) => Box -> Vec3 -> m Box
- boxFree :: (HasCallStack, MonadIO m) => Box -> m ()
- boxGetBoundingSphere :: (HasCallStack, MonadIO m) => Box -> m Sphere
- boxGetCenter :: (HasCallStack, MonadIO m) => Box -> m Point3D
- boxGetDepth :: (HasCallStack, MonadIO m) => Box -> m Float
- boxGetHeight :: (HasCallStack, MonadIO m) => Box -> m Float
- boxGetMax :: (HasCallStack, MonadIO m) => Box -> m Point3D
- boxGetMin :: (HasCallStack, MonadIO m) => Box -> m Point3D
- boxGetSize :: (HasCallStack, MonadIO m) => Box -> m Vec3
- boxGetWidth :: (HasCallStack, MonadIO m) => Box -> m Float
- boxInfinite :: (HasCallStack, MonadIO m) => m Box
- boxInit :: (HasCallStack, MonadIO m) => Box -> Maybe Point3D -> Maybe Point3D -> m Box
- boxInitFromBox :: (HasCallStack, MonadIO m) => Box -> Box -> m Box
- boxInitFromPoints :: (HasCallStack, MonadIO m) => Box -> [Point3D] -> m Box
- boxInitFromVec3 :: (HasCallStack, MonadIO m) => Box -> Maybe Vec3 -> Maybe Vec3 -> m Box
- boxInitFromVectors :: (HasCallStack, MonadIO m) => Box -> [Vec3] -> m Box
- boxIntersection :: (HasCallStack, MonadIO m) => Box -> Box -> m (Bool, Box)
- boxMinusOne :: (HasCallStack, MonadIO m) => m Box
- boxOne :: (HasCallStack, MonadIO m) => m Box
- boxOneMinusOne :: (HasCallStack, MonadIO m) => m Box
- boxUnion :: (HasCallStack, MonadIO m) => Box -> Box -> m Box
- boxZero :: (HasCallStack, MonadIO m) => m Box
Exported types
Memory-managed wrapper type.
Instances
Eq Box Source # | |
GBoxed Box Source # | |
Defined in GI.Graphene.Structs.Box | |
ManagedPtrNewtype Box Source # | |
Defined in GI.Graphene.Structs.Box Methods toManagedPtr :: Box -> ManagedPtr Box | |
TypedObject Box Source # | |
Defined in GI.Graphene.Structs.Box | |
HasParentTypes Box Source # | |
Defined in GI.Graphene.Structs.Box | |
tag ~ 'AttrSet => Constructible Box tag Source # | |
IsGValue (Maybe Box) Source # | Convert |
Defined in GI.Graphene.Structs.Box Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Box -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Box) | |
type ParentTypes Box Source # | |
Defined in GI.Graphene.Structs.Box |
Methods
Click to display all available methods, including inherited ones
Methods
containsBox, containsPoint, equal, expand, expandScalar, expandVec3, free, init, initFromBox, initFromPoints, initFromVec3, initFromVectors, intersection, union.
Getters
getBoundingSphere, getCenter, getDepth, getHeight, getMax, getMin, getSize, getWidth.
Setters
None.
alloc
Arguments
:: (HasCallStack, MonadIO m) | |
=> m Box | Returns: the newly allocated |
containsBox
containsPoint
Arguments
:: (HasCallStack, MonadIO m) | |
=> Box |
|
-> Point3D |
|
-> m Bool | Returns: |
Checks whether box
contains the given point
.
Since: 1.2
empty
Arguments
:: (HasCallStack, MonadIO m) | |
=> m Box | Returns: a |
A degenerate Box
that can only be expanded.
The returned value is owned by Graphene and should not be modified or freed.
Since: 1.2
equal
Arguments
:: (HasCallStack, MonadIO m) | |
=> Box |
|
-> Box |
|
-> m Bool | Returns: |
Checks whether the two given boxes are equal.
Since: 1.2
expand
Arguments
:: (HasCallStack, MonadIO m) | |
=> Box |
|
-> Point3D |
|
-> m Box |
Expands the dimensions of box
to include the coordinates at point
.
Since: 1.2
expandScalar
expandVec3
Arguments
:: (HasCallStack, MonadIO m) | |
=> Box |
|
-> Vec3 |
|
-> m Box |
Expands the dimensions of box
to include the coordinates of the
given vector.
Since: 1.2
free
Arguments
:: (HasCallStack, MonadIO m) | |
=> Box |
|
-> m () |
Frees the resources allocated by boxAlloc
.
Since: 1.2
getBoundingSphere
Arguments
:: (HasCallStack, MonadIO m) | |
=> Box |
|
-> m Sphere |
getCenter
Arguments
:: (HasCallStack, MonadIO m) | |
=> Box |
|
-> m Point3D |
Retrieves the coordinates of the center of a Box
.
Since: 1.2
getDepth
Arguments
:: (HasCallStack, MonadIO m) | |
=> Box |
|
-> m Float | Returns: the depth of the box |
Retrieves the size of the box
on the Z axis.
Since: 1.2
getHeight
Arguments
:: (HasCallStack, MonadIO m) | |
=> Box |
|
-> m Float | Returns: the height of the box |
Retrieves the size of the box
on the Y axis.
Since: 1.2
getMax
Arguments
:: (HasCallStack, MonadIO m) | |
=> Box |
|
-> m Point3D |
Retrieves the coordinates of the maximum point of the given
Box
.
Since: 1.2
getMin
Arguments
:: (HasCallStack, MonadIO m) | |
=> Box |
|
-> m Point3D |
Retrieves the coordinates of the minimum point of the given
Box
.
Since: 1.2
getSize
Arguments
:: (HasCallStack, MonadIO m) | |
=> Box |
|
-> m Vec3 |
Retrieves the size of the box on all three axes, and stores
it into the given size
vector.
Since: 1.2
getWidth
Arguments
:: (HasCallStack, MonadIO m) | |
=> Box |
|
-> m Float | Returns: the width of the box |
Retrieves the size of the box
on the X axis.
Since: 1.2
infinite
Arguments
:: (HasCallStack, MonadIO m) | |
=> m Box | Returns: a |
A degenerate Box
that cannot be expanded.
The returned value is owned by Graphene and should not be modified or freed.
Since: 1.2
init
Arguments
:: (HasCallStack, MonadIO m) | |
=> Box |
|
-> Maybe Point3D |
|
-> Maybe Point3D |
|
-> m Box | Returns: the initialized |
Initializes the given Box
with two vertices.
Since: 1.2
initFromBox
initFromPoints
initFromVec3
initFromVectors
intersection
minusOne
Arguments
:: (HasCallStack, MonadIO m) | |
=> m Box | Returns: a |
A Box
with the minimum vertex set at (-1, -1, -1) and the
maximum vertex set at (0, 0, 0).
The returned value is owned by Graphene and should not be modified or freed.
Since: 1.2
one
Arguments
:: (HasCallStack, MonadIO m) | |
=> m Box | Returns: a |
A Box
with the minimum vertex set at (0, 0, 0) and the
maximum vertex set at (1, 1, 1).
The returned value is owned by Graphene and should not be modified or freed.
Since: 1.2
oneMinusOne
Arguments
:: (HasCallStack, MonadIO m) | |
=> m Box | Returns: a |
A Box
with the minimum vertex set at (-1, -1, -1) and the
maximum vertex set at (1, 1, 1).
The returned value is owned by Graphene and should not be modified or freed.
Since: 1.2
union
Unions the two given Box
.
Since: 1.2