diff options
Diffstat (limited to 'source/blender/blenlib/BLI_math_vector.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_vector.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h index de712cbaa12..9bc1121801e 100644 --- a/source/blender/blenlib/BLI_math_vector.h +++ b/source/blender/blenlib/BLI_math_vector.h @@ -158,6 +158,8 @@ MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESU MINLINE float dot_v3v3v3(const float p[3], const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT; MINLINE float dot_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT; +MINLINE double dot_v3db_v3fl(const double a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT; + MINLINE float cross_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT; MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3]); @@ -271,6 +273,8 @@ void angle_poly_v3(float *angles, const float *verts[3], int len); void project_v2_v2v2(float c[2], const float v1[2], const float v2[2]); void project_v3_v3v3(float r[3], const float p[3], const float n[3]); +void project_plane_v3_v3v3(float c[3], const float v[3], const float v_plane[3]); +void project_plane_v2_v2v2(float c[2], const float v[2], const float v_plane[2]); void project_v3_plane(float v[3], const float n[3], const float p[3]); void reflect_v3_v3v3(float r[3], const float v[3], const float n[3]); void ortho_basis_v3v3_v3(float r_n1[3], float r_n2[3], const float n[3]); @@ -306,12 +310,13 @@ void dist_ensure_v2_v2fl(float v1[2], const float v2[2], const float dist); void axis_sort_v3(const float axis_values[3], int r_axis_order[3]); /***************************** Array Functions *******************************/ -/* attempted to follow fixed length vertex functions. names could be improved*/ +/* follow fixed length vector function conventions. */ double dot_vn_vn(const float *array_src_a, const float *array_src_b, const int size) ATTR_WARN_UNUSED_RESULT; double len_squared_vn(const float *array, const int size) ATTR_WARN_UNUSED_RESULT; float normalize_vn_vn(float *array_tar, const float *array_src, const int size); float normalize_vn(float *array_tar, const int size); void range_vn_i(int *array_tar, const int size, const int start); +void range_vn_u(unsigned int *array_tar, const int size, const unsigned int start); void range_vn_fl(float *array_tar, const int size, const float start, const float step); void negate_vn(float *array_tar, const int size); void negate_vn_vn(float *array_tar, const float *array_src, const int size); @@ -326,11 +331,15 @@ void sub_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_ void msub_vn_vn(float *array_tar, const float *array_src, const float f, const int size); void msub_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, const float f, const int size); void interp_vn_vn(float *array_tar, const float *array_src, const float t, const int size); -void fill_vn_i(int *array_tar, const int size, const int val); -void fill_vn_short(short *array_tar, const int size, const short val); -void fill_vn_ushort(unsigned short *array_tar, const int size, const unsigned short val); -void fill_vn_uchar(unsigned char *array_tar, const int size, const unsigned char val); -void fill_vn_fl(float *array_tar, const int size, const float val); +void copy_vn_i(int *array_tar, const int size, const int val); +void copy_vn_short(short *array_tar, const int size, const short val); +void copy_vn_ushort(unsigned short *array_tar, const int size, const unsigned short val); +void copy_vn_uchar(unsigned char *array_tar, const int size, const unsigned char val); +void copy_vn_fl(float *array_tar, const int size, const float val); + +void add_vn_vn_d(double *array_tar, const double *array_src, const int size); +void add_vn_vnvn_d(double *array_tar, const double *array_src_a, const double *array_src_b, const int size); +void mul_vn_db(double *array_tar, const int size, const double f); /**************************** Inline Definitions ******************************/ |