math: Adds an experimental cogl_vector3_* API

This adds a math utility API for handling 3 component, single precision
float vectors with the following; mostly self explanatory functions:

cogl_vector3_init
cogl_vector3_init_zero
cogl_vector3_equal
cogl_vector3_equal_with_epsilon
cogl_vector3_copy
cogl_vector3_free
cogl_vector3_invert
cogl_vector3_add
cogl_vector3_subtract
cogl_vector3_multiply_scalar
cogl_vector3_divide_scalar
cogl_vector3_normalize
cogl_vector3_magnitude
cogl_vector3_cross_product
cogl_vector3_dot_product
cogl_vector3_distance

Since the API is experimental you will need to define
COGL_ENABLE_EXPERIMENTAL_API before including cogl.h if you want to use
the API.
This commit is contained in:
Robert Bragg
2010-05-20 14:54:44 +01:00
parent af591f5c09
commit fa22ee0e8d
6 changed files with 676 additions and 0 deletions

View File

@ -90,6 +90,7 @@
</section>
<xi:include href="xml/cogl-buffer.xml"/>
<xi:include href="xml/cogl-vector.xml"/>
</chapter>

View File

@ -501,6 +501,26 @@ cogl_is_pixel_buffer
<SUBSECTION>
cogl_texture_new_from_buffer
<SECTION>
<FILE>cogl-vector</FILE>
<TITLE>Vectors</TITLE>
cogl_vector3_init
cogl_vector3_init_zero
cogl_vector3_equal
cogl_vector3_equal_with_epsilon
cogl_vector3_copy
cogl_vector3_free
cogl_vector3_invert
cogl_vector3_add
cogl_vector3_subtract
cogl_vector3_multiply_scalar
cogl_vector3_divide_scalar
cogl_vector3_normalize
cogl_vector3_magnitude
cogl_vector3_cross_product
cogl_vector3_dot_product
cogl_vector3_distance
<SUBSECTION Private>
cogl_buffer_access_get_type
cogl_buffer_update_hint_get_type