Blender V2.61 - r43446
Functions

math_vector.c File Reference

#include "BLI_math.h"

Go to the source code of this file.

Functions

void interp_v2_v2v2 (float target[2], const float a[2], const float b[2], const float t)
void interp_v2_v2v2v2 (float p[2], const float v1[2], const float v2[2], const float v3[2], const float w[3])
void interp_v3_v3v3 (float target[3], const float a[3], const float b[3], const float t)
void interp_v4_v4v4 (float target[4], const float a[4], const float b[4], const float t)
void interp_v3_v3v3v3 (float p[3], const float v1[3], const float v2[3], const float v3[3], const float w[3])
void interp_v3_v3v3v3v3 (float p[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3], const float w[4])
void interp_v4_v4v4v4 (float p[4], const float v1[4], const float v2[4], const float v3[4], const float w[3])
void interp_v4_v4v4v4v4 (float p[4], const float v1[4], const float v2[4], const float v3[4], const float v4[4], const float w[4])
void mid_v3_v3v3 (float v[3], const float v1[3], const float v2[3])
float angle_v3v3v3 (const float v1[3], const float v2[3], const float v3[3])
float angle_v3v3 (const float v1[3], const float v2[3])
float angle_v2v2v2 (const float v1[2], const float v2[2], const float v3[2])
float angle_v2v2 (const float v1[2], const float v2[2])
float angle_normalized_v3v3 (const float v1[3], const float v2[3])
float angle_normalized_v2v2 (const float v1[2], const float v2[2])
void angle_tri_v3 (float angles[3], const float v1[3], const float v2[3], const float v3[3])
void angle_quad_v3 (float angles[4], const float v1[3], const float v2[3], const float v3[3], const float v4[3])
void project_v2_v2v2 (float c[2], const float v1[2], const float v2[2])
void project_v3_v3v3 (float c[3], const float v1[3], const float v2[3])
void bisect_v3_v3v3v3 (float out[3], const float v1[3], const float v2[3], const float v3[3])
void reflect_v3_v3v3 (float out[3], const float v1[3], const float v2[3])
void ortho_basis_v3v3_v3 (float v1[3], float v2[3], const float v[3])
void rotate_normalized_v3_v3v3fl (float r[3], const float p[3], const float axis[3], const float angle)
void rotate_v3_v3v3fl (float r[3], const float p[3], const float axis[3], const float angle)
void print_v2 (const char *str, const float v[2])
void print_v3 (const char *str, const float v[3])
void print_v4 (const char *str, const float v[4])
void minmax_v3v3_v3 (float min[3], float max[3], const float vec[3])
double dot_vn_vn (const float *array_src_a, const float *array_src_b, const int size)
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_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)
void mul_vn_fl (float *array_tar, const int size, const float f)
void mul_vn_vn_fl (float *array_tar, const float *array_src, const int size, const float f)
void add_vn_vn (float *array_tar, const float *array_src, const int size)
void add_vn_vnvn (float *array_tar, const float *array_src_a, const float *array_src_b, const int size)
void sub_vn_vn (float *array_tar, const float *array_src, const int size)
void sub_vn_vnvn (float *array_tar, const float *array_src_a, const float *array_src_b, const int size)
void fill_vn_i (int *array_tar, const int size, const int val)
void fill_vn_fl (float *array_tar, const int size, const float val)

Detailed Description

Definition in file math_vector.c.


Function Documentation

void add_vn_vn ( float *  array_tar,
const float *  array_src,
const int  size 
)

Definition at line 458 of file math_vector.c.

References i, and size().

Referenced by Color_iadd(), screen_opengl_render_apply(), and Vector_iadd().

void add_vn_vnvn ( float *  array_tar,
const float *  array_src_a,
const float *  array_src_b,
const int  size 
)

Definition at line 466 of file math_vector.c.

References i, and size().

Referenced by Color_add(), Matrix_add(), and Vector_add().

float angle_normalized_v2v2 ( const float  v1[2],
const float  v2[2] 
)

Definition at line 189 of file math_vector.c.

References dot_v2v2(), len_v2v2(), M_PI, and saasin().

Referenced by angle_v2v2(), angle_v2v2v2(), draw_uvs_stretch(), and uv_image_outset().

float angle_normalized_v3v3 ( const float  v1[3],
const float  v2[3] 
)
void angle_quad_v3 ( float  angles[4],
const float  v1[3],
const float  v2[3],
const float  v3[3],
const float  v4[3] 
)

Definition at line 222 of file math_vector.c.

References angle_normalized_v3v3(), M_PI, normalize_v3(), and sub_v3_v3v3().

Referenced by applyModifier(), and EM_solidify().

void angle_tri_v3 ( float  angles[3],
const float  v1[3],
const float  v2[3],
const float  v3[3] 
)

Definition at line 204 of file math_vector.c.

References angle_normalized_v3v3(), M_PI, normalize_v3(), and sub_v3_v3v3().

Referenced by applyModifier(), and EM_solidify().

float angle_v2v2 ( const float  v1[2],
const float  v2[2] 
)
float angle_v2v2v2 ( const float  v1[2],
const float  v2[2],
const float  v3[2] 
)

Definition at line 140 of file math_vector.c.

References angle_normalized_v2v2(), and normalize_v2().

Referenced by draw_uvs_stretch().

float angle_v3v3 ( const float  v1[3],
const float  v2[3] 
)
float angle_v3v3v3 ( const float  v1[3],
const float  v2[3],
const float  v3[3] 
)
void bisect_v3_v3v3v3 ( float  out[3],
const float  v1[3],
const float  v2[3],
const float  v3[3] 
)
double dot_vn_vn ( const float *  array_src_a,
const float *  array_src_b,
const int  size 
)
void fill_vn_fl ( float *  array_tar,
const int  size,
const float  val 
)
void fill_vn_i ( int *  array_tar,
const int  size,
const int  val 
)

Definition at line 492 of file math_vector.c.

References i, and size().

Referenced by calc_weightpaint_vert_array().

void interp_v2_v2v2 ( float  target[2],
const float  a[2],
const float  b[2],
const float  t 
)
void interp_v2_v2v2v2 ( float  p[2],
const float  v1[2],
const float  v2[2],
const float  v3[2],
const float  w[3] 
)

Definition at line 46 of file math_vector.c.

void interp_v3_v3v3 ( float  target[3],
const float  a[3],
const float  b[3],
const float  t 
)
void interp_v3_v3v3v3 ( float  p[3],
const float  v1[3],
const float  v2[3],
const float  v3[3],
const float  w[3] 
)
void interp_v3_v3v3v3v3 ( float  p[3],
const float  v1[3],
const float  v2[3],
const float  v3[3],
const float  v4[3],
const float  w[4] 
)
void interp_v4_v4v4 ( float  target[4],
const float  a[4],
const float  b[4],
const float  t 
)

Definition at line 61 of file math_vector.c.

Referenced by psys_thread_create_path(), and subdividenurb().

void interp_v4_v4v4v4 ( float  p[4],
const float  v1[4],
const float  v2[4],
const float  v3[4],
const float  w[3] 
)

Definition at line 89 of file math_vector.c.

Referenced by dynamicPaint_setInitialColor().

void interp_v4_v4v4v4v4 ( float  p[4],
const float  v1[4],
const float  v2[4],
const float  v3[4],
const float  v4[4],
const float  w[4] 
)

Definition at line 97 of file math_vector.c.

void mid_v3_v3v3 ( float  v[3],
const float  v1[3],
const float  v2[3] 
)
void minmax_v3v3_v3 ( float  min[3],
float  max[3],
const float  vec[3] 
)

Definition at line 367 of file math_vector.c.

Referenced by calculateCenterBound(), and initWarp().

void mul_vn_fl ( float *  array_tar,
const int  size,
const float  f 
)

Definition at line 443 of file math_vector.c.

References i, and size().

Referenced by Color_idiv(), Color_imul(), Vector_idiv(), Vector_imul(), and Vector_length_set().

void mul_vn_vn_fl ( float *  array_tar,
const float *  array_src,
const int  size,
const float  f 
)
void negate_vn ( float *  array_tar,
const int  size 
)

Definition at line 428 of file math_vector.c.

References i, and size().

Referenced by Vector_negate().

void negate_vn_vn ( float *  array_tar,
const float *  array_src,
const int  size 
)

Definition at line 435 of file math_vector.c.

References i, and size().

Referenced by Color_neg(), and Vector_neg().

float normalize_vn ( float *  array_tar,
const int  size 
)

Definition at line 406 of file math_vector.c.

References normalize_vn_vn().

Referenced by M_Noise_random_unit_vector(), and Vector_normalize().

float normalize_vn_vn ( float *  array_tar,
const float *  array_src,
const int  size 
)

Definition at line 391 of file math_vector.c.

References simple_enum_gen::d, dot_vn_vn(), credits_svn_gen::e, fill_vn_fl(), mul_vn_vn_fl(), and sqrt().

Referenced by normalize_vn().

void ortho_basis_v3v3_v3 ( float  v1[3],
float  v2[3],
const float  v[3] 
)
void print_v2 ( const char *  str,
const float  v[2] 
)

Definition at line 352 of file math_vector.c.

void print_v3 ( const char *  str,
const float  v[3] 
)

Definition at line 357 of file math_vector.c.

Referenced by RIG_printCtrl(), and RIG_printNode().

void print_v4 ( const char *  str,
const float  v[4] 
)

Definition at line 362 of file math_vector.c.

void project_v2_v2v2 ( float  c[2],
const float  v1[2],
const float  v2[2] 
)

Definition at line 245 of file math_vector.c.

References dot_v2v2(), and mul().

Referenced by mdisp_flip_disp().

void project_v3_v3v3 ( float  c[3],
const float  v1[3],
const float  v2[3] 
)
void range_vn_fl ( float *  array_tar,
const int  size,
const float  start,
const float  step 
)

Definition at line 419 of file math_vector.c.

References i, and size().

Referenced by C_Vector_Linspace(), and C_Vector_Range().

void range_vn_i ( int *  array_tar,
const int  size,
const int  start 
)

Definition at line 411 of file math_vector.c.

References i, and size().

Referenced by mesh_calc_modifiers().

void reflect_v3_v3v3 ( float  out[3],
const float  v1[3],
const float  v2[3] 
)

Definition at line 280 of file math_vector.c.

References copy_v3_v3(), dot_v3v3(), and reflect().

Referenced by Vector_reflect().

void rotate_normalized_v3_v3v3fl ( float  r[3],
const float  p[3],
const float  axis[3],
const float  angle 
)

Definition at line 323 of file math_vector.c.

References cos(), and sin().

Referenced by rotate_v3_v3v3fl().

void rotate_v3_v3v3fl ( float  r[3],
const float  p[3],
const float  axis[3],
const float  angle 
)

Definition at line 341 of file math_vector.c.

References normalize_v3_v3(), and rotate_normalized_v3_v3v3fl().

void sub_vn_vn ( float *  array_tar,
const float *  array_src,
const int  size 
)

Definition at line 475 of file math_vector.c.

References i, and size().

Referenced by Color_isub(), and Vector_isub().

void sub_vn_vnvn ( float *  array_tar,
const float *  array_src_a,
const float *  array_src_b,
const int  size 
)

Definition at line 483 of file math_vector.c.

References i, and size().

Referenced by Color_sub(), Matrix_sub(), and Vector_sub().