vector3_cross_product


Description:

public void vector3_cross_product (float result, float u, float v)

Calculates the cross product between the two vectors u and v.

The cross product is a vector perpendicular to both u and v. This can be useful for calculating the normal of a polygon by creating two vectors in its plane using the polygons vertices and taking their cross product.

If the two vectors are parallel then the cross product is 0.

You can use a right hand rule to determine which direction the perpendicular vector will point: If you place the two vectors tail, to tail and imagine grabbing the perpendicular line that extends through the common tail with your right hand such that you fingers rotate in the direction from u to v then the resulting vector points along your extended thumb.

Parameters:

result

Where you want the result written

u

Your first 3 component vector

v

Your second 3 component vector

Returns:

The cross product between two vectors u and v.


Namespace: Cogl
Package: doc