Age | Commit message (Collapse) | Author |
|
|
|
Previously quads always split along first-third vertices.
This is still the default, to avoid flickering with animated deformation
however concave quads that would create two opposing triangles now use
second-fourth split.
Reported as T53999 although this issue has been known limitation
for a long time.
|
|
|
|
Original code by @mano-wii, modified for general use.
|
|
This exposes end-point bias argument, needed in rare cases.
|
|
|
|
The new `isect_ray_aabb_v3_simple` function replaces the `BKE_boundbox_ray_hit_check` and can be used in BVHTree Root (first AABB). So it is much more efficient.
|
|
This adds two functions to project 3d coordinates onto a 3d plane,
to get 2d coordinates, essentially eliminating the plane's normal axis
from the coordinates.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D2460
|
|
This splits `interp_weights_face_v3` into `interp_weights_tri_v3` and
`interp_weights_quad_v3`, in order to properly handle three sided polygons
without needing a useless extra index in your weight array. This also
improves clarity and consistency with other math_geom functions, thus
reducing potential future errors.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D2461
|
|
Other than implementing a `mid_v3_v3_array` function, this removes
`cent_tri_v3` and `cent_quad_v3` in favor of `mid_v3_v3v3v3` and
`mid_v3_v3v3v3v3` respectively.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D2459
|
|
Bitmap drawing is out-of-scope for a general math API,
move to BLI_bitmap_draw_2d.
|
|
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.
|
|
|
|
Gives a bit better precision than creating a line in some cases,
use for ED_view3d_win_to_3d.
|
|
|
|
|
|
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.
|
|
Instead of running the callback per-pixel,
pass the x-span to the callback.
|
|
Distinguish between line / line_segment
|
|
Rename not-very-descriptive (p1, d) -> (ray_origin, ray_direction)
|
|
|
|
|
|
|
|
Differentiate between lines and segments.
|
|
Was taking a triangle and doing ray-tri intersect.
|
|
|
|
Project both triangles onto the same plane to simplify calculations.
|
|
- closest_to_plane3 (for float3 planes)
- closest_to_plane*_normalized_v3 (for unit length planes)
Use when the plane is known to be unit length
|
|
From Cycles with some very minor differences.
|
|
Also define epsilon var for ray-cast functions.
|
|
|
|
|
|
This stores loop indices into the loop array giving easier acess
to data such as vertex-colors and UV's,
removing the need to store an MFace duplicate of custom-data.
This doesn't yet move all internal code from MFace to LoopTri just yet.
Only applies to:
- opengl drawing
- sculpting (pbvh)
- vertex/weight paint
Thanks to @psy-fi for review, fixes and improvements to drawing!
|
|
add a negated version of axis_dominant_v3_to_m3
|
|
Remove offset before calculating distance.
Define 'plane3' to BLI_math, since we often don't need the 4th component.
|
|
|
|
Use the bilinear reverse to find the pixel to bleed from.
Was using pixel space which didn't work well.
|
|
Also add a faster, non-normalized version of the function.
(Neither are used currently used).
|
|
|
|
Can be used to check if a point is inside the 2-planes defined by a face-corner.
|
|
- area_quad_v3 now works correctly with concave quads.
- add area_squared_*** functions, to use when comparing to avoid a sqrt().
|
|
This changes BKE's fitting code to use `BKE_camera_params_compute_viewplane` instead of
`BKE_camera_view_frame`. This allows that code to work with orthographic projection too.
Also, two funcs were added to rna's Object, to resp. get the projection matrix of that
object (mostly useful for cameras and lamps objects), and return position this object
should be to see all (to fit) a given set of points.
Reviewers: campbellbarton
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D961
|
|
|
|
Resulting triangles could be pointing in opposing directions.
|
|
|
|
|
|
also add transform_point_by_seg_v3
|
|
also add unsigned versions
|
|
Add to Python via mathutils.geometry
|