gi-graphene-1.0.1: Graphene bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Graphene.Structs.Frustum

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

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 #

(/=) :: Frustum -> Frustum -> Bool #

BoxedObject Frustum Source # 
Instance details

Defined in GI.Graphene.Structs.Frustum

Methods

boxedType :: Frustum -> IO GType #

IsGValue Frustum Source #

Convert Frustum to and from GValue with toGValue and fromGValue.

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 #

newZeroFrustum :: MonadIO m => m Frustum Source #

Construct a Frustum struct initialized to zero.

noFrustum :: Maybe Frustum Source #

A convenience alias for Nothing :: Maybe Frustum.

Methods

Overloaded methods

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