Age | Commit message (Collapse) | Author |
|
No functional changes.
Allows more performance control and is important for Weld Modifier.
|
|
|
|
|
|
Ref T66423
Differential revision: https://developer.blender.org/D5562
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
Prevents clang-format wrapping text before comments.
|
|
|
|
Simple find_nearest relies on a heuristic for efficient culling of
the BVH tree, which involves a fast callback that always updates the
result, and the caller reusing the result of the previous find_nearest
to prime the process for the next vertex.
If the callback is slow and/or applies significant restrictions on
what kind of nodes can qualify for the result, the heuristic can't
work. Thus for such tasks it is necessary to order and prune nodes
before the callback at BVH tree level using a priority queue.
Since, according to code history, for simple find_nearest the
heuristic approach is faster, this mode has to be an option.
|
|
occlusion
This patch adds support for clip_planes (ie ignore what is behind a face)...
The idea is to first execute a raycast to get the polygon to which the mouse cursor points.
Then a snap test is done on the vertices or edges of the polygon.
Then with the normal and location obtained in raycast a new clip_plane is created and the snap over the whole scene is processed ignoring the elements behind the clip_plane.
Here 2 gif of how the previous patch would work on blender2.79:
{F497176}
{F497177}
Reviewers: mont29, campbellbarton
Reviewed By: campbellbarton
Subscribers: bliblubli
Tags: #bf_blender_2.8
Differential Revision: https://developer.blender.org/D2527
|
|
This reverts commit 717dd4cecd2ea8eaa7b3bbfb5a5c7ec65f0337c0.
It was causing problems in the protactor ruler.
I'll think of a better solution.
|
|
Clip_planes are an important parameter to be used in callbacks.
|
|
|
|
This patch does not make any difference for a user's POV. But it is a step for adding the occlusion test for snapping functions.
This new function finds the node(aabb) whose projection is closest to a screen coordinate.
Reviewers: campbellbarton
Reviewed By: campbellbarton
Tags: #bf_blender_2.8
Differential Revision: https://developer.blender.org/D3180
|
|
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.
|
|
- 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.
|
|
Allow to quickly enable print & tree verify.
|
|
|
|
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.
|
|
Pass distance argument so its possible to limit the range we get all hits from.
Other changes:
- Use boundbox test before calling callback, avoids redundant calls.
- Remove meaningless return value.
- Add doc string, explaining purpose of this function.
|
|
|
|
Would have prevented previous error going unnoticed.
|
|
Useful when BLI_bvhtree_range_query callback calculates a new position to measure from.
|
|
|
|
|
|
This generic function allows callers to walk the tree using callbacks to define behavior.
|
|
So future callbacks can make use of the axis index.
|
|
Support for casting a ray through all nodes to find the closest
(not the first hit as with ray casting).
|
|
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).
|
|
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
|
|
|
|
The callback checks if 2 nodes intersect (not just their AABB).
Advantages:
- theres no need to allocate overlaps which are later ignored.
- expensive intersection tests will run multi-threaded.
Currently only used for Python API.
|
|
|
|
shape instead of a brush tool.
The brush cutting tool for hair, while useful, is not very accurate and
often requires rotating the model constantly to get the right trimming
on every side. This makes adjustments to a hair shape a very tedious
process.
On the other hand, making proxy meshes for hair shapes is a common
workflow. The new operator allows using such rough meshes as boundaries
for hair. All hairs that are outside the shape mesh are removed, while
those cutting it at some length are shortened accordingly.
The operator can be accessed in the particle edit mode toolbar via the
"Shape Cut" button. The "Shape Object" must be set first and stays
selected as a tool setting for repeatedly applying the shape.
|
|
|
|
|
|
|
|
|
|
in the case of an error - assert, rather then fail silently since it wont be working as expected anyway.
|
|
and I moved back to ints since there were many int comparisons.
now define axis_t and an unsugned char.
|
|
|
|
had a typo too.
|
|
|
|
|
|
Patch by MiikaH.
|
|
|
|
without the underscores these clogged up the namespace for autocompleation which was annoying.
|