From c46d4d9fad5e16daa9f50e30e6373d20b8386bbb Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Tue, 5 Jul 2022 14:56:04 +0200 Subject: Curves: move curves surface transforms to blenkernel This utility struct is useful outside of sculpting code as well. --- .../blender/editors/sculpt_paint/curves_sculpt_intern.hh | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'source/blender/editors/sculpt_paint/curves_sculpt_intern.hh') diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_intern.hh b/source/blender/editors/sculpt_paint/curves_sculpt_intern.hh index 4cfaf7ebfc9..c31bba2fe1e 100644 --- a/source/blender/editors/sculpt_paint/curves_sculpt_intern.hh +++ b/source/blender/editors/sculpt_paint/curves_sculpt_intern.hh @@ -26,6 +26,7 @@ struct BVHTreeFromMesh; namespace blender::ed::sculpt_paint { using bke::CurvesGeometry; +using bke::CurvesSurfaceTransforms; struct StrokeExtension { bool is_first; @@ -116,24 +117,11 @@ class CurvesSculptCommonContext { CurvesSculptCommonContext(const bContext &C); }; -struct CurvesSculptTransforms { - float4x4 curves_to_world; - float4x4 curves_to_surface; - float4x4 world_to_curves; - float4x4 world_to_surface; - float4x4 surface_to_world; - float4x4 surface_to_curves; - float4x4 surface_to_curves_normal; - - CurvesSculptTransforms() = default; - CurvesSculptTransforms(const Object &curves_ob, const Object *surface_ob); -}; - std::optional sample_curves_surface_3d_brush( const Depsgraph &depsgraph, const ARegion ®ion, const View3D &v3d, - const CurvesSculptTransforms &transforms, + const CurvesSurfaceTransforms &transforms, const BVHTreeFromMesh &surface_bvh, const float2 &brush_pos_re, const float brush_radius_re); -- cgit v1.2.3