Blender  V2.59
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 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])
void range_vni (int *array_tar, const int size, const int start)
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_vni (int *array_tar, const int size, const int val)
void fill_vn (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 413 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 421 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 183 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 216 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 198 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 134 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] 
)
void fill_vn ( float *  array_tar,
const int  size,
const float  val 
)

Definition at line 454 of file math_vector.c.

References i, and size().

Referenced by Matrix_zero(), newVectorObject(), Vector_setLength(), and Vector_zero().

void fill_vni ( int *  array_tar,
const int  size,
const int  val 
)

Definition at line 447 of file math_vector.c.

References i, and size().

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 48 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 63 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 91 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 361 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 398 of file math_vector.c.

References i, and size().

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

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

Definition at line 405 of file math_vector.c.

References i, and size().

Referenced by color_mul_float(), matrix_mul_float(), screen_opengl_render_apply(), and vector_mul_float().

void negate_vn ( float *  array_tar,
const int  size 
)

Definition at line 383 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 390 of file math_vector.c.

References i, and size().

Referenced by Color_neg(), and Vector_neg().

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 346 of file math_vector.c.

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

Definition at line 351 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 356 of file math_vector.c.

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

Definition at line 239 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_vni ( int *  array_tar,
const int  size,
const int  start 
)

Definition at line 375 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 274 of file math_vector.c.

References copy_v3_v3(), and dot_v3v3().

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 317 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 335 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 430 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 438 of file math_vector.c.

References i, and size().

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