Module vector3

Module vector3 

Source

Functions§

free_vector_componentsDeprecated
free_vector_memoryDeprecated
new_vector3Deprecated
normalize_vectorDeprecated
scale_vectorDeprecated
vector_addDeprecated
vector_cross_productDeprecated
vector_dot_productDeprecated
vector_get_componentsDeprecated
vector_get_normalizedDeprecated
vector_get_scaledDeprecated
vector_set_xDeprecated
vector_set_yDeprecated
vector_set_zDeprecated
vector_subtractDeprecated
viam_free_vector_components
Free memory of an array of vector components at the given address.
viam_free_vector_memory
Free memory at the address of the vector pointer.
viam_new_vector3
Initialize a 3-vector from raw components and retrieve the C pointer to its address.
viam_normalize_vector
Normalizes an existing vector stored at the address of a pointer (vec_ptr)
viam_scale_vector
Scales an existing vector stored at the address of a pointer (vec_ptr) by a float factor
viam_vector_add
Adds two vectors and returns a pointer to the memory of the result
viam_vector_cross_product
Computes the cross product of two vectors and returns a pointer to the memory of the result
viam_vector_dot_product
Computes the dot product of two vectors
viam_vector_get_components
Get the components of a vector as a list of C doubles, the order of the components will be (x, y, z).
viam_vector_get_normalized
Initializes a normalized copy of a vector stored at the address of a pointer (vec_ptr) and returns a pointer to the memory of the result
viam_vector_get_scaled
Initializes a scaled copy of a vector stored at the address of a pointer (vec_ptr) and returns a pointer to the memory of the result
viam_vector_set_x
Set the x component of an existing vector stored at the address of a pointer.
viam_vector_set_y
Set the y component of an existing vector stored at the address of a pointer.
viam_vector_set_z
Set the z component of an existing vector stored at the address of a pointer.
viam_vector_subtract
Subtracts two vectors and returns a pointer to the memory of the result