diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-04-08 15:49:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-04-08 16:01:37 +0300 |
commit | 01b1eb445ceb7200d9ac4d00eb624d92713024c7 (patch) | |
tree | abc6e46d9781351e5b56c16b77d4e5e46f3ae465 /source/blender/blenlib/BLI_math_vector.h | |
parent | d249db9755182bd705c4ea331ccfffef8cf7e270 (diff) |
Math Lib: add project_plane_v3_v3v3
Useful for projecting one vector onto another (as a plane).
This is a rather common operation,
doing inline isn't always obvious whats happening.
Diffstat (limited to 'source/blender/blenlib/BLI_math_vector.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_vector.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h index de712cbaa12..9c8a9f54379 100644 --- a/source/blender/blenlib/BLI_math_vector.h +++ b/source/blender/blenlib/BLI_math_vector.h @@ -271,6 +271,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]); |