A quaternion.
The contents of the Graphene.Quaternion.Graphene_Quaternion_T structure are private and should never be accessed directly.
procedure Add
(Self : not null access Graphene_Quaternion_T;
B : not null access Graphene_Quaternion_T;
Res : not null access Graphene_Quaternion_T)
Adds two Graphene.Quaternion.Graphene_Quaternion_T A and B. Since: gtk+ 1.10
a Graphene.Quaternion.Graphene_Quaternion_T
the result of the operation
function Dot
(Self : not null access Graphene_Quaternion_T;
B : not null access Graphene_Quaternion_T)
return Interfaces.C.C_float
Computes the dot product of two Graphene.Quaternion.Graphene_Quaternion_T. Since: gtk+ 1.0
a Graphene.Quaternion.Graphene_Quaternion_T
the value of the dot products
function Equal
(Self : not null access Graphene_Quaternion_T;
B : not null access Graphene_Quaternion_T) return Boolean
Checks whether the given quaternions are equal. Since: gtk+ 1.0
a Graphene.Quaternion.Graphene_Quaternion_T
true if the quaternions are equal
procedure Free (Self : not null access Graphene_Quaternion_T)
Releases the resources allocated by graphene_quaternion_alloc. Since: gtk+ 1.0
function From_Object_Free
(B : not null access Graphene_Quaternion_T) return Graphene_Quaternion_T
Return the underlying object and free the pointer. This is meant to be used internally by GtkAda, and should not in general be called by user code.
function Get_Type return Glib.GType
type Graphene_Quaternion_T is record
X : Interfaces.C.C_float;
Y : Interfaces.C.C_float;
Z : Interfaces.C.C_float;
W : Interfaces.C.C_float;
end record;
A quaternion.
The contents of the Graphene.Quaternion.Graphene_Quaternion_T structure are private and should never be accessed directly.
function Init
(Self : not null access Graphene_Quaternion_T;
X : Interfaces.C.C_float;
Y : Interfaces.C.C_float;
Z : Interfaces.C.C_float;
W : Interfaces.C.C_float) return access Graphene_Quaternion_T
Initializes a Graphene.Quaternion.Graphene_Quaternion_T using the given four values. Since: gtk+ 1.0
the first component of the quaternion
the second component of the quaternion
the third component of the quaternion
the fourth component of the quaternion
the initialized quaternion
function Init_From_Angle_Vec3
(Self : not null access Graphene_Quaternion_T;
Angle : Interfaces.C.C_float;
Axis : not null access Graphene.Vec3.Graphene_Vec3_T)
return access Graphene_Quaternion_T
Initializes a Graphene.Quaternion.Graphene_Quaternion_T using an Angle on a specific Axis. Since: gtk+ 1.0
the rotation on a given axis, in degrees
the axis of rotation, expressed as a vector
the initialized quaternion
function Init_From_Angles
(Self : not null access Graphene_Quaternion_T;
Deg_X : Interfaces.C.C_float;
Deg_Y : Interfaces.C.C_float;
Deg_Z : Interfaces.C.C_float) return access Graphene_Quaternion_T
Initializes a Graphene.Quaternion.Graphene_Quaternion_T using the values of the Euler angles on each axis. See also: Graphene.Quaternion.Init_From_Euler Since: gtk+ 1.0
rotation angle on the X axis (yaw), in degrees
rotation angle on the Y axis (pitch), in degrees
rotation angle on the Z axis (roll), in degrees
the initialized quaternion
function Init_From_Euler
(Self : not null access Graphene_Quaternion_T;
E : not null access Graphene.Euler.Graphene_Euler_T)
return access Graphene_Quaternion_T
Initializes a Graphene.Quaternion.Graphene_Quaternion_T using the given Graphene.Euler.Graphene_Euler_T. Since: gtk+ 1.2
a Graphene.Euler.Graphene_Euler_T
the initialized Graphene.Quaternion.Graphene_Quaternion_T
function Init_From_Matrix
(Self : not null access Graphene_Quaternion_T;
M : not null access Graphene.Matrix.Graphene_Matrix_T)
return access Graphene_Quaternion_T
Initializes a Graphene.Quaternion.Graphene_Quaternion_T using the rotation components of a transformation matrix. Since: gtk+ 1.0
a Graphene.Matrix.Graphene_Matrix_T
the initialized quaternion
function Init_From_Quaternion
(Self : not null access Graphene_Quaternion_T;
Src : not null access Graphene_Quaternion_T)
return access Graphene_Quaternion_T
Initializes a Graphene.Quaternion.Graphene_Quaternion_T with the values from Src. Since: gtk+ 1.0
a Graphene.Quaternion.Graphene_Quaternion_T
the initialized quaternion
function Init_From_Radians
(Self : not null access Graphene_Quaternion_T;
Rad_X : Interfaces.C.C_float;
Rad_Y : Interfaces.C.C_float;
Rad_Z : Interfaces.C.C_float) return access Graphene_Quaternion_T
Initializes a Graphene.Quaternion.Graphene_Quaternion_T using the values of the Euler angles on each axis. See also: Graphene.Quaternion.Init_From_Euler Since: gtk+ 1.0
rotation angle on the X axis (yaw), in radians
rotation angle on the Y axis (pitch), in radians
rotation angle on the Z axis (roll), in radians
the initialized quaternion
function Init_From_Vec4
(Self : not null access Graphene_Quaternion_T;
Src : not null access Graphene.Vec4.Graphene_Vec4_T)
return access Graphene_Quaternion_T
Initializes a Graphene.Quaternion.Graphene_Quaternion_T with the values from Src. Since: gtk+ 1.0
a Graphene.Vec4.Graphene_Vec4_T
the initialized quaternion
function Init_Identity
(Self : not null access Graphene_Quaternion_T)
return access Graphene_Quaternion_T
Initializes a Graphene.Quaternion.Graphene_Quaternion_T using the identity transformation. Since: gtk+ 1.0
the initialized quaternion
procedure Invert
(Self : not null access Graphene_Quaternion_T;
Res : not null access Graphene_Quaternion_T)
Inverts a Graphene.Quaternion.Graphene_Quaternion_T, and returns the conjugate quaternion of Q. Since: gtk+ 1.0
return location for the inverted quaternion
procedure Multiply
(Self : not null access Graphene_Quaternion_T;
B : not null access Graphene_Quaternion_T;
Res : not null access Graphene_Quaternion_T)
Multiplies two Graphene.Quaternion.Graphene_Quaternion_T A and B. Since: gtk+ 1.10
a Graphene.Quaternion.Graphene_Quaternion_T
the result of the operation
procedure Normalize
(Self : not null access Graphene_Quaternion_T;
Res : not null access Graphene_Quaternion_T)
Normalizes a Graphene.Quaternion.Graphene_Quaternion_T. Since: gtk+ 1.0
return location for the normalized quaternion
procedure Scale
(Self : not null access Graphene_Quaternion_T;
Factor : Interfaces.C.C_float;
Res : not null access Graphene_Quaternion_T)
Scales all the elements of a Graphene.Quaternion.Graphene_Quaternion_T Q using the given scalar factor. Since: gtk+ 1.10
a scaling factor
the result of the operation
procedure Slerp
(Self : not null access Graphene_Quaternion_T;
B : not null access Graphene_Quaternion_T;
Factor : Interfaces.C.C_float;
Res : not null access Graphene_Quaternion_T)
Interpolates between the two given quaternions using a spherical linear interpolation, or SLERP, using the given interpolation Factor. Since: gtk+ 1.0
a Graphene.Quaternion.Graphene_Quaternion_T
the linear interpolation factor
return location for the interpolated quaternion
procedure To_Angle_Vec3
(Self : not null access Graphene_Quaternion_T;
Angle : out Interfaces.C.C_float;
Axis : not null access Graphene.Vec3.Graphene_Vec3_T)
Converts a quaternion into an Angle, Axis pair. Since: gtk+ 1.0
return location for the angle, in degrees
return location for the rotation axis
procedure To_Angles
(Self : not null access Graphene_Quaternion_T;
Deg_X : out Interfaces.C.C_float;
Deg_Y : out Interfaces.C.C_float;
Deg_Z : out Interfaces.C.C_float)
Converts a Graphene.Quaternion.Graphene_Quaternion_T to its corresponding rotations on the Euler angles on each axis. Since: gtk+ 1.2
return location for the rotation angle on the X axis (yaw), in degrees
return location for the rotation angle on the Y axis (pitch), in degrees
return location for the rotation angle on the Z axis (roll), in degrees
procedure To_Matrix
(Self : not null access Graphene_Quaternion_T;
M : not null access Graphene.Matrix.Graphene_Matrix_T)
Converts a quaternion into a transformation matrix expressing the rotation defined by the Graphene.Quaternion.Graphene_Quaternion_T. Since: gtk+ 1.0
a Graphene.Matrix.Graphene_Matrix_T
procedure To_Radians
(Self : not null access Graphene_Quaternion_T;
Rad_X : out Interfaces.C.C_float;
Rad_Y : out Interfaces.C.C_float;
Rad_Z : out Interfaces.C.C_float)
Converts a Graphene.Quaternion.Graphene_Quaternion_T to its corresponding rotations on the Euler angles on each axis. Since: gtk+ 1.2
return location for the rotation angle on the X axis (yaw), in radians
return location for the rotation angle on the Y axis (pitch), in radians
return location for the rotation angle on the Z axis (roll), in radians
procedure To_Vec4
(Self : not null access Graphene_Quaternion_T;
Res : not null access Graphene.Vec4.Graphene_Vec4_T)
Copies the components of a Graphene.Quaternion.Graphene_Quaternion_T into a Graphene.Vec4.Graphene_Vec4_T. Since: gtk+ 1.0
return location for a Graphene.Vec4.Graphene_Vec4_T