A structure capable of holding a vector with four dimensions: x, y, z, and w.
The contents of the Graphene.Vec4.Graphene_Vec4_T structure are private and should never be accessed directly.
procedure Add
(Self : not null access Graphene_Vec4_T;
B : not null access Graphene_Vec4_T;
Res : not null access Graphene_Vec4_T)
Adds each component of the two given vectors. Since: gtk+ 1.0
a Graphene.Vec4.Graphene_Vec4_T
return location for the resulting vector
procedure Divide
(Self : not null access Graphene_Vec4_T;
B : not null access Graphene_Vec4_T;
Res : not null access Graphene_Vec4_T)
Divides each component of the first operand A by the corresponding component of the second operand B, and places the results into the vector Res. Since: gtk+ 1.0
a Graphene.Vec4.Graphene_Vec4_T
return location for the resulting vector
function Dot
(Self : not null access Graphene_Vec4_T;
B : not null access Graphene_Vec4_T) return Interfaces.C.C_float
Computes the dot product of the two given vectors. Since: gtk+ 1.0
a Graphene.Vec4.Graphene_Vec4_T
the value of the dot product
function Equal
(Self : not null access Graphene_Vec4_T;
V2 : not null access Graphene_Vec4_T) return Boolean
Checks whether the two given Graphene.Vec4.Graphene_Vec4_T are equal. Since: gtk+ 1.2
a Graphene.Vec4.Graphene_Vec4_T
true if the two vectors are equal, and false otherwise
procedure Free (Self : not null access Graphene_Vec4_T)
Frees the resources allocated by V Since: gtk+ 1.0
function From_Object_Free
(B : not null access Graphene_Vec4_T) return Graphene_Vec4_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
function Get_W
(Self : not null access Graphene_Vec4_T) return Interfaces.C.C_float
Retrieves the value of the fourth component of the given Graphene.Vec4.Graphene_Vec4_T. Since: gtk+ 1.0
the value of the fourth component
function Get_X
(Self : not null access Graphene_Vec4_T) return Interfaces.C.C_float
Retrieves the value of the first component of the given Graphene.Vec4.Graphene_Vec4_T. Since: gtk+ 1.0
the value of the first component
procedure Get_Xy
(Self : not null access Graphene_Vec4_T;
Res : not null access Graphene.Vec2.Graphene_Vec2_T)
Creates a Graphene.Vec2.Graphene_Vec2_T that contains the first two components of the given Graphene.Vec4.Graphene_Vec4_T. Since: gtk+ 1.0
return location for a Graphene.Vec2.Graphene_Vec2_T
procedure Get_Xyz
(Self : not null access Graphene_Vec4_T;
Res : not null access Graphene.Vec3.Graphene_Vec3_T)
Creates a Graphene.Vec3.Graphene_Vec3_T that contains the first three components of the given Graphene.Vec4.Graphene_Vec4_T. Since: gtk+ 1.0
return location for a graphene_vec3_t
function Get_Y
(Self : not null access Graphene_Vec4_T) return Interfaces.C.C_float
Retrieves the value of the second component of the given Graphene.Vec4.Graphene_Vec4_T. Since: gtk+ 1.0
the value of the second component
function Get_Z
(Self : not null access Graphene_Vec4_T) return Interfaces.C.C_float
Retrieves the value of the third component of the given Graphene.Vec4.Graphene_Vec4_T. Since: gtk+ 1.0
the value of the third component
type Graphene_Vec4_T is record
Value : Graphene.Config.Graphene_Simd4f;
end record;
A structure capable of holding a vector with four dimensions: x, y, z, and w.
The contents of the Graphene.Vec4.Graphene_Vec4_T structure are private and should never be accessed directly.
function Init
(Self : not null access Graphene_Vec4_T;
X : Interfaces.C.C_float;
Y : Interfaces.C.C_float;
Z : Interfaces.C.C_float;
W : Interfaces.C.C_float) return access Graphene_Vec4_T
Initializes a Graphene.Vec4.Graphene_Vec4_T using the given values. This function can be called multiple times. Since: gtk+ 1.0
the X field of the vector
the Y field of the vector
the Z field of the vector
the W field of the vector
a pointer to the initialized vector
function Init_From_Vec2
(Self : not null access Graphene_Vec4_T;
Src : not null access Graphene.Vec2.Graphene_Vec2_T;
Z : Interfaces.C.C_float;
W : Interfaces.C.C_float) return access Graphene_Vec4_T
Initializes a Graphene.Vec4.Graphene_Vec4_T using the components of a Graphene.Vec2.Graphene_Vec2_T and the values of Z and W. Since: gtk+ 1.0
a Graphene.Vec2.Graphene_Vec2_T
the value for the third component of V
the value for the fourth component of V
the initialized vector
function Init_From_Vec3
(Self : not null access Graphene_Vec4_T;
Src : not null access Graphene.Vec3.Graphene_Vec3_T;
W : Interfaces.C.C_float) return access Graphene_Vec4_T
Initializes a Graphene.Vec4.Graphene_Vec4_T using the components of a Graphene.Vec3.Graphene_Vec3_T and the value of W. Since: gtk+ 1.0
a Graphene.Vec3.Graphene_Vec3_T
the value for the fourth component of V
the initialized vector
function Init_From_Vec4
(Self : not null access Graphene_Vec4_T;
Src : not null access Graphene_Vec4_T) return access Graphene_Vec4_T
Initializes a Graphene.Vec4.Graphene_Vec4_T using the components of another Graphene.Vec4.Graphene_Vec4_T. Since: gtk+ 1.0
a Graphene.Vec4.Graphene_Vec4_T
the initialized vector
procedure Interpolate
(Self : not null access Graphene_Vec4_T;
V2 : not null access Graphene_Vec4_T;
Factor : Gdouble;
Res : not null access Graphene_Vec4_T)
Linearly interpolates V1 and V2 using the given Factor. Since: gtk+ 1.10
a Graphene.Vec4.Graphene_Vec4_T
the interpolation factor
the interpolated vector
function Length
(Self : not null access Graphene_Vec4_T) return Interfaces.C.C_float
Computes the length of the given Graphene.Vec4.Graphene_Vec4_T. Since: gtk+ 1.0
the length of the vector
procedure Max
(Self : not null access Graphene_Vec4_T;
B : not null access Graphene_Vec4_T;
Res : not null access Graphene_Vec4_T)
Compares each component of the two given vectors and creates a vector that contains the maximum values. Since: gtk+ 1.0
a Graphene.Vec4.Graphene_Vec4_T
return location for the result vector
procedure Min
(Self : not null access Graphene_Vec4_T;
B : not null access Graphene_Vec4_T;
Res : not null access Graphene_Vec4_T)
Compares each component of the two given vectors and creates a vector that contains the minimum values. Since: gtk+ 1.0
a Graphene.Vec4.Graphene_Vec4_T
return location for the result vector
procedure Multiply
(Self : not null access Graphene_Vec4_T;
B : not null access Graphene_Vec4_T;
Res : not null access Graphene_Vec4_T)
Multiplies each component of the two given vectors. Since: gtk+ 1.0
a Graphene.Vec4.Graphene_Vec4_T
return location for the resulting vector
function Near
(Self : not null access Graphene_Vec4_T;
V2 : not null access Graphene_Vec4_T;
Epsilon : Interfaces.C.C_float) return Boolean
Compares the two given Graphene.Vec4.Graphene_Vec4_T vectors and checks whether their values are within the given Epsilon. Since: gtk+ 1.2
a Graphene.Vec4.Graphene_Vec4_T
the threshold between the two vectors
true if the two vectors are near each other
procedure Negate
(Self : not null access Graphene_Vec4_T;
Res : not null access Graphene_Vec4_T)
Negates the given Graphene.Vec4.Graphene_Vec4_T. Since: gtk+ 1.2
return location for the result vector
procedure Normalize
(Self : not null access Graphene_Vec4_T;
Res : not null access Graphene_Vec4_T)
Normalizes the given Graphene.Vec4.Graphene_Vec4_T. Since: gtk+ 1.0
return location for the normalized vector
function One return access constant Graphene_Vec4_T
Retrieves a pointer to a Graphene.Vec4.Graphene_Vec4_T with all its components set to 1. Since: gtk+ 1.0
a constant vector
procedure Scale
(Self : not null access Graphene_Vec4_T;
Factor : Interfaces.C.C_float;
Res : not null access Graphene_Vec4_T)
Multiplies all components of the given vector with the given scalar Factor. Since: gtk+ 1.2
the scalar factor
return location for the result vector
procedure Subtract
(Self : not null access Graphene_Vec4_T;
B : not null access Graphene_Vec4_T;
Res : not null access Graphene_Vec4_T)
Subtracts from each component of the first operand A the corresponding component of the second operand B and places each result into the components of Res. Since: gtk+ 1.0
a Graphene.Vec4.Graphene_Vec4_T
return location for the resulting vector
function W_Axis return access constant Graphene_Vec4_T
Retrieves a pointer to a Graphene.Vec4.Graphene_Vec4_T with its components set to (0, 0, 0, 1). Since: gtk+ 1.0
a constant vector
function X_Axis return access constant Graphene_Vec4_T
Retrieves a pointer to a Graphene.Vec4.Graphene_Vec4_T with its components set to (1, 0, 0, 0). Since: gtk+ 1.0
a constant vector
function Y_Axis return access constant Graphene_Vec4_T
Retrieves a pointer to a Graphene.Vec4.Graphene_Vec4_T with its components set to (0, 1, 0, 0). Since: gtk+ 1.0
a constant vector
function Z_Axis return access constant Graphene_Vec4_T
Retrieves a pointer to a Graphene.Vec4.Graphene_Vec4_T with its components set to (0, 0, 1, 0). Since: gtk+ 1.0
a constant vector
function Zero return access constant Graphene_Vec4_T
Retrieves a pointer to a Graphene.Vec4.Graphene_Vec4_T with all its components set to 0. Since: gtk+ 1.0
a constant vector