Commit Graph

6 Commits

Author SHA1 Message Date
Hans Goudey c728fa0663 Cleanup: Simplify retrieving color attribute, improve const correctness
Make it harder to retrieve a mutable attribute from const a const mesh,
and use the attribute search function to check multiple domains and
colors at once.
2023-07-11 16:50:34 -04:00
Hans Goudey f0b53777c8 Cleanup: Use spans and float3 to store sculpt and PBVH vert positions
Also store the allocated deformed positions in a separate array in PBVH,
so there isn't one pointer that _sometimes_ has ownership of its data.

Pull Request: https://projects.blender.org/blender/blender/pulls/109981
2023-07-11 21:01:53 +02:00
Ray Molenkamp c677f791f0 Cleanup: Make format 2023-07-07 20:41:57 -06:00
Joseph Eagar 0b01b7c1fa Sculpt: Fix #109555: More floating point error fixes
* Renamed BKE_pbvh_raycast_project_ray_root to
          BKE_pbvh_clip_ray_ortho for greater
	  clarity.
* BKE_pbvh_clip_ray_ortho no longer strictly clips
  within the input ray interval.  This is not necassary
  for orthographic views and was too prone to floating
  point error.  The function is only called to clip
  brush rays for orthographic views so this is acceptable.
2023-07-07 18:53:06 -07:00
Joseph Eagar f031d7fbf3 Cleanup: remove duplicate function declaration. 2023-07-03 20:11:07 -07:00
Joseph Eagar 7e2659e4ab Cleanup: Split BKE_pbvh.h into BKE_pbvh_api.hh
Split much of BKE_pbvh.h into BKE_pbvh_api.hh.
BKE_pbvh.h is included by BKE_paint.h, which in
turn is included by large amounts of code including
RNA.

This makes it extremely difficult to change
or clean up the PBVH API, since each modification
of BKE_pbvh.h can take 20-30 minutes to compile,
even on a quad-core system with an SSD. This
commit fixes that by moving most of BKE_pbvh.h
into another file and just having the core,
external-facing interfaces in BKE_pbvh.h.
2023-07-03 20:01:04 -07:00