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.Ray

Description

A ray emitted from an origin in a given direction.

The contents of the graphene_ray_t structure are private, and should not be modified directly.

Since: 1.4

Synopsis

Exported types

newtype Ray Source #

Memory-managed wrapper type.

Constructors

Ray (ManagedPtr Ray) 

Instances

Instances details
Eq Ray Source # 
Instance details

Defined in GI.Graphene.Structs.Ray

Methods

(==) :: Ray -> Ray -> Bool #

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

BoxedObject Ray Source # 
Instance details

Defined in GI.Graphene.Structs.Ray

Methods

boxedType :: Ray -> IO GType #

IsGValue Ray Source #

Convert Ray to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Graphene.Structs.Ray

tag ~ 'AttrSet => Constructible Ray tag Source # 
Instance details

Defined in GI.Graphene.Structs.Ray

Methods

new :: MonadIO m => (ManagedPtr Ray -> Ray) -> [AttrOp Ray tag] -> m Ray #

newZeroRay :: MonadIO m => m Ray Source #

Construct a Ray struct initialized to zero.

noRay :: Maybe Ray Source #

A convenience alias for Nothing :: Maybe Ray.

Methods

Overloaded methods

alloc

rayAlloc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Ray

Returns: the newly allocated Ray. Use rayFree to free the resources allocated by this function

Allocates a new Ray structure.

The contents of the returned structure are undefined.

Since: 1.4

equal

rayEqual Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ray

a: a Ray

-> Ray

b: a Ray

-> m Bool

Returns: true if the given rays are equal

Checks whether the two given Ray are equal.

Since: 1.4

free

rayFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ray

r: a Ray

-> m () 

Frees the resources allocated by rayAlloc.

Since: 1.4

getClosestPointToPoint

rayGetClosestPointToPoint Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ray

r: a Ray

-> Point3D

p: a Point3D

-> m Point3D 

Computes the point on the given Ray that is closest to the given point p.

Since: 1.4

getDirection

rayGetDirection Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ray

r: a Ray

-> m Vec3 

Retrieves the direction of the given Ray.

Since: 1.4

getDistanceToPlane

rayGetDistanceToPlane Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ray

r: a Ray

-> Plane

p: a Plane

-> m Float

Returns: the distance of the origin of the ray from the plane

Computes the distance of the origin of the given Ray from the given plane.

If the ray does not intersect the plane, this function returns INFINITY.

Since: 1.4

getDistanceToPoint

rayGetDistanceToPoint Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ray

r: a Ray

-> Point3D

p: a Point3D

-> m Float

Returns: the distance of the point

Computes the distance from the origin of the given ray to the given point.

Since: 1.4

getOrigin

rayGetOrigin Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ray

r: a Ray

-> m Point3D 

Retrieves the origin of the given Ray.

Since: 1.4

getPositionAt

rayGetPositionAt Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ray

r: a Ray

-> Float

t: the distance along the ray

-> m Point3D 

Retrieves the coordinates of a point at the distance t along the given Ray.

Since: 1.4

init

rayInit Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ray

r: the Ray to initialize

-> Maybe Point3D

origin: the origin of the ray

-> Maybe Vec3

direction: the direction vector

-> m Ray

Returns: the initialized ray

Initializes the given Ray using the given origin and direction values.

Since: 1.4

initFromRay

rayInitFromRay Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ray

r: the Ray to initialize

-> Ray

src: a Ray

-> m Ray

Returns: the initialized ray

Initializes the given Ray using the origin and direction values of another Ray.

Since: 1.4

initFromVec3

rayInitFromVec3 Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ray

r: the Ray to initialize

-> Maybe Vec3

origin: a Vec3

-> Maybe Vec3

direction: a Vec3

-> m Ray

Returns: the initialized ray

Initializes the given Ray using the given vectors.

Since: 1.4