gi-graphene-1.0.8: Graphene bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Graphene.Structs.Frustum

Contents

- Exported types
- Methods
  - alloc
  - containsPoint
  - equal
  - free
  - init
  - initFromFrustum
  - initFromMatrix
  - intersectsBox
  - intersectsSphere

Description

A 3D volume delimited by 2D clip planes.

The contents of the `graphene_frustum_t` are private, and should not be modified directly.

Since: 1.2

Synopsis

- newtype Frustum = Frustum (ManagedPtr Frustum)
- newZeroFrustum :: MonadIO m => m Frustum
- frustumAlloc :: (HasCallStack, MonadIO m) => m Frustum
- frustumContainsPoint :: (HasCallStack, MonadIO m) => Frustum -> Point3D -> m Bool
- frustumEqual :: (HasCallStack, MonadIO m) => Frustum -> Frustum -> m Bool
- frustumFree :: (HasCallStack, MonadIO m) => Frustum -> m ()
- frustumInit :: (HasCallStack, MonadIO m) => Frustum -> Plane -> Plane -> Plane -> Plane -> Plane -> Plane -> m Frustum
- frustumInitFromFrustum :: (HasCallStack, MonadIO m) => Frustum -> Frustum -> m Frustum
- frustumInitFromMatrix :: (HasCallStack, MonadIO m) => Frustum -> Matrix -> m Frustum
- frustumIntersectsBox :: (HasCallStack, MonadIO m) => Frustum -> Box -> m Bool
- frustumIntersectsSphere :: (HasCallStack, MonadIO m) => Frustum -> Sphere -> m Bool

# Exported types

newtype Frustum Source #

Memory-managed wrapper type.

Constructors

Frustum (ManagedPtr Frustum) |

#### Instances

Instances details

Eq Frustum Source # |
Instance details Defined in GI.Graphene.Structs.Frustum Methods (==) :: Frustum -> Frustum -> Bool Source # (/=) :: Frustum -> Frustum -> Bool Source #
GBoxed Frustum Source # |
Instance details Defined in GI.Graphene.Structs.Frustum
ManagedPtrNewtype Frustum Source # |
Instance details Defined in GI.Graphene.Structs.Frustum Methods toManagedPtr :: Frustum -> ManagedPtr Frustum Source #
TypedObject Frustum Source # |
Instance details Defined in GI.Graphene.Structs.Frustum Methods glibType :: IO GType Source #
HasParentTypes Frustum Source # |
Instance details Defined in GI.Graphene.Structs.Frustum
tag ~ 'AttrSet => Constructible Frustum tag Source # |
Instance details Defined in GI.Graphene.Structs.Frustum Methods new :: MonadIO m => (ManagedPtr Frustum -> Frustum) -> [AttrOp Frustum tag] -> m Frustum Source #
IsGValue (Maybe Frustum) Source # | Convert `Frustum` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Graphene.Structs.Frustum Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe Frustum -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe Frustum) Source #
type ParentTypes Frustum Source # |
Instance details Defined in GI.Graphene.Structs.Frustum type ParentTypes Frustum = '[] :: [Type]

newZeroFrustum :: MonadIO m => m Frustum Source #

Construct a `Frustum` struct initialized to zero.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

containsPoint, equal, free, init, initFromFrustum, initFromMatrix, intersectsBox, intersectsSphere.

#### Getters

None.

#### Setters

None.

## alloc

frustumAlloc Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m Frustum | Returns: the newly allocated `Frustum` structure. Use `frustumFree` to free the resources allocated by this function.

Allocates a new `Frustum` structure.

The contents of the returned structure are undefined.

Since: 1.2

## containsPoint

frustumContainsPoint Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Frustum | `f`: a `Frustum`
-> Point3D | `point`: a `Point3D`
-> m Bool | Returns: `true` if the point is inside the frustum

Checks whether a point is inside the volume defined by the given `Frustum`.

Since: 1.2

## equal

frustumEqual Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Frustum | `a`: a `Frustum`
-> Frustum | `b`: a `Frustum`
-> m Bool | Returns: `true` if the given frustums are equal

Checks whether the two given `Frustum` are equal.

Since: 1.6

## free

frustumFree Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Frustum | `f`: a `Frustum`
-> m () |

Frees the resources allocated by `frustumAlloc`.

Since: 1.2

## init

frustumInit Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Frustum | `f`: the `Frustum` to initialize
-> Plane | `p0`: a clipping plane
-> Plane | `p1`: a clipping plane
-> Plane | `p2`: a clipping plane
-> Plane | `p3`: a clipping plane
-> Plane | `p4`: a clipping plane
-> Plane | `p5`: a clipping plane
-> m Frustum | Returns: the initialized frustum

Initializes the given `Frustum` using the provided clipping planes.

Since: 1.2

## initFromFrustum

frustumInitFromFrustum Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Frustum | `f`: the `Frustum` to initialize
-> Frustum | `src`: a `Frustum`
-> m Frustum | Returns: the initialized frustum

Initializes the given `Frustum` using the clipping planes of another `Frustum`.

Since: 1.2

## initFromMatrix

frustumInitFromMatrix Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Frustum | `f`: a `Frustum`
-> Matrix | `matrix`: a `Matrix`
-> m Frustum | Returns: the initialized frustum

Initializes a `Frustum` using the given `matrix`.

Since: 1.2

## intersectsBox

frustumIntersectsBox Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Frustum | `f`: a `Frustum`
-> Box | `box`: a `Box`
-> m Bool | Returns: `true` if the box intersects the frustum

Checks whether the given `box` intersects a plane of a `Frustum`.

Since: 1.2

## intersectsSphere

frustumIntersectsSphere Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Frustum | `f`: a `Frustum`
-> Sphere | `sphere`: a `Sphere`
-> m Bool | Returns: `true` if the sphere intersects the frustum

Checks whether the given `sphere` intersects a plane of a `Frustum`.

Since: 1.2