graphene.vec4
Module for [Vec4] class
class Vec4
Types 1
classVec4 : gobject.boxed.Boxed
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.
Methods
void add(graphene.vec4.Vec4 b, out graphene.vec4.Vec4 res) nothrowAdds each component of the two given vectors.void divide(graphene.vec4.Vec4 b, out graphene.vec4.Vec4 res) nothrowDivides each component of the first operand `a` by the corresponding component of the second operand `b`, and places the results into the vector res.float getW() nothrowRetrieves the value of the fourth component of the given #graphene_vec4_t. Returns: the value of the fourth componentfloat getX() nothrowRetrieves the value of the first component of the given #graphene_vec4_t. Returns: the value of the first componentvoid getXy(out graphene.vec2.Vec2 res) nothrowCreates a #graphene_vec2_t that contains the first two components of the given #graphene_vec4_t.void getXyz(out graphene.vec3.Vec3 res) nothrowCreates a #graphene_vec3_t that contains the first three components of the given #graphene_vec4_t.float getY() nothrowRetrieves the value of the second component of the given #graphene_vec4_t. Returns: the value of the second componentfloat getZ() nothrowRetrieves the value of the third component of the given #graphene_vec4_t. Returns: the value of the third componentgraphene.vec4.Vec4 init_(float x, float y, float z, float w) nothrowInitializes a #graphene_vec4_t using the given values.graphene.vec4.Vec4 initFromFloat(float[] src) nothrowInitializes a #graphene_vec4_t with the values inside the given array.graphene.vec4.Vec4 initFromVec2(graphene.vec2.Vec2 src, float z, float w) nothrowInitializes a #graphene_vec4_t using the components of a #graphene_vec2_t and the values of `z` and `w`.graphene.vec4.Vec4 initFromVec3(graphene.vec3.Vec3 src, float w) nothrowInitializes a #graphene_vec4_t using the components of a #graphene_vec3_t and the value of `w`.graphene.vec4.Vec4 initFromVec4(graphene.vec4.Vec4 src) nothrowInitializes a #graphene_vec4_t using the components of another #graphene_vec4_t.void interpolate(graphene.vec4.Vec4 v2, double factor, out graphene.vec4.Vec4 res) nothrowLinearly interpolates v1 and v2 using the given factor.float length() nothrowComputes the length of the given #graphene_vec4_t. Returns: the length of the vectorvoid max(graphene.vec4.Vec4 b, out graphene.vec4.Vec4 res) nothrowCompares each component of the two given vectors and creates a vector that contains the maximum values.void min(graphene.vec4.Vec4 b, out graphene.vec4.Vec4 res) nothrowCompares each component of the two given vectors and creates a vector that contains the minimum values.void multiply(graphene.vec4.Vec4 b, out graphene.vec4.Vec4 res) nothrowMultiplies each component of the two given vectors.bool near(graphene.vec4.Vec4 v2, float epsilon) nothrowCompares the two given #graphene_vec4_t vectors and checks whether their values are within the given epsilon.void scale(float factor, out graphene.vec4.Vec4 res) nothrowMultiplies all components of the given vector with the given scalar factor.void subtract(graphene.vec4.Vec4 b, out graphene.vec4.Vec4 res) nothrowSubtracts 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.void toFloat(ref float[] dest) nothrowStores the components of the given #graphene_vec4_t into an array of floating point values.graphene.vec4.Vec4 one() static nothrowRetrieves a pointer to a #graphene_vec4_t with all its components set to 1. Returns: a constant vectorgraphene.vec4.Vec4 wAxis() static nothrowRetrieves a pointer to a #graphene_vec4_t with its components set to (0, 0, 0, 1). Returns: a constant vectorgraphene.vec4.Vec4 xAxis() static nothrowRetrieves a pointer to a #graphene_vec4_t with its components set to (1, 0, 0, 0). Returns: a constant vectorgraphene.vec4.Vec4 yAxis() static nothrowRetrieves a pointer to a #graphene_vec4_t with its components set to (0, 1, 0, 0). Returns: a constant vectorgraphene.vec4.Vec4 zAxis() static nothrowRetrieves a pointer to a #graphene_vec4_t with its components set to (0, 0, 1, 0). Returns: a constant vectorgraphene.vec4.Vec4 zero() static nothrowRetrieves a pointer to a #graphene_vec4_t with all its components set to 0. Returns: a constant vector