Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-10-10Cleanup: use bool and const argsCampbell Barton
2014-08-16Math Lib: add isect_line_line_epsilon_v3Campbell Barton
2014-08-13Math Lib: rename barycentric_transform -> transform_point_by_tri_v3Campbell Barton
also add transform_point_by_seg_v3
2014-08-13Math Lib: name signed versions of dist_to_plane_v3 explicitlyCampbell Barton
also add unsigned versions
2014-07-21Math Lib: Add isect_point_tri_v3Campbell Barton
Add to Python via mathutils.geometry
2014-07-11Fix T41019: Calculate Mass does not calculate actual volume.Lukas Tönne
This was a ToDo item, for mesh-based rigid body shapes (trimesh, convex) the operator was simply using the bounding box volume, which can grossly overestimate the volume and mass. Calculating the actual volume of a mesh is not so difficult after all, see e.g. http://research.microsoft.com/en-us/um/people/chazhang/publications/icip01_ChaZhang.pdf This patch also allows calculating the center-of-mass in the same way. This is currently unused, because the rigid body system assumes the CoM to be the same as the geometric object center. This is fine most of the time, adding such user settings for "center-of-mass offset" would also add quite a bit of complexity in user space, but it could be necessary at some point. A number of other physical properties could be calculated using the same principle, e.g. the moment of inertia.
2014-04-22Fix T39429: Project paint error with UV bleedCampbell Barton
2014-04-22Math Lib: move barycentric_weights_v2_persp to into math_geomCampbell Barton
2014-04-19Math Lib: add shell_v3v3_normalized_to_dist and v2 versionCampbell Barton
bypass angle calculation to avoids (asin, sqrt, cos).
2014-04-16Math Lib: optimize axis_dominant_v3_to_m3, approx 6x speedupCampbell Barton
build the matrix directly rather then calculating with axis/angle also remove unused function calc_poly_plane
2014-04-15Math Lib: avoid having to pass a pre-calculated normal tot area_poly_v3Campbell Barton
add normal_poly_v3
2014-03-30Code cleanup: de-duplicate cotangent weight function & add arg sizesCampbell Barton
2014-03-29Code cleanup: replace dot with len_squared and is_zero checksCampbell Barton
2014-03-27BMesh: optimize BM_face_legal_splits for concave facesCampbell Barton
2014-03-27Code cleanup: use consistent arg order for math api poly funcsCampbell Barton
2014-03-26New resolve_tri_uv_v3 util functionDalai Felinto
Compute barycentric coordinates (u, v) for a point with respect to a triangle. This is needed for Cycles baking but we decided to push this independently of the upcoming main baking changes. Code adapted from Christer Ericson's Real-Time Collision Detection. Cleanup, refactoring and review from Campbell Barton.
2014-03-26Code cleanup: add _v2 suffix to resolve_tri/quad functionsCampbell Barton
2014-03-20Fix for clang build warnings: ATTR_WARN_UNUSED_RESULT is used afterLukas Tönne
the inline definitions are included, which gives lots of warnings "attribute declaration must precede definition". See also rB83617429cf28f2a19e991a0f71d892fc159a4419
2014-03-16Fix T39210: Grid Fill is generating mesh that's inconsistent with selected ↵Bastien Montagne
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-15Code cleanup: use r_ prefix for return argsCampbell Barton
2013-12-29Fix missing check if isect_plane_plane_v3 fails to find an intersection.Campbell Barton
2013-12-28Math Lib: add dist_squared_to_line_v2, avoids sqrt in scanfill and 3d-textCampbell Barton
2013-12-05Code Cleanup: use strict flags for math lib, add inline declarationsCampbell Barton
2013-12-04Fix for EWA (elliptical weighted average) sampling in the compositor.Lukas Tönne
EWA sampling is designed for downsampling images, i.e. scaling down the size of input image pixels, which happens regularly in compositing. While the standard sampling methods (linear, cubic) work reasonably well for linear transformations, they don't yield good results in non-linear cases like perspective projection or arbitrary displacement. EWA sampling is comparable to mipmapping, but avoids problems with discontinuities. To work correctly the EWA algorithm needs partial derivatives of the mapping functions which convert output pixel coordinates back into the input image space (2x2 Jacobian matrix). With these derivatives the EWA algorithm projects ellipses into the input space and accumulates colors over their area. This calculation was not done correctly in the compositor, only the derivatives du/dx and dv/dy were calculation, basically this means it only worked for non-rotated input images. The patch introduces full derivative calculations du/dx, du/dy, dv/dx, dv/dy for the 3 nodes which use EWA sampling currently: PlaneTrackWarp, MapUV and Displace. In addition the calculation of ellipsis area and axis-aligned bounding boxes has been fixed. For the MapUV and Displace nodes the derivatives have to be estimated by evaluating the UV/displacement inputs with 1-pixel offsets, which can still have problems on discontinuities and sub-pixel variations. These potential problems can only be alleviated by more radical design changes in the compositor functions, which are out of scope for now. Basically the values passed to the UV/Displacement inputs would need to be associated with their 1st order derivatives, which requires a general approach to derivatives in all nodes.
2013-11-30Math Library: add functions cross_poly_v2, cross_tri_v2Campbell Barton
also added utility macro for removing elements in the middle of an array
2013-10-05rename overlap to holes for isect_point_poly_v2Campbell Barton
2013-10-04fix for lasso failing/glitches on overlapping lines, replace scanfill with ↵Campbell Barton
2d pixel filling for drawing and selection.
2013-10-04fix for lasso selection (in non-zbuf mode) when the line intersected its self.Campbell Barton
isect_point_poly_v2() - add argument to check overlapping areas.
2013-09-01Move GCC attributes into a centraized definesSergey Sharybin
Instead of having ifdef __GNUC__ all over the headers to use special compiler's hints use a special file where all things like this are concentrated. Makes code easier to follow and allows to manage special attributes in more efficient way. Thanks Campbell for review!
2013-08-31Simplify line/plane intersection, add line_plane_factor_v3().Campbell Barton
Remove no_flip option for isect_line_plane_v3(), its quite specific and only used for ED_view3d_win_to_3d().
2013-08-30Some knife fixes. Avoids duplicating verts; better handling of cut-through ↵Howard Trickey
ortho. Now cut lines detect vertices that they pass (almost) exactly over and snap to them, to avoid making verts vert close to other ones. Added radius arg to BKE_bmbvh_ray_cast so that can detect an obscuring face when the ray might otherwise go exactly between two triangles. Needed an isect_line_tri_epsilon function for similar reason. Fixes last part of bug #35002. Other knife bugs still present but getting this commit in now before continuing bug fixing.
2013-08-23simplify dist_to_plane_v3 and add dist_squared_to_plane_v3Campbell Barton
2013-08-23math api edits - replace point-normal form for a plane with dist_to_plane_v3()Campbell Barton
also correct python mathutils api, was missing vector checks.
2013-08-23modify closest_to_plane_v3 not to use point-normal form.Campbell Barton
2013-08-22add utility functions for dealing with planesCampbell Barton
- plane_point_side_v3(), a bit like line_point_side_v2() - isect_point_planes_v3(), moved from paint_hide.c functions to convert between point/normal pairs. - plane_from_point_normal_v3() - plane_to_point_normal_v3()
2013-08-22minor internal change: isect_point_poly_v2 was assigning a value past the ↵Campbell Barton
array bounds, not that bad since it wasn't read but this isnt good practice and its simple to avoid.
2013-08-01code cleanup: remove unused functionsCampbell Barton
- IsectLLPt2Df - isect_point_quad_uv_v2 - isect_point_face_uv_v2 These are obsoleted by resolve_tri_uv, resolve_quad_uv also add attributes for unused function results for some math functions.
2013-07-12optimize interp_weights_poly_v2(), well tested, was calculating the area ↵Campbell Barton
twice as much as was needed.
2013-06-10code cleanup: use boolean for intersection functions.Campbell Barton
2013-05-10Optimize BKE_mesh_calc_normals(), gives approx 25% speedup.Campbell Barton
- no need to allocate polygon normal array. - no need to use BLI_array_ functions (realloc's). - reduce some of the looping.
2013-04-22add clip_segment_v3_plane_n() to clip a line segment to planes (as used for ↵Campbell Barton
view clipping). use in ED_view3d_win_to_segment_clip() and fix error, was clipping by only 4 planes rather then 6.
2013-04-21utility function volume_tetrahedron(), for mathutils and BLI math.Campbell Barton
2013-03-21code cleanup: use bool where values are true/false, for view3d and related ↵Campbell Barton
functions.
2013-03-15move polygon intersection out of BLI_lasso into BLI_math_geom since its a ↵Campbell Barton
generally useful function. adds: - isect_point_poly_v2() - isect_point_poly_v2_int()
2013-03-13attempt to quiet warnings for gcc4.2Campbell Barton
2013-03-12use gcc warning -Wredundant-decls, exposes some odd/duplicate declarations ↵Campbell Barton
which have been removed.
2013-03-03code cleanup: ~400 duplicate lines for AO form factor math.Campbell Barton
2013-02-14Fix "Origin to Center of Mass" not working well with ngonsSergej Reich
Now we do simple triangulation and calculate signed area of triangles to account for concave polygons. This only works correct for planar polygons but gives better results overall.
2013-02-10correct arg order in header for isect_point_tri_v2(), Made for confusing ↵Campbell Barton
calltips.
2013-02-09fix for is_quad_convex_v3(), getting the dominant axis wasn't accurate ↵Campbell Barton
enough in some cases and would make beauty fill fail. now rotate the coords before calculation.