Age | Commit message (Collapse) | Author |
|
|
|
Gives a bit better precision than creating a line in some cases,
use for ED_view3d_win_to_3d.
|
|
|
|
The key is needed in the case the ghash resizes.
Caused regression T47984.
|
|
|
|
D1080 by @rockets, with own improvements to tests
|
|
Useful when BLI_bvhtree_range_query callback calculates a new position to measure from.
|
|
|
|
Sign is known in this case, no need to check for either direction.
|
|
|
|
|
|
|
|
|
|
This is an alternative to passing a copy callback which is some times inconvenient.
Instead the caller can write to the key - needed when the key is duplicated memory.
Allows for minor optimization in ghash/gset use.
Also add BLI_gset_ensure_p_ex
|
|
Behavior is similar to python's set.pop(), it removes and returns a 'random' entry from the hash.
Notes:
* Popping will return items in same order as ghash/gset iterators (i.e. increasing
order in internal buckets-based storage), unless ghash/gset is modified in between.
* We are keeping a track of the latest bucket we popped out (through a 'state' parameter),
this allows for similar performances to iterators when iteratively popping a whole hash
(without it, we are roughly O(n!), with it we are roughly O(n)...).
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D1808
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Collaboration between russki guy working from Netherlands and
ausie bloke working from Australia (not Austria).
|
|
Also remove null checks from args with non-null attribute.
|
|
This generic function allows callers to walk the tree using callbacks to define behavior.
|
|
So future callbacks can make use of the axis index.
|
|
|
|
|
|
|
|
Also add link to original source & parenthesize min macro.
|
|
|
|
This variant behave exactly as TIMEIT_START etc., but it also sums up all times in
a static var and prints out average execution time - very useful when dealing
with small/quick pieces of code that get executed often, to get some meaningful results.
|
|
|
|
|
|
Title actually tells it all, it is rather simple function which totally makes
sense to be inlined.
This gives up to 5% of speedup when updating scopes for a large image.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D1310
|
|
Support for casting a ray through all nodes to find the closest
(not the first hit as with ray casting).
|
|
|
|
Calculate the clipped min/max factor along the segment,
only applying to the coordinates at the end (will give better precision too).
Also make split input/output args.
|
|
|
|
|
|
Follow isect_ray_tri_watertight_v3 naming.
|
|
|
|
|
|
|
|
|
|
Based on usages so far:
- Split callback worker func in two, 'basic' and 'extended' versions. The former goes back
to the simplest verion, while the later keeps the 'userdata_chunk', and gets the thread_id too.
- Add use_threading to simple BLI_task_parallel_range(), turns out we need this pretty much systematically,
and allows to get rid of most usages of BLI_task_parallel_range_ex().
- Now BLI_task_parallel_range() expects 'basic' version of callback, while BLI_task_parallel_range_ex()
expectes 'extended' version of the callback.
All in all, this should make common usage of BLI_task_parallel_range simpler (less verbose), and add
access to advanced callback to thread id, which is mandatory in some (future) cases.
|
|
|
|
Now only reverse the fill direction when reaching a non-concave corner.
Gives ~4x speedup here in tests with complex ngon.
|
|
We cannot use FLT_MAX as initi distance for raycast...
Renamed TRANSFORM_DIST_MAX_RAY to BVH_RAYCAST_DIST_MAX, moved it into BLI_kdopbvh,
and use in RNA raycast callbacks (and all other places using that API).
|