Vec4

class Vec4(val grapheneVec4Pointer: <Error class: unknown class><<Error class: unknown class>>, cleaner: <Error class: unknown class>? = null)

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.

Skipped during bindings generation

  • parameter src: Array parameter of type gfloat is not supported

  • parameter dest: dest: Out parameter is not supported

Constructors

Link copied to clipboard
constructor()

Allocate a new Vec4.

constructor(scope: <Error class: unknown class>)

Allocate a new Vec4 using the provided AutofreeScope.

constructor(grapheneVec4Pointer: <Error class: unknown class><<Error class: unknown class>>, cleaner: <Error class: unknown class>? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val grapheneVec4Pointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun add(b: Vec4, res: Vec4)

Adds each component of the two given vectors.

Link copied to clipboard
fun divide(b: Vec4, res: Vec4)

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.

Link copied to clipboard
fun dot(b: Vec4): <Error class: unknown class>

Computes the dot product of the two given vectors.

Link copied to clipboard
fun equal(v2: Vec4): Boolean

Checks whether the two given #graphene_vec4_t are equal.

Link copied to clipboard
fun free()

Frees the resources allocated by @v

Link copied to clipboard
fun getW(): <Error class: unknown class>

Retrieves the value of the fourth component of the given #graphene_vec4_t.

Link copied to clipboard
fun getX(): <Error class: unknown class>

Retrieves the value of the first component of the given #graphene_vec4_t.

Link copied to clipboard
fun getXy(res: Vec2)

Creates a #graphene_vec2_t that contains the first two components of the given #graphene_vec4_t.

Link copied to clipboard
fun getXyz(res: Vec3)

Creates a #graphene_vec3_t that contains the first three components of the given #graphene_vec4_t.

Link copied to clipboard
fun getY(): <Error class: unknown class>

Retrieves the value of the second component of the given #graphene_vec4_t.

Link copied to clipboard
fun getZ(): <Error class: unknown class>

Retrieves the value of the third component of the given #graphene_vec4_t.

Link copied to clipboard
fun init(x: <Error class: unknown class>, y: <Error class: unknown class>, z: <Error class: unknown class>, w: <Error class: unknown class>): Vec4

Initializes a #graphene_vec4_t using the given values.

Link copied to clipboard
fun initFromVec2(src: Vec2, z: <Error class: unknown class>, w: <Error class: unknown class>): Vec4

Initializes a #graphene_vec4_t using the components of a #graphene_vec2_t and the values of @z and @w.

Link copied to clipboard
fun initFromVec3(src: Vec3, w: <Error class: unknown class>): Vec4

Initializes a #graphene_vec4_t using the components of a #graphene_vec3_t and the value of @w.

Link copied to clipboard

Initializes a #graphene_vec4_t using the components of another #graphene_vec4_t.

Link copied to clipboard
fun interpolate(v2: Vec4, factor: <Error class: unknown class>, res: Vec4)

Linearly interpolates @v1 and @v2 using the given @factor.

Link copied to clipboard
fun length(): <Error class: unknown class>

Computes the length of the given #graphene_vec4_t.

Link copied to clipboard
fun max(b: Vec4, res: Vec4)

Compares each component of the two given vectors and creates a vector that contains the maximum values.

Link copied to clipboard
fun min(b: Vec4, res: Vec4)

Compares each component of the two given vectors and creates a vector that contains the minimum values.

Link copied to clipboard
fun multiply(b: Vec4, res: Vec4)

Multiplies each component of the two given vectors.

Link copied to clipboard
fun near(v2: Vec4, epsilon: <Error class: unknown class>): Boolean

Compares the two given #graphene_vec4_t vectors and checks whether their values are within the given @epsilon.

Link copied to clipboard
fun negate(res: Vec4)

Negates the given #graphene_vec4_t.

Link copied to clipboard
fun normalize(res: Vec4)

Normalizes the given #graphene_vec4_t.

Link copied to clipboard
fun scale(factor: <Error class: unknown class>, res: Vec4)

Multiplies all components of the given vector with the given scalar @factor.

Link copied to clipboard
fun subtract(b: Vec4, res: Vec4)

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.