2D vector definition and operations More...
Data Structures | |
| struct | _Eina_Vector2 |
Macros | |
| #define | EINA_VECTOR2(x, y) |
Typedefs | |
| typedef struct _Eina_Vector2 | Eina_Vector2 |
| typedef struct _Eina_Vector3 | Eina_Vector3 |
Functions | |
| static void | eina_vector2_set (Eina_Vector2 *dst, double x, double y) |
| Set parameters to vector. | |
| static void | eina_vector2_array_set (Eina_Vector2 *dst, const double *v) |
| Set array to vector. | |
| static void | eina_vector2_copy (Eina_Vector2 *dst, const Eina_Vector2 *src) |
| Copy vector. | |
| static void | eina_vector2_negate (Eina_Vector2 *out, const Eina_Vector2 *v) |
| Make negative vector. | |
| static void | eina_vector2_add (Eina_Vector2 *out, const Eina_Vector2 *a, const Eina_Vector2 *b) |
| Add two vectors. | |
| static void | eina_vector2_subtract (Eina_Vector2 *out, const Eina_Vector2 *a, const Eina_Vector2 *b) |
| Subtract two vectors. | |
| static void | eina_vector2_scale (Eina_Vector2 *out, const Eina_Vector2 *v, double scale) |
| Scale vector. | |
| static double | eina_vector2_dot_product (const Eina_Vector2 *a, const Eina_Vector2 *b) |
| Return the dot product of the two vectors. | |
| static double | eina_vector2_length_get (const Eina_Vector2 *v) |
| Return the length of the given vector. | |
| static double | eina_vector2_length_square_get (const Eina_Vector2 *v) |
| Return the length in square of the given vector. | |
| static double | eina_vector2_distance_get (const Eina_Vector2 *a, const Eina_Vector2 *b) |
| Return the distance between of two vectors. | |
| static double | eina_vector2_distance_square_get (const Eina_Vector2 *a, const Eina_Vector2 *b) |
| Return the distance in square between of two vectors. | |
| static void | eina_vector2_normalize (Eina_Vector2 *out, const Eina_Vector2 *v) |
| normalize vector. | |
| static void | eina_vector2_transform (Eina_Vector2 *out, const Eina_Matrix2 *m, const Eina_Vector2 *v) |
| Transform vector. | |
| static void | eina_vector2_homogeneous_position_transform (Eina_Vector2 *out, const Eina_Matrix3 *m, const Eina_Vector2 *v) |
| Homogeneous position transform vector. | |
| static void | eina_vector2_homogeneous_direction_transform (Eina_Vector2 *out, const Eina_Matrix3 *m, const Eina_Vector2 *v) |
| Homogeneous direction transform vector. | |
2D vector definition and operations
| #define EINA_VECTOR2 | ( | x, | |
| y ) |
|
inlinestatic |
Set parameters to vector.
| [out] | dst | The resulting vector. |
| [in] | x | The x component. |
| [in] | y | The y component. |
|
inlinestatic |
Set array to vector.
| [out] | dst | The resulting vector. |
| [in] | v | The the array[2] for set. |
Set to vector first 2 elements from array.
|
inlinestatic |
Copy vector.
| [out] | dst | The vector copy. |
| [in] | src | The vector for copy. |
|
inlinestatic |
Make negative vector.
| [out] | out | The resulting vector. |
| [in] | v | The current vector. |
|
inlinestatic |
Add two vectors.
| [out] | out | The resulting vector. |
| [in] | a | The first member of the add. |
| [in] | b | The second member of the add. |
|
inlinestatic |
Subtract two vectors.
| [out] | out | The resulting vector |
| [in] | a | The first member of the subtract |
| [in] | b | The second member of the subtract |
|
inlinestatic |
Scale vector.
| [out] | out | The resulting vector. |
| [in] | v | The vector for scale. |
| [in] | scale | The scale value. |
|
inlinestatic |
Return the dot product of the two vectors.
| [in] | a | The first member. |
| [in] | b | The second member. |
|
inlinestatic |
Return the length of the given vector.
| [in] | v | The vector. |
|
inlinestatic |
Return the length in square of the given vector.
| [in] | v | The vector. |
|
inlinestatic |
Return the distance between of two vectors.
| [in] | a | The first vector. |
| [in] | b | The second vector. |
|
inlinestatic |
Return the distance in square between of two vectors.
| [in] | a | The first vector. |
| [in] | b | The second vector. |
|
inlinestatic |
normalize vector.
| [out] | out | The resulting vector. |
| [in] | v | The vector for normalize. |
|
inlinestatic |
Transform vector.
| [out] | out | The resulting vector. |
| [in] | m | The matrix for transform. |
| [in] | v | The vector for transform. |
|
inlinestatic |
Homogeneous position transform vector.
| [out] | out | The resulting vector. |
| [in] | m | The matrix for transform. |
| [in] | v | The vector for transform. |
|
inlinestatic |
Homogeneous direction transform vector.
| [out] | out | The resulting vector. |
| [in] | m | The matrix for transform. |
| [in] | v | The vector for transform. |