A structure capable of holding a vector with three dimensions: x, y, and z.
The contents of the <GrapheneVec3> structure are
private and should never be accessed directly.
Adds each component of the two given vectors.
Passed: a <GrapheneVec3>.
Passed: a <GrapheneVec3>.
Passed, filled in, and returned: a <GrapheneVec3>.
return location for the resulting vector
Allocates a new <GrapheneVec3> structure.
The contents of the returned structure are undefined.
Use vec3:init to initialize the vector.
Returned: a <GrapheneVec3>.
the newly allocated <GrapheneVec3> structure. Use
vec3:free to free the resources allocated by
this function.
Computes the cross product of the two given vectors.
Passed: a <GrapheneVec3>.
Passed: a <GrapheneVec3>.
Passed, filled in, and returned: a <GrapheneVec3>.
return location for the resulting vector
Divides each component of the first operand self by the corresponding component of the second operand b, and places the results into the vector res.
Passed: a <GrapheneVec3>.
Passed: a <GrapheneVec3>.
Passed, filled in, and returned: a <GrapheneVec3>.
return location for the resulting vector
Computes the dot product of the two given vectors.
Passed: a <GrapheneVec3>.
Passed: a <GrapheneVec3>.
Returned: a real number.
the value of the dot product
Checks whether the two given <GrapheneVec3> are
equal.
Passed: a <GrapheneVec3>.
Passed: a <GrapheneVec3>.
Returned: a boolean.
true if the two vectors are equal, and false otherwise
Frees the resources allocated by self
Passed: a <GrapheneVec3>.
Retrieves the first component of the given vector self.
Passed: a <GrapheneVec3>.
Returned: a real number.
the value of the first component of the vector
Creates a <GrapheneVec2> that contains the first and
second components of the given <GrapheneVec3>.
Passed: a <GrapheneVec3>.
Passed, filled in, and returned: a <GrapheneVec2>.
return location for a <GrapheneVec2>
Creates a <GrapheneVec3> that contains the first two
components of the given <GrapheneVec3>, and the third
component set to 0.
Passed: a <GrapheneVec3>.
Passed, filled in, and returned: a <GrapheneVec3>.
return location for a <GrapheneVec3>
Converts a <GrapheneVec3> in a
<GrapheneVec4> using 0.0 as the value for the fourth
component of the resulting vector.
Passed: a <GrapheneVec3>.
Passed, filled in, and returned: a <GrapheneVec4>.
return location for the vector
Converts a <GrapheneVec3> in a
<GrapheneVec4> using 1.0 as the value for the fourth
component of the resulting vector.
Passed: a <GrapheneVec3>.
Passed, filled in, and returned: a <GrapheneVec4>.
return location for the vector
Converts a <GrapheneVec3> in a
<GrapheneVec4> using w as the value of the
fourth component of the resulting vector.
Passed: a <GrapheneVec3>.
Passed: a real number.
the value of the W component
Passed, filled in, and returned: a <GrapheneVec4>.
return location for the vector
Retrieves the second component of the given vector self.
Passed: a <GrapheneVec3>.
Returned: a real number.
the value of the second component of the vector
Retrieves the third component of the given vector self.
Passed: a <GrapheneVec3>.
Returned: a real number.
the value of the third component of the vector
Initializes a <GrapheneVec3> using the given values.
This function can be called multiple times.
Passed: a <GrapheneVec3>.
Passed: a real number.
the X field of the vector
Passed: a real number.
the Y field of the vector
Passed: a real number.
the Z field of the vector
Returned: a <GrapheneVec3>.
a pointer to the initialized vector
Initializes a <GrapheneVec3> with the values from an
array.
Passed: a <GrapheneVec3>.
Passed: a f32vector, or a list or vector, each a real number.
an array of 3 floating point values
Returned: a <GrapheneVec3>.
the initialized vector
Initializes a <GrapheneVec3> with the values of
another <GrapheneVec3>.
Passed: a <GrapheneVec3>.
Passed: a <GrapheneVec3>.
Returned: a <GrapheneVec3>.
the initialized vector
Linearly interpolates self and v2 using the given factor.
Passed: a <GrapheneVec3>.
Passed: a <GrapheneVec3>.
Passed: a real number.
the interpolation factor
Passed, filled in, and returned: a <GrapheneVec3>.
the interpolated vector
Retrieves the length of the given vector self.
Passed: a <GrapheneVec3>.
Returned: a real number.
the value of the length of the vector
Compares each component of the two given vectors and creates a vector that contains the maximum values.
Passed: a <GrapheneVec3>.
Passed: a <GrapheneVec3>.
Passed, filled in, and returned: a <GrapheneVec3>.
return location for the result vector
Compares each component of the two given vectors and creates a vector that contains the minimum values.
Passed: a <GrapheneVec3>.
Passed: a <GrapheneVec3>.
Passed, filled in, and returned: a <GrapheneVec3>.
return location for the result vector
Multiplies each component of the two given vectors.
Passed: a <GrapheneVec3>.
Passed: a <GrapheneVec3>.
Passed, filled in, and returned: a <GrapheneVec3>.
return location for the resulting vector
Compares the two given <GrapheneVec3> vectors and
checks whether their values are within the given epsilon.
Passed: a <GrapheneVec3>.
Passed: a <GrapheneVec3>.
Passed: a real number.
the threshold between the two vectors
Returned: a boolean.
true if the two vectors are near each other
Negates the given <GrapheneVec3>.
Passed: a <GrapheneVec3>.
Passed, filled in, and returned: a <GrapheneVec3>.
return location for the result vector
Normalizes the given <GrapheneVec3>.
Passed: a <GrapheneVec3>.
Passed, filled in, and returned: a <GrapheneVec3>.
return location for the normalized vector
Provides a constant pointer to a vector with three components, all sets to 1.
Returned: a <GrapheneVec3>.
a constant vector
Multiplies all components of the given vector with the given scalar factor.
Passed: a <GrapheneVec3>.
Passed: a real number.
the scalar factor
Passed, filled in, and returned: a <GrapheneVec3>.
return location for the result vector
Subtracts from each component of the first operand self the corresponding component of the second operand b and places each result into the components of res.
Passed: a <GrapheneVec3>.
Passed: a <GrapheneVec3>.
Passed, filled in, and returned: a <GrapheneVec3>.
return location for the resulting vector
Copies the components of a <GrapheneVec3> into the
given array.
Passed: a <GrapheneVec3>.
Passed: a f32vector, or a list or vector, each a real number. It is filled in, and returned: a f32vector.
return location for an array of floating point values
Provides a constant pointer to a vector with three components with values set to (1, 0, 0).
Returned: a <GrapheneVec3>.
a constant vector
Provides a constant pointer to a vector with three components with values set to (0, 1, 0).
Returned: a <GrapheneVec3>.
a constant vector
Provides a constant pointer to a vector with three components with values set to (0, 0, 1).
Returned: a <GrapheneVec3>.
a constant vector
Provides a constant pointer to a vector with three components, all sets to 0.
Returned: a <GrapheneVec3>.
a constant vector