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
2018-05-09Fix (unreported) bug in BVHTree 'free tessfaces' flag setting.Bastien Montagne
Same issue as in DM-based on, so follow up of rBf3efa9e15f58...
2018-05-09Merge branch 'master' into blender2.8Bastien Montagne
2018-05-09Fix (unreported) bug in BVHTree 'free tessfaces' flag setting.Bastien Montagne
Could lead to atempt to free NULL pointer, and/or memory leak.
2018-05-09BKE: bvhutils: Always return NULL when the BVHtree has no leafs.Germano
BLI_bvhkdop functions were not made to work with zero-leaf trees. Perhaps a better solution would be to modify BLI_bvhkdop to work with zero leaf trees. But this solution of returning NULL was already used for bvhtrees of looptris.
2018-05-09BKE: bvhutils: Port bvhtree_from_mesh_get to take a Mesh param instead of a ↵Germano
DerivedMesh. Differential Revision: https://developer.blender.org/D3227
2018-05-08Cleanup: mesh_runtime namingCampbell Barton
- BKE_mesh_get_looptri_num -> BKE_mesh_runtime_looptri_len - BKE_mesh_runtime_recalc_looptri -> BKE_mesh_runtime_looptri_recalc - BKE_mesh_get_looptri_array -> BKE_mesh_runtime_looptri_ensure
2018-05-08looptri + bvhtree support for MeshSybren A. Stüvel
2018-05-04BKE: bvhuils: remove member `sphere_radius`.Germano
This member currently doubles the value of `ray->radius` or is not even used.
2018-05-04Fix erroe in previous commit.Germano
2018-05-04BKE: bvhutils: Unifies static functions oh bvhtrees creation.Germano
2018-05-04BKE: BVHtree: Replace all external references of `bvhtree_from_mesh_looptri` ↵Germano
with `bvhtree_from_mesh_get`.
2018-05-04BKE: BVHtree: make `bvhtree_from_mesh_edges` a static function.Germano
This will help us have more control over bvhtrees that are cached.
2018-05-03BKE bvhtree: Add `tree_type` parameter to `bvhtree_from_mesh_get`.Germano
This will allow greater control of the bvhtrees that are obtained, and helps identify problems. It is also an additional step to unify the functions.
2018-05-01Refactoring: bvhutils: Use a function that gets the bvhtree through an ↵Germano
identifier type. Reviewed By: @campbellbarton Differential Revision: https://developer.blender.org/D3192
2018-02-15Cleanup: use '_len' instead of '_size' w/ BLI APICampbell Barton
- When returning the number of items in a collection use BLI_*_len() - Keep _size() for size in bytes. - Keep _count() for data structures that don't store length (hint this isn't a simple getter). See P611 to apply instead of manually resolving conflicts.
2017-08-11Fix transform snap code using 'allocated' flags to get verts/edges/etc. ↵Bastien Montagne
arrays again from DM. This was... horribly wrong, CDDM will often *not* need to allocate anything to return arrays of mesh items! Just check whether array pointer is NULL. Also, remove `DM_get_looptri_array`, that one is useless currently, `dm->getLoopTriArray` will always return cached array (computing it if needed).
2017-06-19Cleanup: doxygen commentsCampbell Barton
Also remove duplicate & mismatching comments from grease-pencil header. Keep comments close to implementation to avoid getting out of sync.
2017-02-17Remove unused functions related to distance between BoundBox and rayGermano Cavalcante
2017-02-17Forgotten in last commit: Check the allocationGermano Cavalcante
2017-02-17Do not release the arrays used in the parameters of the expanded functions ↵Germano Cavalcante
of bvhutils The release of these arrays should be the programmer's discretion since these arrays can continue to be used. Only the expanded functions `bvhtree_from_mesh_edges_ex` and `bvhtree_from_mesh_looptri_ex` are currently being used in blender (in mesh_remap.c), and from what I could to analyze, these changes can prevent a crash.
2017-02-07Param `is_cached` not being used in` bvhtree_from_mesh_edges_setup_data`Germano Cavalcante
This could cause bugs in the memory release
2017-02-06Specify the correct size of the BVHTree of edgesGermano Cavalcante
~edge_num~ edges_num_active Not always all the edges enter in the build
2017-02-06Standardization and style for BKE_bvhutilsGermano Cavalcante
Add `bvhtree_from_mesh_edges_ex` and callbacks to nearest_to_ray (Similar to the other functions of this code)
2017-02-05Cleaning of the last commit: lack of attention with the debug of time X(Germano Cavalcante
This was a stupid mistake
2017-02-05Optimize BVHTree creation of vertices that have BLI_bitmap testGermano Cavalcante
Instead of reference the vertex first and test the bitmap afterwards. Test the bitmap first and reference the vertex after. In a mesh with 31146 vertices and the entire bitmap disabled, the loop time is 243% faster With all bitmap enabled, the time becomes 463473% faster!!! One possible reason for this huge difference in peformance is that maybe the compiler is not putting the function "BM_vert_at_index" inline (I dont know if buildbot do this, but it's good to investigate).
2016-06-30Transform Snap: Optimize edge-snap using BVH treeGermano Cavalcante
changes in BLI_kdopbvh: - `BLI_bvhtree_find_nearest_to_ray` now takes is_ray_normalized and scale argument. - `BLI_bvhtree_find_nearest_to_ray_angle` has been added (use for perspective view). changes in BLI_bvhutils: - `bvhtree_from_editmesh_edges_ex` was added. changes in math_geom: - `dist_squared_ray_to_seg_v3` was added. other changes: - `do_ray_start_correction` is no longer necessary to snap to verts. - the way in which the test of depth was done before is being simulated in callbacks.
2016-06-29Fix T48695: Slowdown w/ edit-mesh & shrinkwrapGermano Cavalcante
0b5a0d84 caused regression since edit-mesh BVH wasn't cached, each shrink-wrap modifier created its own BVH.
2016-06-27Docs: arg namesCampbell Barton
2016-05-13Correct assertsCampbell Barton
2016-05-11Correct check for tree being in BVH cacheCampbell Barton
2016-05-11Remove pointer typedef from BVHCacheCampbell Barton
Used ** arguments unnecessarily, also replace BLI_linklist_apply with while loop.
2016-05-06Correct in-range assert (zero is valid)Campbell Barton
2016-05-05Missed last commitCampbell Barton
2016-05-05bvhutils: remove bitmap countingCampbell Barton
All callers pass in valid number
2016-05-05Add asserts to check bvhutils args are correctCampbell Barton
Would have prevented previous error going unnoticed.
2016-05-05Transform/Snap: EditMesh/BKE_bvhutils API improvementsGermano Cavalcante
Separate the creation of trees from EditMesh from the creation of trees from DerivedMesh. This was meant to simplify the API, but didn't work out so well. `bvhtree_from_mesh_*` actually is working as `bvhtree_from_derivedmesh_*`. This is inconsistent with the trees created from EditMesh. Since for create them does not use the DerivedMesh. In such cases the dm is being used only to cache the tree in the struct DerivedMesh. What is immediately released once bvhtree is being used in functions that change(tag) the DM cleaning the cache. - Use a filter function so users of SnapObjectContext can define how edit-mesh elements are handled. - Remove em_evil. - bvhtree of EditMesh is now really cached in the snap functions. - Code becomes organized and easier to maintain. This is an important patch for future improvements in snapping functions.
2016-01-28Cleanup: warnings & styleCampbell Barton
2016-01-25Transform: optimize vertex snap w/ nearest-to-rayGermano Cavalcante
Use BLI_bvhtree_find_nearest_to_ray for vertex snapping, avoids doing screen-space lookup on each vertex.
2015-10-09Correct own error in editmesh bvhCampbell Barton
Flag mix-up and uninitialized var.
2015-10-09Fix leak creating 'empty' looptri bvh treeCampbell Barton
2015-10-06Fix T46389: Shrinkwrap fails in editmodeCampbell Barton
Own regression caused by fix for T46067, edit-mode bvh only contained unselected faces. This commit adds support for an edit-mode bvh containing all faces.
2015-08-27Use correct size for BVH insertionCampbell Barton
2015-08-21BVH-raycast: Use watertight intersectionsCampbell Barton
By default watertight intersections are used, For callbacks where its not needed, BLI_bvhtree_ray_cast_ex can be called without the BVH_RAYCAST_WATERTIGHT flag. Fixes T45286
2015-08-20Cleanup: remove unused BVH_ONQUAD flagCampbell Barton
2015-07-29Expose bvhtree_sphereray_tri_intersection for general useCampbell Barton
2015-07-23Cleanup: arg namesCampbell Barton
2015-07-23Missed adding BVH callbacks in recent commitCampbell Barton
2015-07-22Add bvhtree_from_mesh_looptri utility functionCampbell Barton
2015-07-22Use doxy sections in bvhutilsCampbell Barton
2015-07-22Use const for BVH mesh arraysCampbell Barton