Commit Graph

417 Commits

Author SHA1 Message Date
fefddc320d code cleanup: use cosf and sinf when both args and results are float values.
also remove local math functions in KX_Camera
2012-07-22 17:35:43 +00:00
62a73381a7 use fabsf when using floats. 2012-07-21 15:27:40 +00:00
32cf7fcdb1 code cleanup: spelling 2012-07-16 23:23:33 +00:00
92205486e7 Masks: feather self-intersection collapse function
This implements simple function which collapses internal loops
caused by self-intersections into a singularity.

This loops can't be removed because rasterizer expects points
of feather be aligned with points from spline itself.
2012-07-16 17:54:28 +00:00
273bb8fa90 barycentric_weights_v2_quad wasn't working quite right, rewrite as an expanded version of interp_weights_poly_v2() that cuts down duplicate calculations. 2012-07-16 12:01:18 +00:00
9a385d12e3 add 2d version of interp_weights_poly_v3 2012-07-16 10:36:40 +00:00
6f01b0b11f small speedup for mask rasterizer, only do single sided check for triangle intersection. 2012-07-16 06:39:40 +00:00
380c5d66a8 math function to get the intersection point between 2 lines (not 2 segments which we already have). 2012-07-15 11:35:13 +00:00
a52153a618 mask rasterization: use a simpler method to check if a bucket intersects with a triangle. 2012-07-14 18:42:59 +00:00
6946294ab9 rename vars for line dist funcs to make more sense 2012-07-14 18:37:48 +00:00
9e09005e49 add is_quad_convex_v2(), SET_UINT_IN_POINTER, GET_UINT_FROM_POINTER macros & some minor edits. 2012-07-14 00:33:58 +00:00
73c2abe83d new function barycentric_weights_v2_quad(), like barycentric_weights_v2 but for quads.
takes vecs and a point and assigns 4 weights, needed for nice quad interpolation for mask feathering.
2012-07-13 09:19:05 +00:00
cfb7aee017 style cleanup 2012-07-07 22:51:57 +00:00
0085c7110b Code cleanup: move PBVH ray/AABB intersection test to BLI_math_geom 2012-07-05 03:55:55 +00:00
1597ad9377 style cleanup 2012-07-01 09:54:44 +00:00
ceea98be2f math lib changes from tomato 2012-05-31 11:57:09 +00:00
305d341ec2 code cleanup: use vector math function minmax_v3v3_v3() and other minor vector function edits. 2012-05-13 11:05:52 +00:00
2f2b15bbb2 style cleanup: whitespace, bli & makesdna 2012-05-12 15:02:10 +00:00
5c89138684 style cleanup: comments 2012-04-22 11:54:53 +00:00
6701933f5c style cleanup 2012-04-21 12:51:47 +00:00
3f56ee3da7 style cleanup: issues missed last commit 2012-03-25 15:56:17 +00:00
53d32a0bd2 style cleanup: conform to style guide - mostly operator whitespace changes 2012-03-25 12:41:58 +00:00
69e6894b15 style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:18:31 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
ee9a00948b mathutils py api:
Vector.angle_signed(other)
  for 2D vectors to get the clockwise angle between them.

  in BLI math its called - angle_signed_v2v2()

shorthand for...

  atan2f((v1[1] * v2[0]) - (v1[0] * v2[1]), dot_v2v2(v1, v2))

also corrects compile error in last commit.
2012-03-14 06:14:15 +00:00
8646bb4464 workaround [#30480] Knife tool flicker
the problem was numeric precision when in ortho mode the start/end points for the view vector would be 2000 apart which caused trouble for the intersection test.
2012-03-13 01:11:08 +00:00
07ffbbfcb6 better fix for [#30529], find the right axis rather then checking for folded quads. 2012-03-12 21:38:13 +00:00
30790e9390 fix [#30529] BMesh: Wrong Indizes of Faces
problem was bow-tie quads would add opposite normals together and result in zero vector which was used for projection.
Now is_quad_convex_v3() checks if quad contains 2 faces which point away from eachother when split by either direction.

Theres another fix for this bug which can be done since creating the face can use existing edges in the example given so it wont have to guess which order of verts to use.
2012-03-12 21:09:27 +00:00
4f7bdc59d3 style cleanup: spelling.
also remove large, duplicate comments from sunsky.h
2012-03-09 00:41:09 +00:00
79d97ca509 style cleanup - spelling. 2012-03-08 04:12:11 +00:00
46045fbb09 style cleanup - braces & else / if's 2012-03-07 04:53:43 +00:00
31d2ee9bf7 style cleanup, brackets in else/if, some indentation. 2012-03-06 18:40:15 +00:00
95670e03a0 style cleanup / comment formatting for bli/bke/bmesh 2012-03-03 20:19:11 +00:00
ea13ec1699 Spelling Cleanup 2012-03-01 12:20:18 +00:00
ed04c21374 code cleanup: use float vector size in function definitions, and const's where the values are unchanged. 2012-02-28 14:05:00 +00:00
47c373c7a9 style cleanup (mostly whitespace) 2012-02-27 10:35:39 +00:00
c8b53d2aaf code style cleanup, no functional changes. 2012-02-23 02:23:42 +00:00
cd4123e1db use inline BLI_math functions for dot product and length calculation. 2012-01-22 17:20:37 +00:00
fe71f40f88 misc changes from bmesh, syncing across to trunk, no functional changes 2012-01-20 02:24:01 +00:00
3d5330f789 vertex group changes,
use more api functions more (some vertex group editing functions were copied about), also make some functions int oapi calls.

- remove defgroup_find_index(), use BLI_findlink instead since they both work the same way.
- move static function getNearestPointOnPlane() to BLI_math api function closest_to_plane_v3()
- ED_vgroup_give_parray() added option to return an array where unselected verts are NULL (simplifies code & works for lattice when it didn't before).
- more consistant error checking of ob->actdef.
2011-12-14 21:08:08 +00:00
06c3d5bd09 de-duplicate dominant axis calculation, exact same checks were in 6 different places.
added function:  axis_dominant_v3(...)
2011-12-02 22:14:20 +00:00
e5f40a1aac - pyapi mathutils.geometry.intersect_plane_plane
- isect_plane_plane_v3 uses better method
- minor refactor - arg name changes & some args as const.
2011-11-20 05:56:21 +00:00
4924abaad6 replace fabs with fabsf where both input and output are floats. 2011-11-19 01:10:05 +00:00
c993ee678a new math utility function isect_plane_plane_v3 2011-11-13 16:28:52 +00:00
817b6cb9a8 mathutils.geometry.distance_point_to_plane(pt, plane_co, plane_no) - utility function, BLI math version too. 2011-11-12 10:06:56 +00:00
46ae692710 Merge with trunk r41342 2011-10-28 17:00:53 +00:00
fae903e263 Dynamic Paint:
* More code changes pointed by Brecht in codereview.
* Some user interface improvements.
* Updating brush settings now also updates canvas preview.
2011-10-28 14:46:09 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
42faf7ae41 Merge with trunk r39928 2011-09-05 17:06:09 +00:00
00143a3d55 spaces -> tabs (configure you're editors right!) 2011-09-01 01:48:50 +00:00