Basics
Guides
API Reference
Basics
Guides
API Reference
[12:14] static extends: object
Generated struct layout helper for GIR record Vec4.
layout ()
Returns the Panama struct layout for
Vec4.
[29:7] extends: object
A structure capable of holding a vector with four dimensions: x, y, z, and w. The contents of the #graphene_vec4_t structure are private and should never be accessed directly.
GrapheneVec4 (Handle = null)
Allocates a new #graphene_vec4_t structure. The contents of the returned structure are undefined. Use graphene_vec4_init() to initialize the vector.
Handle is an optional native handle or wrapper whose handle to adopt; when the native constructor is called.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.add (object b)
Adds each component of the two given vectors.
b is a #graphene_vec4_t.res is return location for the resulting vector.None.divide (object b)
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.
b is a #graphene_vec4_t.res is return location for the resulting vector.None.dot (object b)
Computes the dot product of the two given vectors.
b is a #graphene_vec4_t.the value of the dot product.equal (object v2)
Checks whether the two given #graphene_vec4_t are equal.
v2 is a #graphene_vec4_t.true if the two vectors are equal, and false otherwise.free ()
Frees the resources allocated by @v
None.get_w ()
Retrieves the value of the fourth component of the given #graphene_vec4_t.
the value of the fourth component.get_x ()
Retrieves the value of the first component of the given #graphene_vec4_t.
the value of the first component.get_xy ()
Creates a #graphene_vec2_t that contains the first two components of the given #graphene_vec4_t.
res is return location for a #graphene_vec2_t.None.get_xyz ()
Creates a #graphene_vec3_t that contains the first three components of the given #graphene_vec4_t.
res is return location for a graphene_vec3_t.None.get_y ()
Retrieves the value of the second component of the given #graphene_vec4_t.
the value of the second component.get_z ()
Retrieves the value of the third component of the given #graphene_vec4_t.
the value of the third component.init (double x, double y, double z, double w)
Initializes a #graphene_vec4_t using the given values. This function can be called multiple times.
x is the X field of the vector.y is the Y field of the vector.z is the Z field of the vector.w is the W field of the vector.a pointer to the initialized vector.init_from_float (list src)
Initializes a #graphene_vec4_t with the values inside the given array.
src is an array of four floating point values.the initialized vector.init_from_vec2 (object src, double z, double w)
Initializes a #graphene_vec4_t using the components of a #graphene_vec2_t and the values of @z and @w.
src is a #graphene_vec2_t.z is the value for the third component of @v.w is the value for the fourth component of @v.the initialized vector.init_from_vec3 (object src, double w)
Initializes a #graphene_vec4_t using the components of a #graphene_vec3_t and the value of @w.
src is a #graphene_vec3_t.w is the value for the fourth component of @v.the initialized vector.init_from_vec4 (object src)
Initializes a #graphene_vec4_t using the components of another #graphene_vec4_t.
src is a #graphene_vec4_t.the initialized vector.interpolate (object v2, double factor)
Linearly interpolates @v1 and @v2 using the given @factor.
v2 is a #graphene_vec4_t.factor is the interpolation factor.res is the interpolated vector.None.length ()
Computes the length of the given #graphene_vec4_t.
the length of the vector.max (object b)
Compares each component of the two given vectors and creates a vector that contains the maximum values.
b is a #graphene_vec4_t.res is return location for the result vector.None.min (object b)
Compares each component of the two given vectors and creates a vector that contains the minimum values.
b is a #graphene_vec4_t.res is return location for the result vector.None.multiply (object b)
Multiplies each component of the two given vectors.
b is a #graphene_vec4_t.res is return location for the resulting vector.None.near (object v2, double epsilon)
Compares the two given #graphene_vec4_t vectors and checks whether their values are within the given @epsilon.
v2 is a #graphene_vec4_t.epsilon is the threshold between the two vectors.true if the two vectors are near each other.negate ()
Negates the given #graphene_vec4_t.
res is return location for the result vector.None.normalize ()
Normalizes the given #graphene_vec4_t.
res is return location for the normalized vector.None.scale (double factor)
Multiplies all components of the given vector with the given scalar
factor is the scalar factor.res is return location for the result vector.None.subtract (object b)
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.
b is a #graphene_vec4_t.res is return location for the resulting vector.None.to_float ()
Stores the components of the given #graphene_vec4_t into an array of floating point values.
dest is return location for an array of floating point values.None.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.