|
Blender V4.3
|
Functions | |
| void | compute_segment_lengths (OffsetIndices< int > points_by_curve, Span< float3 > positions, const IndexMask &curve_selection, MutableSpan< float > r_segment_lengths) |
| void | solve_length_constraints (OffsetIndices< int > points_by_curve, const IndexMask &curve_selection, Span< float > segment_lenghts, MutableSpan< float3 > positions) |
| void | solve_length_and_collision_constraints (OffsetIndices< int > points_by_curve, const IndexMask &curve_selection, Span< float > segment_lengths, Span< float3 > start_positions, const Mesh &surface, const bke::CurvesSurfaceTransforms &transforms, MutableSpan< float3 > positions) |
The code below uses a prefix naming convention to indicate the coordinate space: cu: Local space of the curves object that is being edited. su: Local space of the surface object. wo: World space.
| void blender::geometry::curve_constraints::compute_segment_lengths | ( | OffsetIndices< int > | points_by_curve, |
| Span< float3 > | positions, | ||
| const IndexMask & | curve_selection, | ||
| MutableSpan< float > | r_segment_lengths ) |
Definition at line 21 of file curve_constraints.cc.
References BLI_assert, blender::math::distance(), blender::index_mask::IndexMask::foreach_segment(), length(), blender::MutableSpan< T >::size(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by blender::ed::sculpt_paint::CurvesConstraintSolver::initialize().
| void blender::geometry::curve_constraints::solve_length_and_collision_constraints | ( | OffsetIndices< int > | points_by_curve, |
| const IndexMask & | curve_selection, | ||
| Span< float > | segment_lengths, | ||
| Span< float3 > | start_positions, | ||
| const Mesh & | surface, | ||
| const bke::CurvesSurfaceTransforms & | transforms, | ||
| MutableSpan< float3 > | positions ) |
Definition at line 62 of file curve_constraints.cc.
References BKE_bvhtree_from_mesh_get(), BLI_bvhtree_ray_cast(), BLI_SCOPED_DEFER, BVHTREE_FROM_CORNER_TRIS, blender::MutableSpan< T >::copy_from(), blender::bke::CurvesSurfaceTransforms::curves_to_surface, blender::math::dot(), blender::index_mask::IndexMask::foreach_segment(), free_bvhtree_from_mesh(), BVHTreeRayHit::index, blender::math::length_squared(), blender::math::normalize(), blender::math::normalize_and_get_length(), pow2f(), BVHTreeFromMesh::raycast_callback, blender::MutableSpan< T >::slice(), blender::Span< T >::slice(), solve_length_constraints(), blender::bke::CurvesSurfaceTransforms::surface_to_curves, blender::bke::CurvesSurfaceTransforms::surface_to_curves_normal, blender::math::transform_direction(), blender::math::transform_point(), and BVHTreeFromMesh::tree.
Referenced by blender::ed::sculpt_paint::CurvesConstraintSolver::solve_step().
| void blender::geometry::curve_constraints::solve_length_constraints | ( | OffsetIndices< int > | points_by_curve, |
| const IndexMask & | curve_selection, | ||
| Span< float > | segment_lenghts, | ||
| MutableSpan< float3 > | positions ) |
Definition at line 41 of file curve_constraints.cc.
References BLI_assert, blender::index_mask::IndexMask::foreach_segment(), blender::math::normalize(), blender::Span< T >::size(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by solve_length_and_collision_constraints(), and blender::ed::sculpt_paint::CurvesConstraintSolver::solve_step().