gi-graphene-1.0.8: Graphene bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
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 #

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

TypedObject Frustum Source # 
Instance details

Defined in GI.Graphene.Structs.Frustum

Methods

glibType :: IO GType

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

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

gvalueSet_ :: Ptr GValue -> Maybe Frustum -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Frustum)

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