gi-graphene-1.0.2: 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.Euler

Description

Describe a rotation using Euler angles.

The contents of the Euler structure are private and should never be accessed directly.

Since: 1.2

Synopsis

Exported types

newtype Euler Source #

Memory-managed wrapper type.

Constructors

Euler (ManagedPtr Euler) 

Instances

Instances details
Eq Euler Source # 
Instance details

Defined in GI.Graphene.Structs.Euler

Methods

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

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

IsGValue Euler Source #

Convert Euler to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Graphene.Structs.Euler

ManagedPtrNewtype Euler Source # 
Instance details

Defined in GI.Graphene.Structs.Euler

TypedObject Euler Source # 
Instance details

Defined in GI.Graphene.Structs.Euler

Methods

glibType :: IO GType #

GBoxed Euler Source # 
Instance details

Defined in GI.Graphene.Structs.Euler

HasParentTypes Euler Source # 
Instance details

Defined in GI.Graphene.Structs.Euler

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

Defined in GI.Graphene.Structs.Euler

Methods

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

type ParentTypes Euler Source # 
Instance details

Defined in GI.Graphene.Structs.Euler

type ParentTypes Euler = '[] :: [Type]

newZeroEuler :: MonadIO m => m Euler Source #

Construct a Euler struct initialized to zero.

Methods

Overloaded methods

alloc

eulerAlloc Source #

Arguments

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

Returns: the newly allocated Euler

Allocates a new Euler.

The contents of the returned structure are undefined.

Since: 1.2

equal

eulerEqual Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

a: a Euler

-> Euler

b: a Euler

-> m Bool

Returns: true if the two Euler are equal

Checks if two Euler are equal.

Since: 1.2

free

eulerFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: a Euler

-> m () 

Frees the resources allocated by eulerAlloc.

Since: 1.2

getAlpha

eulerGetAlpha Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: a Euler

-> m Float

Returns: the first component of the Euler angle vector, in radians

Retrieves the first component of the Euler angle vector, depending on the order of rotation.

See also: eulerGetX

Since: 1.10

getBeta

eulerGetBeta Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: a Euler

-> m Float

Returns: the second component of the Euler angle vector, in radians

Retrieves the second component of the Euler angle vector, depending on the order of rotation.

See also: eulerGetY

Since: 1.10

getGamma

eulerGetGamma Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: a Euler

-> m Float

Returns: the third component of the Euler angle vector, in radians

Retrieves the third component of the Euler angle vector, depending on the order of rotation.

See also: eulerGetZ

Since: 1.10

getOrder

eulerGetOrder Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: a Euler

-> m EulerOrder

Returns: the order used to apply the rotations

Retrieves the order used to apply the rotations described in the Euler structure, when converting to and from other structures, like Quaternion and Matrix.

This function does not return the EulerOrderDefault enumeration value; it will return the effective order of rotation instead.

Since: 1.2

getX

eulerGetX Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: a Euler

-> m Float

Returns: the rotation angle

Retrieves the rotation angle on the X axis, in degrees.

Since: 1.2

getY

eulerGetY Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: a Euler

-> m Float

Returns: the rotation angle

Retrieves the rotation angle on the Y axis, in degrees.

Since: 1.2

getZ

eulerGetZ Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: a Euler

-> m Float

Returns: the rotation angle

Retrieves the rotation angle on the Z axis, in degrees.

Since: 1.2

init

eulerInit Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: the Euler to initialize

-> Float

x: rotation angle on the X axis, in degrees

-> Float

y: rotation angle on the Y axis, in degrees

-> Float

z: rotation angle on the Z axis, in degrees

-> m Euler

Returns: the initialized Euler

Initializes a Euler using the given angles.

The order of the rotations is EulerOrderDefault.

Since: 1.2

initFromEuler

eulerInitFromEuler Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: the Euler to initialize

-> Maybe Euler

src: a Euler

-> m Euler

Returns: the initialized Euler

Initializes a Euler using the angles and order of another Euler.

If the Euler src is Nothing, this function is equivalent to calling eulerInit with all angles set to 0.

Since: 1.2

initFromMatrix

eulerInitFromMatrix Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: the Euler to initialize

-> Maybe Matrix

m: a rotation matrix

-> EulerOrder

order: the order used to apply the rotations

-> m Euler

Returns: the initialized Euler

Initializes a Euler using the given rotation matrix.

If the Matrix m is Nothing, the Euler will be initialized with all angles set to 0.

Since: 1.2

initFromQuaternion

eulerInitFromQuaternion Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: a Euler

-> Maybe Quaternion

q: a normalized Quaternion

-> EulerOrder

order: the order used to apply the rotations

-> m Euler

Returns: the initialized Euler

Initializes a Euler using the given normalized quaternion.

If the Quaternion q is Nothing, the Euler will be initialized with all angles set to 0.

Since: 1.2

initFromRadians

eulerInitFromRadians Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: the Euler to initialize

-> Float

x: rotation angle on the X axis, in radians

-> Float

y: rotation angle on the Y axis, in radians

-> Float

z: rotation angle on the Z axis, in radians

-> EulerOrder

order: order of rotations

-> m Euler

Returns: the initialized Euler

Initializes a Euler using the given angles and order of rotation.

Since: 1.10

initFromVec3

eulerInitFromVec3 Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: the Euler to initialize

-> Maybe Vec3

v: a Vec3 containing the rotation angles in degrees

-> EulerOrder

order: the order used to apply the rotations

-> m Euler

Returns: the initialized Euler

Initializes a Euler using the angles contained in a Vec3.

If the Vec3 v is Nothing, the Euler will be initialized with all angles set to 0.

Since: 1.2

initWithOrder

eulerInitWithOrder Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: the Euler to initialize

-> Float

x: rotation angle on the X axis, in degrees

-> Float

y: rotation angle on the Y axis, in degrees

-> Float

z: rotation angle on the Z axis, in degrees

-> EulerOrder

order: the order used to apply the rotations

-> m Euler

Returns: the initialized Euler

Initializes a Euler with the given angles and order.

Since: 1.2

reorder

eulerReorder Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: a Euler

-> EulerOrder

order: the new order

-> m Euler 

Reorders a Euler using order.

This function is equivalent to creating a Quaternion from the given Euler, and then converting the quaternion into another Euler.

Since: 1.2

toMatrix

eulerToMatrix Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: a Euler

-> m Matrix 

Converts a Euler into a transformation matrix expressing the extrinsic composition of rotations described by the Euler angles.

The rotations are applied over the reference frame axes in the order associated with the Euler; for instance, if the order used to initialize e is EulerOrderXyz:

  • the first rotation moves the body around the X axis with an angle φ
  • the second rotation moves the body around the Y axis with an angle of ϑ
  • the third rotation moves the body around the Z axis with an angle of ψ

The rotation sign convention is right-handed, to preserve compatibility between Euler-based, quaternion-based, and angle-axis-based rotations.

Since: 1.2

toQuaternion

eulerToQuaternion Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: a Euler

-> m Quaternion 

Converts a Euler into a Quaternion.

Since: 1.10

toVec3

eulerToVec3 Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Euler

e: a Euler

-> m Vec3 

Retrieves the angles of a Euler and initializes a Vec3 with them.

Since: 1.2