40ad1cf0b1
BLI: sync changes from 2.8
2017-11-14 16:10:48 +11:00
6e0fd239e3
Math Lib: normalized vector project functions
2017-09-07 00:12:43 +10:00
1d966ca7a1
Math Lib: add angle_on_axis_v3v3_v3
...
Use for calculating the angle between 2 directions on an axis.
Also signed version and normalized plane projection,
use when input is normalized.
2017-06-16 01:27:58 +10:00
55a3d48046
Docs: diagram for reflect_v3_v3v3
2017-04-21 17:27:20 +10:00
1dbaf0dbcc
Add mid_v3_v3_array function and remove redundant functions
...
Other than implementing a `mid_v3_v3_array` function, this removes
`cent_tri_v3` and `cent_quad_v3` in favor of `mid_v3_v3v3v3` and
`mid_v3_v3v3v3v3` respectively.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D2459
2017-01-10 19:58:34 -02:00
b32408eff8
BLI_math: move interp_*_cubic to its own function
2016-07-11 17:16:35 +10:00
66b12ef4ab
BLI_math: cleanup arg names
...
project functions arg naming made it hard to tell which vector was projected onto.
2016-06-12 15:39:04 +10:00
2630207ada
Fix GCC/Linux build error after finite/isfinite changes.
2016-05-17 23:40:25 +02:00
21fddf7d1c
C99/C++11: replace deprecated finite() by isfinite().
2016-05-17 21:39:16 +02:00
48d3a8b54b
Math Lib: inline project_plane_v3_v3v3
2016-05-03 13:48:00 +10:00
dbf1257b14
Minor optimization for scanfill
...
Replace angle with with cosine calculation.
2016-04-20 09:53:40 +10:00
ecf0529efd
Quiet warning
2015-09-24 15:17:02 +10:00
6ee653352b
Math Lib: double versions of vector funcs
...
- add_vn_vn_d
- add_vn_vnvn_d
- mul_vn_db
2015-05-21 21:06:29 +10:00
e5e73ccc90
Math Lib: rename fill_*, to copy_*
...
matching convention for fixed length api, eg: copy_v3_fl
2015-05-05 17:08:29 +10:00
a4965249ec
Math Lib: add range_vn_u
2015-04-28 06:54:50 +10:00
01b1eb445c
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.
2015-04-08 23:01:37 +10:00
9ffc66b1c0
Math Lib: add mid_v3_v3v3v3v3
2015-03-09 20:26:09 +11:00
225f68c324
Fix interpolation functions ignoring number of components when doing early output
2015-02-24 00:36:33 +05:00
e442b9916e
BLI_math vectors: add minmax_v3v3_v3_array to get min and max values on each components of an array of 3D vectors.
2015-02-05 14:00:58 +01:00
aba5fc29d5
Math Lib: use higher precision for vector printing
...
Only use for debugging, where precision is often important.
2014-09-17 00:33:38 +10:00
74758576fc
Cleanup: general cleanup in BLI_math code (mostly, use 'const' where possible, true/false for booleans, format for float litterals).
2014-07-30 12:19:41 +02:00
9c48ea3979
Math Lib: add function to get signed angle about an axis
2014-07-09 11:15:08 +10:00
c6a34e047c
Correct ortho_v2_v2 arg size
2014-05-27 14:42:22 +10:00
35380cdcad
Fix for uninitialized unit_use_radians variable with inset and bevel
2014-05-06 19:20:03 +10:00
233dac1494
Math Lib: increase epsilon for ortho_basis_v3v3_v3
...
passing in a unit length vector wouldn't always compute unit length vectors because the epsilon tested was too small.
2014-04-16 21:07:28 +10:00
55f83e36cc
Py API: Vector.slerp(). also added interp_v3_v3v3_slerp(_safe) functions
2014-03-31 13:28:37 +11:00
6aa75d3b2c
Fix for error in normalize_vn_vn(), add len_squared_vn
2014-03-31 11:19:32 +11:00
480c5019bb
Code cleanup: reflect_v3_v3v3 made redundant copies
2014-03-30 12:28:09 +11:00
7199e2288f
Code cleanup: use sqrtf when input and output are float
2014-03-28 14:53:37 +11:00
0e9084d5ec
Fix T39210: Grid Fill is generating mesh that's inconsistent with selected edge loops
...
Issue was in BLI's rotation_between_vecs_to_quat(), which did not handled correctly cases where both vectors are colinear.
Patch by Campbell Barton and me.
Issue originaly tracked down by Yan Shi, many thanks!
2014-03-16 16:31:19 +01:00
80e21f6fc5
Code clearnup: warnings
2014-02-14 22:03:09 +11:00
2f01be2b2f
UI: panel tabs, use simple color interpolation that ignores alpha
2014-02-10 17:06:56 +11:00
aa986c3f3d
Correct bad mistake in own recent to commit to angle calculation
2014-01-14 13:47:24 +11:00
8cb9b42c9c
Math Lib: minor optimization for angle functions
2014-01-14 09:48:59 +11:00
07ceb99213
Code Cleanup: use strict flags for math lib, add inline declarations
2013-12-06 03:57:17 +11:00
a3a4386991
fix [ #36105 ] Bevel UV Flicker
...
interp_weights_poly_v2/3 functions used much too small an epsilon value, caused flickering.
2013-07-11 15:57:22 +00:00
e6b22d287f
utility function for printing arbitrary sizes vectors.
2013-07-11 15:32:26 +00:00
a6b505ef0b
style cleanup
2013-06-06 06:02:46 +00:00
0ee45c9301
more optimal method of calculating the normal for the solidify modifier.
...
When adding 2 unit length vectors, the length can be used to calculate the angle.
2013-05-08 14:33:02 +00:00
b0752f1b89
add interp_v3_v3v3v3_uv() to use for use with uv value from isect_ray_tri_v3(), rename tree -> bmtree for BMBVHTree.
2013-04-17 05:49:06 +00:00
82636ab0fb
improved method of getting the tangent axis from a bmesh triangle,
...
rather then getting the longest edge, get the edge which which is most different from the 2 others ends up giving more useful results: for an isosceles triangle it returns the base weather its longer or shorter then the other sides.
2013-04-04 08:47:07 +00:00
f784856906
make asserts that check for unit length vectors into a macro.
...
this was really not nice logic to try to fit into an assert.
2013-02-19 13:15:34 +00:00
8cde4e5182
add an influence slider to mesh cache.
2013-01-21 16:43:04 +00:00
32ce3a6ca7
utility vector functions for flipping one vector about another:
...
nicer then interp_v3_v3v3(v, v1, v2, -1.0f);
2013-01-18 23:07:27 +00:00
276c842096
BLI_assert() when math functions that require are normalize vector are called without one.
2012-11-16 12:41:40 +00:00
987f6a7d4f
code cleanup: move local math functions into math_geom.c, math_vector.c, no functional changes.
2012-11-15 13:24:14 +00:00
fae6c35ca7
code cleanup: quiet -Wdouble-promotion, disabled this warnings for a few files since its done throughout the code in some places.
2012-11-04 07:18:29 +00:00
b32bf2c462
code cleanup: use min_/max_ math functions, add minmax_v2_v2v2.
2012-10-25 22:47:54 +00:00
13254cde8c
Alternate mask spline feather offset calculation method: now there are 2 [Even | Smooth]
...
- Even preserves thickness but can give unsightly loops
- Smooth gives nicer shape but can give unsightly feather/spline mismatch for 'S' shapes created by beziers.
This is an example where smooth works much nicer.
http://www.graphicall.org/ftp/ideasman42/mask_compare.png
2012-08-27 09:44:56 +00:00
df9ca0455c
Fix [ #31807 ] Ngon triangulation error
...
Notes:
*This implements a quite simple algorithm, which simply checks angles (actually, absolute cosines) of created tri and remaining face (which may be a tri, quad, or more NGon), so that both are "best" (ie avoid as much as possible too much narrow/wide corners), and also checks the new edge is OK (i.e. does not goes "out" of original face).
*Incidently, it fixes a typo in that bm_face_goodline() func!
*It's quite performant (a bit quicker than previous code, as far as I have tested it) and prevent creation of completely flat triangles as much as possible, but it's far from being a "best" solution (as it is still a "progressive" one)!
*It also introduces a new math func (in BLI_math_vector.h), cos_v3v3v3, which computes cosine (ie dot product of normalized vectors) and is roughly a quicker replacement for angle_v3v3v3, when real angles are not needed.
2012-06-24 16:19:19 +00:00