Blender
V3.3
|
Classes | |
struct | AddCurvesOnMeshInputs |
struct | AddCurvesOnMeshOutputs |
struct | MeshToVolumeResolution |
struct | RealizeInstancesOptions |
class | ReverseUVSampler |
struct | NeighborCurve |
struct | WeldGroup |
struct | WeldGroupEdge |
struct | WeldVert |
struct | WeldEdge |
struct | WeldLoop |
struct | WeldPoly |
struct | WeldMesh |
struct | WeldLoopOfPolyIter |
struct | WeldVertexCluster |
struct | CuboidConfig |
struct | CurveFromEdgesOutput |
struct | OrderedAttributes |
struct | AttributeFallbacksArray |
struct | PointCloudRealizeInfo |
struct | RealizePointCloudTask |
struct | MeshElementStartIndices |
struct | MeshRealizeInfo |
struct | RealizeMeshTask |
struct | RealizeCurveInfo |
struct | CurvesElementStartIndices |
struct | RealizeCurveTask |
struct | AllPointCloudsInfo |
struct | AllMeshesInfo |
struct | AllCurvesInfo |
struct | GatherTasks |
struct | GatherOffsets |
struct | GatherTasksInfo |
struct | InstanceContext |
struct | AttributesForInterpolation |
struct | GenericAttributes |
Typedefs | |
using | NeighborCurves = Vector< NeighborCurve, max_neighbors > |
Functions | |
AddCurvesOnMeshOutputs | add_curves_on_mesh (bke::CurvesGeometry &curves, const AddCurvesOnMeshInputs &inputs) |
float3 | compute_surface_point_normal (const MLoopTri &looptri, const float3 &bary_coord, const Span< float3 > corner_normals) |
bke::CurvesGeometry | fillet_curves_poly (const bke::CurvesGeometry &src_curves, IndexMask curve_selection, const VArray< float > &radius, const VArray< int > &counts, bool limit_radius) |
bke::CurvesGeometry | fillet_curves_bezier (const bke::CurvesGeometry &src_curves, IndexMask curve_selection, const VArray< float > &radius, bool limit_radius) |
Mesh * | create_cuboid_mesh (const float3 &size, int verts_x, int verts_y, int verts_z, const bke::AttributeIDRef &uv_id) |
Mesh * | create_cuboid_mesh (const float3 &size, int verts_x, int verts_y, int verts_z) |
bke::CurvesGeometry | mesh_to_curve_convert (const Mesh &mesh, const IndexMask selection) |
bke::CurvesGeometry | create_curve_from_vert_indices (const Mesh &mesh, Span< int > vert_indices, Span< int > curve_offsets, IndexRange cyclic_curves) |
PointCloud * | point_merge_by_distance (const PointCloud &src_points, const float merge_distance, const IndexMask selection) |
Curves * | resample_to_count (const CurveComponent &src_component, const fn::Field< bool > &selection_field, const fn::Field< int > &count_field) |
Curves * | resample_to_length (const CurveComponent &src_component, const fn::Field< bool > &selection_field, const fn::Field< float > &segment_length_field) |
Curves * | resample_to_evaluated (const CurveComponent &src_component, const fn::Field< bool > &selection_field) |
bool | try_curves_conversion_in_place (IndexMask selection, CurveType dst_type, FunctionRef< bke::CurvesGeometry &()> get_writable_curves_fn) |
bke::CurvesGeometry | convert_curves (const bke::CurvesGeometry &src_curves, IndexMask selection, CurveType dst_type) |
bke::CurvesGeometry | subdivide_curves (const bke::CurvesGeometry &src_curves, IndexMask selection, const VArray< int > &cuts) |
static void | initialize_straight_curve_positions (const float3 &p1, const float3 &p2, MutableSpan< float3 > r_positions) |
static Array< NeighborCurves > | find_curve_neighbors (const Span< float3 > root_positions, const KDTree_3d &old_roots_kdtree) |
template<typename T , typename GetValueF > | |
void | interpolate_from_neighbors (const Span< NeighborCurves > neighbors_per_curve, const T &fallback, const GetValueF &get_value_from_neighbor, MutableSpan< T > r_interpolated_values) |
static void | interpolate_position_without_interpolation (CurvesGeometry &curves, const int old_curves_num, const Span< float3 > root_positions_cu, const Span< float > new_lengths_cu, const Span< float3 > new_normals_su, const float4x4 &surface_to_curves_normal_mat) |
static void | interpolate_position_with_interpolation (CurvesGeometry &curves, const Span< float3 > root_positions_cu, const Span< NeighborCurves > neighbors_per_curve, const int old_curves_num, const Span< float > new_lengths_cu, const Span< float3 > new_normals_su, const bke::CurvesSurfaceTransforms &transforms, const ReverseUVSampler &reverse_uv_sampler, const Span< float3 > corner_normals_su) |
static IndexRange | curve_dst_offsets (const IndexRange points, const int curve_index) |
template<typename T > | |
static void | threaded_slice_fill (const Span< T > src, const Span< int > offsets, MutableSpan< T > dst) |
template<typename T > | |
static void | duplicate_fillet_point_data (const bke::CurvesGeometry &src_curves, const bke::CurvesGeometry &dst_curves, const IndexMask curve_selection, const Span< int > point_offsets, const Span< T > src, MutableSpan< T > dst) |
static void | duplicate_fillet_point_data (const bke::CurvesGeometry &src_curves, const bke::CurvesGeometry &dst_curves, const IndexMask selection, const Span< int > point_offsets, const GSpan src, GMutableSpan dst) |
static void | calculate_result_offsets (const bke::CurvesGeometry &src_curves, const IndexMask selection, const Span< IndexRange > unselected_ranges, const VArray< float > &radii, const VArray< int > &counts, const Span< bool > cyclic, MutableSpan< int > dst_curve_offsets, MutableSpan< int > dst_point_offsets) |
static void | calculate_directions (const Span< float3 > positions, MutableSpan< float3 > directions) |
static void | calculate_angles (const Span< float3 > directions, MutableSpan< float > angles) |
static float | limit_radius (const float3 &position_prev, const float3 &position, const float3 &position_next, const float angle_prev, const float angle, const float angle_next, const float radius_prev, const float radius, const float radius_next) |
static void | limit_radii (const Span< float3 > positions, const Span< float > angles, const Span< float > radii, const bool cyclic, MutableSpan< float > radii_clamped) |
static void | calculate_fillet_positions (const Span< float3 > src_positions, const Span< float > angles, const Span< float > radii, const Span< float3 > directions, const Span< int > dst_offsets, MutableSpan< float3 > dst) |
static void | calculate_bezier_handles_bezier_mode (const Span< float3 > src_handles_l, const Span< float3 > src_handles_r, const Span< int8_t > src_types_l, const Span< int8_t > src_types_r, const Span< float > angles, const Span< float > radii, const Span< float3 > directions, const Span< int > dst_offsets, const Span< float3 > dst_positions, MutableSpan< float3 > dst_handles_l, MutableSpan< float3 > dst_handles_r, MutableSpan< int8_t > dst_types_l, MutableSpan< int8_t > dst_types_r) |
static void | calculate_bezier_handles_poly_mode (const Span< float3 > src_handles_l, const Span< float3 > src_handles_r, const Span< int8_t > src_types_l, const Span< int8_t > src_types_r, const Span< int > dst_offsets, const Span< float3 > dst_positions, MutableSpan< float3 > dst_handles_l, MutableSpan< float3 > dst_handles_r, MutableSpan< int8_t > dst_types_l, MutableSpan< int8_t > dst_types_r) |
static bke::CurvesGeometry | fillet_curves (const bke::CurvesGeometry &src_curves, const IndexMask curve_selection, const VArray< float > &radius_input, const VArray< int > &counts, const bool limit_radius, const bool use_bezier_mode) |
static void | calculate_vertices (const CuboidConfig &config, MutableSpan< MVert > verts) |
static void | define_quad (MutableSpan< MPoly > polys, MutableSpan< MLoop > loops, const int poly_index, const int loop_index, const int vert_1, const int vert_2, const int vert_3, const int vert_4) |
static void | calculate_polys (const CuboidConfig &config, MutableSpan< MPoly > polys, MutableSpan< MLoop > loops) |
static void | calculate_uvs (const CuboidConfig &config, Mesh *mesh, const bke::AttributeIDRef &uv_id) |
template<typename T > | |
static void | copy_with_map (const VArray< T > &src, Span< int > map, MutableSpan< T > dst) |
static CurveFromEdgesOutput | edges_to_curve_point_indices (Span< MVert > verts, Span< std::pair< int, int >> edges) |
static Vector< std::pair< int, int > > | get_selected_edges (const Mesh &mesh, const IndexMask selection) |
static void | copy_transformed_positions (const Span< float3 > src, const float4x4 &transform, MutableSpan< float3 > dst) |
static void | threaded_copy (const GSpan src, GMutableSpan dst) |
static void | threaded_fill (const GPointer value, GMutableSpan dst) |
static void | copy_generic_attributes_to_result (const Span< std::optional< GVArraySpan >> src_attributes, const AttributeFallbacksArray &attribute_fallbacks, const OrderedAttributes &ordered_attributes, const FunctionRef< IndexRange(eAttrDomain)> &range_fn, MutableSpan< GSpanAttributeWriter > dst_attribute_writers) |
static void | create_result_ids (const RealizeInstancesOptions &options, Span< int > stored_ids, const int task_id, MutableSpan< int > dst_ids) |
static fn::Field< int > | get_count_input_max_one (const fn::Field< int > &count_field) |
static fn::Field< int > | get_count_input_from_length (const fn::Field< float > &length_field) |
static bool | interpolate_attribute_to_curves (const bke::AttributeIDRef &attribute_id, const std::array< int, CURVE_TYPES_NUM > &type_counts) |
static bool | interpolate_attribute_to_poly_curve (const bke::AttributeIDRef &attribute_id) |
static void | retrieve_attribute_spans (const Span< bke::AttributeIDRef > ids, const CurveComponent &src_component, CurveComponent &dst_component, Vector< GSpan > &src, Vector< GMutableSpan > &dst, Vector< bke::GSpanAttributeWriter > &dst_attributes) |
static void | gather_point_attributes_to_interpolate (const CurveComponent &src_component, CurveComponent &dst_component, AttributesForInterpolation &result) |
static Curves * | resample_to_uniform (const CurveComponent &src_component, const fn::Field< bool > &selection_field, const fn::Field< int > &count_field) |
static int2 | uv_to_cell_key (const float2 &uv, const int resolution) |
static bool | is_nurbs_to_bezier_one_to_one (const KnotsMode knots_mode) |
static bool | conversion_can_change_point_num (const CurveType dst_type) |
template<typename T > | |
static void | scale_input_assign (const Span< T > src, const int scale, const int offset, MutableSpan< T > dst) |
template<typename T > | |
static void | bezier_generic_to_nurbs (const Span< T > src, MutableSpan< T > dst) |
static void | bezier_generic_to_nurbs (const GSpan src, GMutableSpan dst) |
static void | bezier_positions_to_nurbs (const Span< float3 > src_positions, const Span< float3 > src_handles_l, const Span< float3 > src_handles_r, MutableSpan< float3 > dst_positions) |
static void | catmull_rom_to_bezier_handles (const Span< float3 > src_positions, const bool cyclic, MutableSpan< float3 > dst_handles_l, MutableSpan< float3 > dst_handles_r) |
static void | catmull_rom_to_nurbs_positions (const Span< float3 > src_positions, const bool cyclic, MutableSpan< float3 > dst_positions) |
template<typename T > | |
static void | nurbs_to_bezier_assign (const Span< T > src, const MutableSpan< T > dst, const KnotsMode knots_mode) |
static void | nurbs_to_bezier_assign (const GSpan src, const KnotsMode knots_mode, GMutableSpan dst) |
static Vector< float3 > | create_nurbs_to_bezier_handles (const Span< float3 > nurbs_positions, const KnotsMode knots_mode) |
static void | create_nurbs_to_bezier_positions (const Span< float3 > nurbs_positions, const Span< float3 > handle_positions, const KnotsMode knots_mode, MutableSpan< float3 > bezier_positions) |
static int | to_bezier_size (const CurveType src_type, const bool cyclic, const KnotsMode knots_mode, const int src_size) |
static int | to_nurbs_size (const CurveType src_type, const int src_size) |
static void | retrieve_curve_sizes (const bke::CurvesGeometry &curves, MutableSpan< int > sizes) |
static void | retrieve_generic_point_attributes (const bke::AttributeAccessor &src_attributes, bke::MutableAttributeAccessor &dst_attributes, GenericAttributes &attributes) |
static bke::CurvesGeometry | convert_curves_to_bezier (const bke::CurvesGeometry &src_curves, const IndexMask selection) |
static bke::CurvesGeometry | convert_curves_to_nurbs (const bke::CurvesGeometry &src_curves, const IndexMask selection) |
static bke::CurvesGeometry | convert_curves_trivial (const bke::CurvesGeometry &src_curves, const IndexMask selection, const CurveType dst_type) |
static IndexRange | curve_dst_offsets (const IndexRange points, const int curve_index) |
static void | calculate_result_offsets (const bke::CurvesGeometry &src_curves, const IndexMask selection, const Span< IndexRange > unselected_ranges, const VArray< int > &cuts, const Span< bool > cyclic, MutableSpan< int > dst_curve_offsets, MutableSpan< int > dst_point_offsets) |
template<typename T > | |
static void | linear_interpolation (const T &a, const T &b, MutableSpan< T > dst) |
template<typename T > | |
static void | subdivide_attribute_linear (const bke::CurvesGeometry &src_curves, const bke::CurvesGeometry &dst_curves, const IndexMask selection, const Span< int > point_offsets, const Span< T > src, MutableSpan< T > dst) |
static void | subdivide_attribute_linear (const bke::CurvesGeometry &src_curves, const bke::CurvesGeometry &dst_curves, const IndexMask selection, const Span< int > point_offsets, const GSpan src, GMutableSpan dst) |
template<typename T > | |
static void | subdivide_attribute_catmull_rom (const bke::CurvesGeometry &src_curves, const bke::CurvesGeometry &dst_curves, const IndexMask selection, const Span< int > point_offsets, const Span< bool > cyclic, const Span< T > src, MutableSpan< T > dst) |
static void | subdivide_attribute_catmull_rom (const bke::CurvesGeometry &src_curves, const bke::CurvesGeometry &dst_curves, const IndexMask selection, const Span< int > point_offsets, const Span< bool > cyclic, const GSpan src, GMutableSpan dst) |
static void | subdivide_bezier_segment (const float3 &position_prev, const float3 &handle_prev, const float3 &handle_next, const float3 &position_next, const HandleType type_prev, const HandleType type_next, const IndexRange segment_points, MutableSpan< float3 > dst_positions, MutableSpan< float3 > dst_handles_l, MutableSpan< float3 > dst_handles_r, MutableSpan< int8_t > dst_types_l, MutableSpan< int8_t > dst_types_r, const bool is_last_cyclic_segment) |
static void | subdivide_bezier_positions (const Span< float3 > src_positions, const Span< int8_t > src_types_l, const Span< int8_t > src_types_r, const Span< float3 > src_handles_l, const Span< float3 > src_handles_r, const Span< int > evaluated_offsets, const bool cyclic, MutableSpan< float3 > dst_positions, MutableSpan< int8_t > dst_types_l, MutableSpan< int8_t > dst_types_r, MutableSpan< float3 > dst_handles_l, MutableSpan< float3 > dst_handles_r) |
Merge Map Creation | |
std::optional< Mesh * > | mesh_merge_by_distance_all (const Mesh &mesh, IndexMask selection, float merge_distance) |
std::optional< Mesh * > | mesh_merge_by_distance_connected (const Mesh &mesh, Span< bool > selection, float merge_distance, bool only_loose_edges) |
Realize Instances | |
GeometrySet | realize_instances (GeometrySet geometry_set, const RealizeInstancesOptions &options) |
static void | remove_id_attribute_from_instances (GeometrySet &geometry_set) |
Vert API | |
static Vector< WeldVert > | weld_vert_ctx_alloc_and_setup (Span< int > vert_dest_map, const int vert_kill_len) |
static void | weld_vert_groups_setup (Span< WeldVert > wvert, Span< int > vert_dest_map, MutableSpan< int > r_vert_groups_map, Array< int > &r_vert_groups_buffer, Array< WeldGroup > &r_vert_groups) |
Edge API | |
static Vector< WeldEdge > | weld_edge_ctx_alloc (Span< MEdge > medge, Span< int > vert_dest_map, MutableSpan< int > r_edge_dest_map, MutableSpan< int > r_edge_ctx_map) |
static void | weld_edge_ctx_setup (MutableSpan< WeldGroup > r_vlinks, MutableSpan< int > r_edge_dest_map, MutableSpan< WeldEdge > r_wedge, int *r_edge_kiil_len) |
static void | weld_edge_groups_setup (const int medge_len, const int edge_kill_len, MutableSpan< WeldEdge > wedge, Span< int > wedge_map, MutableSpan< int > r_edge_groups_map, Array< int > &r_edge_groups_buffer, Array< WeldGroupEdge > &r_edge_groups) |
Poly and Loop API | |
static bool | weld_iter_loop_of_poly_begin (WeldLoopOfPolyIter &iter, const WeldPoly &wp, Span< WeldLoop > wloop, Span< MLoop > mloop, Span< int > loop_map, int *group_buffer) |
static bool | weld_iter_loop_of_poly_next (WeldLoopOfPolyIter &iter) |
static void | weld_poly_loop_ctx_alloc (Span< MPoly > mpoly, Span< MLoop > mloop, Span< int > vert_dest_map, Span< int > edge_dest_map, WeldMesh *r_weld_mesh) |
static void | weld_poly_split_recursive (Span< int > vert_dest_map, int ctx_verts_len, WeldPoly *r_wp, WeldMesh *r_weld_mesh, int *r_poly_kill, int *r_loop_kill) |
static void | weld_poly_loop_ctx_setup (Span< MLoop > mloop, const int mvert_len, Span< int > vert_dest_map, const int remain_edge_ctx_len, MutableSpan< WeldGroup > r_vlinks, WeldMesh *r_weld_mesh) |
Mesh API | |
static void | weld_mesh_context_create (const Mesh &mesh, MutableSpan< int > vert_dest_map, const int vert_kill_len, WeldMesh *r_weld_mesh) |
CustomData | |
static void | customdata_weld (const CustomData *source, CustomData *dest, const int *src_indices, int count, int dest_index) |
Mesh Vertex Merging | |
static Mesh * | create_merged_mesh (const Mesh &mesh, MutableSpan< int > vert_dest_map, const int removed_vertex_count) |
Gather Realize Tasks | |
static void | gather_realize_tasks_recursive (GatherTasksInfo &gather_info, const GeometrySet &geometry_set, const float4x4 &base_transform, const InstanceContext &base_instance_context) |
static Vector< std::pair< int, GSpan > > | prepare_attribute_fallbacks (GatherTasksInfo &gather_info, const InstancesComponent &instances_component, const OrderedAttributes &ordered_attributes) |
static void | foreach_geometry_in_reference (const InstanceReference &reference, const float4x4 &base_transform, const uint32_t id, FunctionRef< void(const GeometrySet &geometry_set, const float4x4 &transform, uint32_t id)> fn) |
static void | gather_realize_tasks_for_instances (GatherTasksInfo &gather_info, const InstancesComponent &instances_component, const float4x4 &base_transform, const InstanceContext &base_instance_context) |
Point Cloud | |
static OrderedAttributes | gather_generic_pointcloud_attributes_to_propagate (const GeometrySet &in_geometry_set, const RealizeInstancesOptions &options, bool &r_create_id) |
static void | gather_pointclouds_to_realize (const GeometrySet &geometry_set, VectorSet< const PointCloud * > &r_pointclouds) |
static AllPointCloudsInfo | preprocess_pointclouds (const GeometrySet &geometry_set, const RealizeInstancesOptions &options) |
static void | execute_realize_pointcloud_task (const RealizeInstancesOptions &options, const RealizePointCloudTask &task, const OrderedAttributes &ordered_attributes, MutableSpan< GSpanAttributeWriter > dst_attribute_writers, MutableSpan< int > all_dst_ids, MutableSpan< float3 > all_dst_positions) |
static void | execute_realize_pointcloud_tasks (const RealizeInstancesOptions &options, const AllPointCloudsInfo &all_pointclouds_info, const Span< RealizePointCloudTask > tasks, const OrderedAttributes &ordered_attributes, GeometrySet &r_realized_geometry) |
Mesh | |
static OrderedAttributes | gather_generic_mesh_attributes_to_propagate (const GeometrySet &in_geometry_set, const RealizeInstancesOptions &options, bool &r_create_id) |
static void | gather_meshes_to_realize (const GeometrySet &geometry_set, VectorSet< const Mesh * > &r_meshes) |
static AllMeshesInfo | preprocess_meshes (const GeometrySet &geometry_set, const RealizeInstancesOptions &options) |
static void | execute_realize_mesh_task (const RealizeInstancesOptions &options, const RealizeMeshTask &task, const OrderedAttributes &ordered_attributes, Mesh &dst_mesh, MutableSpan< GSpanAttributeWriter > dst_attribute_writers, MutableSpan< int > all_dst_vertex_ids) |
static void | execute_realize_mesh_tasks (const RealizeInstancesOptions &options, const AllMeshesInfo &all_meshes_info, const Span< RealizeMeshTask > tasks, const OrderedAttributes &ordered_attributes, const VectorSet< Material * > &ordered_materials, GeometrySet &r_realized_geometry) |
Curves | |
static OrderedAttributes | gather_generic_curve_attributes_to_propagate (const GeometrySet &in_geometry_set, const RealizeInstancesOptions &options, bool &r_create_id) |
static void | gather_curves_to_realize (const GeometrySet &geometry_set, VectorSet< const Curves * > &r_curves) |
static AllCurvesInfo | preprocess_curves (const GeometrySet &geometry_set, const RealizeInstancesOptions &options) |
static void | execute_realize_curve_task (const RealizeInstancesOptions &options, const AllCurvesInfo &all_curves_info, const RealizeCurveTask &task, const OrderedAttributes &ordered_attributes, bke::CurvesGeometry &dst_curves, MutableSpan< GSpanAttributeWriter > dst_attribute_writers, MutableSpan< int > all_dst_ids, MutableSpan< float3 > all_handle_left, MutableSpan< float3 > all_handle_right, MutableSpan< float > all_radii, MutableSpan< int > all_resolutions) |
static void | execute_realize_curve_tasks (const RealizeInstancesOptions &options, const AllCurvesInfo &all_curves_info, const Span< RealizeCurveTask > tasks, const OrderedAttributes &ordered_attributes, GeometrySet &r_realized_geometry) |
Variables | |
static constexpr int | max_neighbors = 5 |
The code below uses a suffix 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.
using blender::geometry::NeighborCurves = typedef Vector<NeighborCurve, max_neighbors> |
Definition at line 29 of file add_curves_on_mesh.cc.
AddCurvesOnMeshOutputs blender::geometry::add_curves_on_mesh | ( | bke::CurvesGeometry & | curves, |
const AddCurvesOnMeshInputs & | inputs | ||
) |
Generate new curves on a mesh surface with the given inputs. Existing curves stay intact.
Definition at line 232 of file add_curves_on_mesh.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BLI_assert, blender::MutableSpan< T >::copy_from(), curves, blender::MutableSpan< T >::fill(), find_curve_neighbors(), inputs, blender::math::length(), outputs, result, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::MutableSpan< T >::take_back(), and MLoopTri::tri.
Referenced by blender::ed::sculpt_paint::AddOperationExecutor::execute().
|
static |
Definition at line 67 of file set_curve_type.cc.
References blender::attribute_math::convert_to_static_type(), and src.
|
static |
The Bezier control point and its handles become three control points on the NURBS curve, so each attribute value is duplicated three times.
Definition at line 58 of file set_curve_type.cc.
References src.
|
static |
Definition at line 75 of file set_curve_type.cc.
References blender::Span< T >::index_range().
Referenced by catmull_rom_to_nurbs_positions().
|
static |
Definition at line 123 of file fillet_curves.cc.
References angle_v3v3(), blender::IndexRange::drop_front(), blender::Span< T >::first(), blender::MutableSpan< T >::first(), blender::Span< T >::index_range(), blender::Span< T >::last(), and M_PI.
|
static |
Set handles for the "Bezier" mode where we rely on setting the inner handles to approximate a circular arc. The outer (previous and next) handles outside the result fillet segment are set to vector handles.
Definition at line 284 of file fillet_curves.cc.
References blender::Span< T >::index_range(), blender::IndexRange::last(), and blender::threading::parallel_for().
|
static |
In the poly fillet mode, all the inner handles are set to vector handles, along with the "outer" (previous and next) handles at each fillet.
Definition at line 349 of file fillet_curves.cc.
References blender::Span< T >::index_range(), blender::IndexRange::last(), and blender::threading::parallel_for().
|
static |
Definition at line 115 of file fillet_curves.cc.
References blender::MutableSpan< T >::last(), blender::math::normalize(), and positions.
|
static |
Definition at line 230 of file fillet_curves.cc.
References blender::Span< T >::index_range(), blender::IndexRange::last(), and blender::threading::parallel_for().
|
static |
Definition at line 134 of file mesh_primitive_cuboid.cc.
References define_quad(), blender::geometry::CuboidConfig::edges_x, blender::geometry::CuboidConfig::edges_y, blender::geometry::CuboidConfig::edges_z, blender::geometry::CuboidConfig::verts_x, blender::geometry::CuboidConfig::verts_y, blender::geometry::CuboidConfig::verts_z, x, y, and z.
Referenced by create_cuboid_mesh().
|
static |
Definition at line 69 of file fillet_curves.cc.
References blender::bke::curves::fill_curve_counts(), blender::IndexMask::index_range(), and blender::threading::parallel_for().
Referenced by fillet_curves().
|
static |
Definition at line 24 of file subdivide_curves.cc.
References blender::bke::curves::fill_curve_counts(), blender::IndexMask::index_range(), and blender::threading::parallel_for().
Referenced by subdivide_curves().
|
static |
Definition at line 322 of file mesh_primitive_cuboid.cc.
References ATTR_DOMAIN_CORNER, blender::geometry::CuboidConfig::edges_x, blender::geometry::CuboidConfig::edges_y, blender::geometry::CuboidConfig::edges_z, blender::bke::SpanAttributeWriter< T >::finish(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), mesh, blender::bke::mesh_attributes_for_write(), blender::bke::SpanAttributeWriter< T >::span, x, y, and z.
Referenced by create_cuboid_mesh().
|
static |
Definition at line 57 of file mesh_primitive_cuboid.cc.
References copy_v3_v3(), blender::geometry::CuboidConfig::edges_x, blender::geometry::CuboidConfig::edges_y, blender::geometry::CuboidConfig::edges_z, ELEM, blender::geometry::CuboidConfig::size, verts, blender::geometry::CuboidConfig::verts_x, blender::geometry::CuboidConfig::verts_y, blender::geometry::CuboidConfig::verts_z, x, y, and z.
Referenced by create_cuboid_mesh().
|
static |
Definition at line 87 of file set_curve_type.cc.
References blender::IndexRange::drop_back(), blender::IndexRange::drop_front(), blender::Span< T >::first(), blender::MutableSpan< T >::first(), blender::Span< T >::index_range(), blender::Span< T >::last(), blender::MutableSpan< T >::last(), and blender::Span< T >::size().
Referenced by catmull_rom_to_nurbs_positions().
|
static |
Definition at line 122 of file set_curve_type.cc.
References bezier_positions_to_nurbs(), catmull_rom_to_bezier_handles(), and blender::Span< T >::size().
float3 blender::geometry::compute_surface_point_normal | ( | const MLoopTri & | looptri, |
const float3 & | bary_coord, | ||
const Span< float3 > | corner_normals | ||
) |
Definition at line 31 of file add_curves_on_mesh.cc.
References blender::attribute_math::mix3(), normal, blender::math::normalize(), and MLoopTri::tri.
Referenced by blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide(), and interpolate_position_with_interpolation().
As an optimization, just change the types on a mutable curves data-block when the conversion is simple. This could be expanded to more cases where the number of points doesn't change in the future, though that might require properly initializing some attributes, or removing others.
Definition at line 33 of file set_curve_type.cc.
References CURVE_TYPE_CATMULL_ROM, CURVE_TYPE_POLY, and ELEM.
Referenced by try_curves_conversion_in_place().
bke::CurvesGeometry blender::geometry::convert_curves | ( | const bke::CurvesGeometry & | src_curves, |
IndexMask | selection, | ||
CurveType | dst_type | ||
) |
Change the types of the selected curves, potentially changing the total point count.
Definition at line 659 of file set_curve_type.cc.
References BLI_assert_unreachable, convert_curves_to_bezier(), convert_curves_to_nurbs(), convert_curves_trivial(), CURVE_TYPE_BEZIER, CURVE_TYPE_CATMULL_ROM, CURVE_TYPE_NURBS, and CURVE_TYPE_POLY.
Referenced by blender::nodes::node_geo_curve_spline_type_cc::node_geo_exec().
|
static |
Definition at line 325 of file set_curve_type.cc.
References blender::bke::curves::copy_only_curve_domain(), CURVE_TYPE_BEZIER, blender::bke::CurvesGeometry::curve_types(), blender::bke::CurvesGeometry::cyclic(), blender::bke::CurvesGeometry::fill_curve_types(), blender::IndexMask::index_range(), blender::bke::CurvesGeometry::nurbs_knots_modes(), blender::bke::CurvesGeometry::offsets_for_write(), blender::threading::parallel_for(), blender::bke::CurvesGeometry::positions(), and retrieve_curve_sizes().
Referenced by convert_curves().
|
static |
Definition at line 484 of file set_curve_type.cc.
References blender::bke::curves::copy_only_curve_domain(), CURVE_TYPE_NURBS, blender::bke::CurvesGeometry::curve_types(), blender::bke::CurvesGeometry::cyclic(), blender::bke::CurvesGeometry::fill_curve_types(), blender::IndexMask::index_range(), blender::bke::CurvesGeometry::offsets_for_write(), blender::threading::parallel_for(), blender::bke::CurvesGeometry::positions(), and retrieve_curve_sizes().
Referenced by convert_curves().
|
static |
Definition at line 649 of file set_curve_type.cc.
References blender::bke::CurvesGeometry::fill_curve_types(), and blender::bke::CurvesGeometry::remove_attributes_based_on_types().
Referenced by convert_curves().
|
static |
Definition at line 289 of file realize_instances.cc.
References blender::MutableSpan< T >::index_range(), and blender::threading::parallel_for().
Referenced by execute_realize_pointcloud_task().
|
static |
Definition at line 261 of file realize_instances.cc.
References blender::threading::parallel_for(), and src.
Referenced by execute_realize_curve_task(), and execute_realize_pointcloud_task().
|
static |
Definition at line 21 of file mesh_to_curve_convert.cc.
References blender::devirtualize_varray(), map, blender::threading::parallel_for(), and src.
Mesh * blender::geometry::create_cuboid_mesh | ( | const float3 & | size, |
int | verts_x, | ||
int | verts_y, | ||
int | verts_z | ||
) |
Definition at line 421 of file mesh_primitive_cuboid.cc.
References create_cuboid_mesh(), and size().
Mesh * blender::geometry::create_cuboid_mesh | ( | const float3 & | size, |
int | verts_x, | ||
int | verts_y, | ||
int | verts_z, | ||
const bke::AttributeIDRef & | uv_id | ||
) |
Definition at line 398 of file mesh_primitive_cuboid.cc.
References BKE_mesh_calc_edges(), BKE_mesh_new_nomain(), calculate_polys(), calculate_uvs(), calculate_vertices(), blender::geometry::CuboidConfig::loop_count, mesh, Mesh::mloop, Mesh::mpoly, Mesh::mvert, blender::geometry::CuboidConfig::poly_count, size(), Mesh::totloop, Mesh::totpoly, Mesh::totvert, and blender::geometry::CuboidConfig::vertex_count.
Referenced by blender::nodes::node_geo_mesh_primitive_cube_cc::create_cuboid_mesh(), create_cuboid_mesh(), generate_bounding_box_mesh(), and blender::nodes::node_geo_bounding_box_cc::node_geo_exec().
bke::CurvesGeometry blender::geometry::create_curve_from_vert_indices | ( | const Mesh & | mesh, |
Span< int > | vert_indices, | ||
Span< int > | curve_offsets, | ||
IndexRange | cyclic_curves | ||
) |
Definition at line 33 of file mesh_to_curve_convert.cc.
References blender::bke::AttributeAccessor::all_ids(), ATTR_DOMAIN_POINT, blender::attribute_math::convert_to_static_type(), CURVE_TYPE_POLY, curves, blender::bke::AttributeAccessor::is_builtin(), blender::bke::AttributeAccessor::lookup(), mesh, blender::bke::mesh_attributes(), blender::Span< T >::size(), and blender::GVArrayCommon::type().
Referenced by blender::nodes::node_geo_edge_paths_to_curves_cc::edge_paths_to_curves_convert(), and mesh_to_curve_convert().
|
static |
Definition at line 1359 of file mesh_merge_by_distance.cc.
References BKE_mesh_new_nomain_from_template(), BLI_assert, count, CustomData_copy_data(), customdata_weld(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), e, blender::geometry::WeldLoopOfPolyIter::e, MLoop::e, Mesh::edata, blender::geometry::WeldMesh::edge_groups, blender::geometry::WeldMesh::edge_groups_buffer, blender::geometry::WeldMesh::edge_groups_map, blender::geometry::WeldMesh::edge_kill_len, ELEM_MERGED, MEdge::flag, blender::geometry::WeldGroupEdge::group, blender::geometry::WeldLoopOfPolyIter::group_len, Mesh::ldata, blender::geometry::WeldGroup::len, blender::geometry::WeldMesh::loop_kill_len, blender::geometry::WeldMesh::loop_map, MPoly::loopstart, blender::geometry::WeldMesh::max_poly_len, ME_LOOSEEDGE, mesh, Mesh::mloop, Mesh::mpoly, blender::geometry::WeldGroup::ofs, OUT_OF_CONTEXT, Mesh::pdata, blender::geometry::WeldPoly::poly_dst, blender::geometry::WeldMesh::poly_kill_len, blender::geometry::WeldMesh::poly_map, result, Mesh::totedge, Mesh::totloop, MPoly::totloop, Mesh::totpoly, Mesh::totvert, blender::geometry::WeldLoopOfPolyIter::type, v, blender::geometry::WeldLoopOfPolyIter::v, MLoop::v, blender::geometry::WeldGroupEdge::v1, MEdge::v1, blender::geometry::WeldGroupEdge::v2, MEdge::v2, Mesh::vdata, blender::geometry::WeldMesh::vert_groups, blender::geometry::WeldMesh::vert_groups_buffer, blender::geometry::WeldMesh::vert_kill_len, weld_iter_loop_of_poly_begin(), weld_iter_loop_of_poly_next(), weld_mesh_context_create(), blender::geometry::WeldMesh::wloop, blender::geometry::WeldMesh::wpoly, and blender::geometry::WeldMesh::wpoly_new_len.
Referenced by mesh_merge_by_distance_all(), and mesh_merge_by_distance_connected().
|
static |
Definition at line 167 of file set_curve_type.cc.
References blender::math::abs(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), float(), is_nurbs_to_bezier_one_to_one(), min, NURBS_KNOT_MODE_NORMAL, blender::Vector< T, InlineBufferCapacity, Allocator >::pop_last(), blender::bke::curves::segments_num(), and blender::Span< T >::size().
|
static |
Definition at line 235 of file set_curve_type.cc.
References blender::MutableSpan< T >::index_range(), blender::math::interpolate(), is_nurbs_to_bezier_one_to_one(), and scale_input_assign().
|
static |
Definition at line 317 of file realize_instances.cc.
References blender::MutableSpan< T >::copy_from(), blender::MutableSpan< T >::fill(), blender::MutableSpan< T >::index_range(), blender::Span< T >::is_empty(), options, and blender::threading::parallel_for().
Referenced by execute_realize_pointcloud_task().
|
static |
Return a range used to retrieve values from an array of values stored per point, but with an extra element at the end of each curve. This is useful for offsets within curves, where it is convenient to store the first 0 and have the last offset be the total result curve size.
Definition at line 22 of file fillet_curves.cc.
References blender::IndexRange::size(), and blender::IndexRange::start().
|
static |
Return a range used to retrieve values from an array of values stored per point, but with an extra element at the end of each curve. This is useful for offsets within curves, where it is convenient to store the first 0 and have the last offset be the total result curve size.
Definition at line 19 of file subdivide_curves.cc.
References blender::IndexRange::size(), and blender::IndexRange::start().
|
static |
Definition at line 1218 of file mesh_merge_by_distance.cc.
References add_v3_v3(), MVert::bweight, MEdge::bweight, CD_MEDGE, CD_MVERT, CLAMP_MAX, MVert::co, copy_v3_v3(), count, MEdge::crease, CustomData_copy_data(), CustomData_copy_layer_type_data(), CustomData_data_add(), CustomData_data_multiply(), CustomData_interp(), CustomData_layer_has_interp(), CustomData_layer_has_math(), CustomData_sizeof(), CustomDataLayer::data, dest, MVert::flag, MEdge::flag, CustomData::layers, mul_v3_fl(), POINTER_OFFSET, size(), CustomData::totlayer, type, and CustomDataLayer::type.
Referenced by create_merged_mesh().
|
static |
Definition at line 111 of file mesh_primitive_cuboid.cc.
References MPoly::loopstart, MPoly::totloop, and MLoop::v.
Referenced by calculate_polys().
|
static |
Definition at line 38 of file fillet_curves.cc.
References blender::IndexMask::index_range(), and blender::threading::parallel_for().
|
static |
Definition at line 55 of file fillet_curves.cc.
References blender::attribute_math::convert_to_static_type(), and blender::GMutableSpan::type().
|
static |
Definition at line 90 of file mesh_to_curve_convert.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::IndexRange::drop_front(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), offset, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), v1, v2, and verts.
Referenced by mesh_to_curve_convert().
|
static |
Definition at line 1152 of file realize_instances.cc.
References blender::MutableSpan< T >::copy_from(), copy_transformed_positions(), blender::geometry::AllCurvesInfo::create_handle_postion_attributes, blender::geometry::AllCurvesInfo::create_radius_attribute, blender::geometry::AllCurvesInfo::create_resolution_attribute, blender::geometry::RealizeCurveInfo::curves, curves, blender::MutableSpan< T >::fill(), Curves::geometry, blender::geometry::RealizeCurveInfo::handle_left, blender::geometry::RealizeCurveInfo::handle_right, blender::Span< T >::is_empty(), blender::VArrayCommon< T >::materialize(), blender::bke::CurvesGeometry::offsets_for_write(), blender::threading::parallel_for(), blender::bke::CurvesGeometry::positions_for_write(), blender::geometry::RealizeCurveInfo::radius, blender::geometry::RealizeCurveInfo::resolution, blender::MutableSpan< T >::slice(), blender::compositor::task, and blender::bke::image::partial_update::wrap().
|
static |
Definition at line 1238 of file realize_instances.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), ATTR_DOMAIN_CURVE, ATTR_DOMAIN_POINT, blender::bke::CurvesGeometry::attributes_for_write(), blender::geometry::AllCurvesInfo::create_handle_postion_attributes, blender::geometry::AllCurvesInfo::create_id_attribute, blender::geometry::AllCurvesInfo::create_radius_attribute, blender::geometry::AllCurvesInfo::create_resolution_attribute, blender::geometry::CurvesElementStartIndices::curve, blender::geometry::RealizeCurveTask::curve_info, CurvesGeometry::curve_num, blender::geometry::RealizeCurveInfo::curves, blender::bke::curves_copy_parameters(), blender::bke::curves_new_nomain(), blender::Span< T >::first(), Curves::geometry, GeometrySet::get_component_for_write(), blender::geometry::OrderedAttributes::ids, blender::Span< T >::index_range(), blender::geometry::OrderedAttributes::index_range(), blender::Span< T >::is_empty(), blender::geometry::OrderedAttributes::kinds, blender::Span< T >::last(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::CurvesGeometry::offsets_for_write(), blender::threading::parallel_for(), blender::geometry::CurvesElementStartIndices::point, CurvesGeometry::point_num, CurveComponent::replace(), blender::geometry::RealizeCurveTask::start_indices, and blender::bke::image::partial_update::wrap().
Referenced by realize_instances().
|
static |
Definition at line 881 of file realize_instances.cc.
References blender::geometry::MeshRealizeInfo::material_index_map, Mesh::medge, mesh, blender::geometry::MeshRealizeInfo::mesh, Mesh::mloop, Mesh::mpoly, Mesh::mvert, blender::threading::parallel_for(), blender::compositor::task, Mesh::totedge, Mesh::totloop, Mesh::totpoly, and Mesh::totvert.
|
static |
Definition at line 974 of file realize_instances.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), ATTR_DOMAIN_POINT, BKE_id_material_eval_assign(), BKE_mesh_copy_parameters_for_eval(), BKE_mesh_new_nomain(), BLI_freelistN(), blender::geometry::AllMeshesInfo::create_id_attribute, blender::geometry::MeshElementStartIndices::edge, blender::Span< T >::first(), GeometrySet::get_component_for_write(), Mesh::id, blender::geometry::OrderedAttributes::ids, blender::Span< T >::index_range(), blender::geometry::OrderedAttributes::index_range(), blender::Span< T >::is_empty(), blender::geometry::OrderedAttributes::kinds, blender::Span< T >::last(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::geometry::MeshElementStartIndices::loop, material, blender::geometry::MeshRealizeInfo::mesh, blender::bke::mesh_attributes_for_write(), blender::geometry::RealizeMeshTask::mesh_info, blender::threading::parallel_for(), blender::geometry::MeshElementStartIndices::poly, MeshComponent::replace(), blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), blender::geometry::RealizeMeshTask::start_indices, Mesh::totedge, Mesh::totloop, Mesh::totpoly, Mesh::totvert, blender::geometry::MeshElementStartIndices::vertex, and Mesh::vertex_group_names.
Referenced by realize_instances().
|
static |
Definition at line 687 of file realize_instances.cc.
References blender::geometry::PointCloudRealizeInfo::attributes, copy_generic_attributes_to_result(), copy_transformed_positions(), create_result_ids(), blender::MutableSpan< T >::is_empty(), options, blender::geometry::PointCloudRealizeInfo::pointcloud, blender::geometry::PointCloudRealizeInfo::positions, blender::MutableSpan< T >::slice(), blender::geometry::PointCloudRealizeInfo::stored_ids, blender::compositor::task, and PointCloud::totpoint.
|
static |
Definition at line 720 of file realize_instances.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), ATTR_DOMAIN_POINT, BKE_pointcloud_new_nomain(), blender::geometry::AllPointCloudsInfo::create_id_attribute, GeometrySet::get_component_for_write(), blender::geometry::OrderedAttributes::ids, blender::Span< T >::index_range(), blender::geometry::OrderedAttributes::index_range(), blender::Span< T >::is_empty(), blender::geometry::OrderedAttributes::kinds, blender::Span< T >::last(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::threading::parallel_for(), blender::geometry::PointCloudRealizeInfo::pointcloud, blender::bke::pointcloud_attributes_for_write(), blender::geometry::RealizePointCloudTask::pointcloud_info, positions, PointCloudComponent::replace(), blender::geometry::RealizePointCloudTask::start_index, and PointCloud::totpoint.
Referenced by realize_instances().
|
static |
Definition at line 398 of file fillet_curves.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), calculate_result_offsets(), blender::bke::curves::copy_only_curve_domain(), CURVE_TYPE_BEZIER, blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), blender::IndexMask::extract_ranges_invert(), blender::bke::CurvesGeometry::handle_positions_left(), blender::bke::CurvesGeometry::handle_positions_left_for_write(), blender::bke::CurvesGeometry::handle_positions_right(), blender::bke::CurvesGeometry::handle_positions_right_for_write(), blender::bke::CurvesGeometry::handle_types_left(), blender::bke::CurvesGeometry::handle_types_left_for_write(), blender::bke::CurvesGeometry::handle_types_right(), blender::bke::CurvesGeometry::handle_types_right_for_write(), blender::bke::CurvesGeometry::has_curve_with_type(), blender::IndexMask::index_range(), blender::Span< T >::last(), blender::bke::CurvesGeometry::offsets(), blender::bke::CurvesGeometry::offsets_for_write(), blender::threading::parallel_for(), blender::bke::CurvesGeometry::points_num(), blender::bke::CurvesGeometry::positions(), positions, blender::bke::CurvesGeometry::positions_for_write(), and blender::bke::CurvesGeometry::resize().
Referenced by fillet_curves_bezier(), and fillet_curves_poly().
bke::CurvesGeometry blender::geometry::fillet_curves_bezier | ( | const bke::CurvesGeometry & | src_curves, |
IndexMask | curve_selection, | ||
const VArray< float > & | radius, | ||
bool | limit_radius | ||
) |
Definition at line 548 of file fillet_curves.cc.
References fillet_curves(), limit_radius(), and blender::bke::CurvesGeometry::points_num().
Referenced by blender::nodes::node_geo_curve_fillet_cc::node_geo_exec().
bke::CurvesGeometry blender::geometry::fillet_curves_poly | ( | const bke::CurvesGeometry & | src_curves, |
IndexMask | curve_selection, | ||
const VArray< float > & | radius, | ||
const VArray< int > & | counts, | ||
bool | limit_radius | ||
) |
Definition at line 539 of file fillet_curves.cc.
References count, fillet_curves(), and limit_radius().
Referenced by blender::nodes::node_geo_curve_fillet_cc::node_geo_exec().
|
static |
Definition at line 58 of file add_curves_on_mesh.cc.
References max, max_neighbors, blender::threading::parallel_for(), and blender::Span< T >::size().
Referenced by add_curves_on_mesh().
|
static |
Calls #fn for every geometry in the given InstanceReference. Also passes on the transformation that is applied to every instance.
Definition at line 405 of file realize_instances.cc.
References InstanceReference::Collection, InstanceReference::collection(), FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN, FOREACH_COLLECTION_OBJECT_RECURSIVE_END, InstanceReference::geometry_set(), InstanceReference::GeometrySet, hash, Collection::instance_offset, InstanceReference::None, InstanceReference::Object, InstanceReference::object(), blender::bke::object_get_evaluated_geometry_set(), sub_v3_v3(), InstanceReference::type(), and blender::float4x4::values.
Referenced by gather_realize_tasks_for_instances().
|
static |
Definition at line 1077 of file realize_instances.cc.
References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), curves, GeometrySet::get_component_for_read(), and GeometrySet::get_curves_for_read().
Referenced by preprocess_curves().
|
static |
Definition at line 1051 of file realize_instances.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), GeometrySet::gather_attributes_for_propagation(), GEO_COMPONENT_TYPE_CURVE, GEO_COMPONENT_TYPE_INSTANCES, blender::geometry::OrderedAttributes::ids, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), blender::geometry::OrderedAttributes::kinds, options, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop_try(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove().
Referenced by preprocess_curves().
|
static |
Definition at line 789 of file realize_instances.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), GeometrySet::gather_attributes_for_propagation(), GEO_COMPONENT_TYPE_INSTANCES, GEO_COMPONENT_TYPE_MESH, blender::geometry::OrderedAttributes::ids, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), blender::geometry::OrderedAttributes::kinds, options, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop_try(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove().
Referenced by preprocess_meshes().
|
static |
Definition at line 610 of file realize_instances.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), GeometrySet::gather_attributes_for_propagation(), GEO_COMPONENT_TYPE_INSTANCES, GEO_COMPONENT_TYPE_POINT_CLOUD, blender::geometry::OrderedAttributes::ids, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), blender::geometry::OrderedAttributes::kinds, options, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop_try(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove().
Referenced by preprocess_pointclouds().
|
static |
Definition at line 815 of file realize_instances.cc.
References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), GeometrySet::get_component_for_read(), GeometrySet::get_mesh_for_read(), mesh, and Mesh::totvert.
Referenced by preprocess_meshes().
|
static |
Gather a set of all generic attribute IDs to copy to the result curves.
Definition at line 124 of file resample_curves.cc.
References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), ATTR_DOMAIN_POINT, CurveComponent::attributes(), blender::bke::CurvesGeometry::curve_type_counts(), blender::bke::AttributeMetaData::domain, Curves::geometry, CurveComponent::get_for_write(), if(), interpolate_attribute_to_curves(), interpolate_attribute_to_poly_curve(), blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_contained(), result, retrieve_attribute_spans(), and blender::bke::CurvesGeometry::wrap().
Referenced by resample_to_uniform().
|
static |
Definition at line 632 of file realize_instances.cc.
References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), GeometrySet::get_component_for_read(), and GeometrySet::get_pointcloud_for_read().
Referenced by preprocess_pointclouds().
|
static |
Definition at line 444 of file realize_instances.cc.
References blender::geometry::AttributeFallbacksArray::array, blender::geometry::AllPointCloudsInfo::attributes, blender::geometry::AllMeshesInfo::attributes, blender::geometry::AllCurvesInfo::attributes, blender::geometry::GatherTasksInfo::create_id_attribute_on_any_component, blender::geometry::GatherTasksInfo::curves, blender::geometry::InstanceContext::curves, foreach_geometry_in_reference(), gather_realize_tasks_recursive(), blender::bke::CustomDataAttributes::get_for_read(), handles, hash, id, blender::geometry::InstanceContext::id, blender::Span< T >::index_range(), InstancesComponent::instance_attributes(), InstancesComponent::instance_reference_handles(), InstancesComponent::instance_transforms(), blender::Span< T >::is_empty(), blender::geometry::GatherTasksInfo::meshes, blender::geometry::InstanceContext::meshes, blender::geometry::GatherTasksInfo::pointclouds, blender::geometry::InstanceContext::pointclouds, prepare_attribute_fallbacks(), InstancesComponent::references(), and transform().
Referenced by gather_realize_tasks_recursive().
|
static |
Gather tasks for all geometries in the #geometry_set.
Definition at line 517 of file realize_instances.cc.
References component(), blender::geometry::CurvesElementStartIndices::curve, blender::geometry::GatherTasks::curve_tasks, blender::geometry::GatherTasksInfo::curves, blender::geometry::InstanceContext::curves, curves, blender::geometry::GatherOffsets::curves_offsets, blender::geometry::MeshElementStartIndices::edge, blender::geometry::GatherTasks::first_edit_data, blender::geometry::GatherTasks::first_volume, gather_realize_tasks_for_instances(), GEO_COMPONENT_TYPE_CURVE, GEO_COMPONENT_TYPE_EDIT, GEO_COMPONENT_TYPE_INSTANCES, GEO_COMPONENT_TYPE_MESH, GEO_COMPONENT_TYPE_POINT_CLOUD, GEO_COMPONENT_TYPE_VOLUME, GeometrySet::get_components_for_read(), MeshComponent::get_for_read(), PointCloudComponent::get_for_read(), CurveComponent::get_for_read(), blender::geometry::InstanceContext::id, blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of(), blender::geometry::MeshElementStartIndices::loop, mesh, blender::geometry::GatherOffsets::mesh_offsets, blender::geometry::GatherTasks::mesh_tasks, blender::geometry::GatherTasksInfo::meshes, blender::geometry::InstanceContext::meshes, blender::geometry::AllPointCloudsInfo::order, blender::geometry::AllMeshesInfo::order, blender::geometry::AllCurvesInfo::order, blender::geometry::CurvesElementStartIndices::point, blender::geometry::GatherOffsets::pointcloud_offset, blender::geometry::GatherTasks::pointcloud_tasks, blender::geometry::GatherTasksInfo::pointclouds, blender::geometry::InstanceContext::pointclouds, blender::geometry::MeshElementStartIndices::poly, blender::geometry::GatherTasksInfo::r_offsets, blender::geometry::GatherTasksInfo::r_tasks, blender::geometry::AllPointCloudsInfo::realize_info, blender::geometry::AllMeshesInfo::realize_info, blender::geometry::AllCurvesInfo::realize_info, Mesh::totedge, Mesh::totloop, PointCloud::totpoint, Mesh::totpoly, Mesh::totvert, type, GeometryComponent::user_add(), and blender::geometry::MeshElementStartIndices::vertex.
Referenced by gather_realize_tasks_for_instances(), and realize_instances().
|
static |
Definition at line 30 of file resample_curves.cc.
Referenced by resample_to_length().
|
static |
Definition at line 18 of file resample_curves.cc.
References max.
Referenced by resample_to_count().
|
static |
Get a separate array of the indices for edges in a selection (a boolean attribute). This helps to make the above algorithm simpler by removing the need to check for selection in many places.
Definition at line 213 of file mesh_to_curve_convert.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), Mesh::medge, mesh, MEdge::v1, and MEdge::v2.
Referenced by mesh_to_curve_convert().
|
static |
Definition at line 48 of file add_curves_on_mesh.cc.
References float(), blender::MutableSpan< T >::index_range(), blender::math::interpolate(), and blender::MutableSpan< T >::size().
Referenced by interpolate_position_with_interpolation(), and interpolate_position_without_interpolation().
|
static |
Return true if the attribute should be copied/interpolated to the result curves. Don't output attributes that correspond to curve types that have no curves in the result.
Definition at line 53 of file resample_curves.cc.
References CURVE_TYPE_BEZIER, CURVE_TYPE_NURBS, ELEM, blender::bke::AttributeIDRef::is_named(), and blender::bke::AttributeIDRef::name().
Referenced by gather_point_attributes_to_interpolate().
|
static |
Return true if the attribute should be copied to poly curves.
Definition at line 75 of file resample_curves.cc.
References blender::bke::AttributeIDRef::is_named(), and blender::bke::AttributeIDRef::name().
Referenced by gather_point_attributes_to_interpolate().
void blender::geometry::interpolate_from_neighbors | ( | const Span< NeighborCurves > | neighbors_per_curve, |
const T & | fallback, | ||
const GetValueF & | get_value_from_neighbor, | ||
MutableSpan< T > | r_interpolated_values | ||
) |
Definition at line 86 of file add_curves_on_mesh.cc.
References blender::MutableSpan< T >::index_range(), and blender::threading::parallel_for().
|
static |
Definition at line 134 of file add_curves_on_mesh.cc.
References compute_surface_point_normal(), curves, blender::MutableSpan< T >::fill(), blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), indices, initialize_straight_curve_positions(), blender::length_parameterize::interpolate(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::Array< T, InlineBufferCapacity, Allocator >::last(), min, mul_m3_v3(), blender::math::normalize(), blender::threading::parallel_for(), result, rotation_between_vecs_to_mat3(), blender::geometry::ReverseUVSampler::sample(), blender::length_parameterize::sample_at_lengths(), blender::bke::curves::segments_num(), blender::IndexRange::size(), blender::Span< T >::size(), blender::MutableSpan< T >::slice(), and blender::bke::CurvesSurfaceTransforms::surface_to_curves_normal.
|
static |
Definition at line 109 of file add_curves_on_mesh.cc.
References curves, initialize_straight_curve_positions(), blender::math::length(), blender::math::normalize(), blender::threading::parallel_for(), blender::Span< T >::size(), and blender::MutableSpan< T >::slice().
This function answers the question about possible conversion method for NURBS-to-Bezier. In general for 3rd degree NURBS curves there is one-to-one relation with 3rd degree Bezier curves that can be exploit for conversion - Bezier handles sit on NURBS hull segments and in the middle between those handles are Bezier anchor points.
Definition at line 20 of file set_curve_type.cc.
References ELEM, NURBS_KNOT_MODE_ENDPOINT, and NURBS_KNOT_MODE_NORMAL.
Referenced by create_nurbs_to_bezier_handles(), create_nurbs_to_bezier_positions(), and to_bezier_size().
|
static |
Definition at line 161 of file fillet_curves.cc.
References blender::Span< T >::first(), blender::MutableSpan< T >::first(), blender::Span< T >::last(), blender::MutableSpan< T >::last(), limit_radius(), positions, and radii.
|
static |
Find the portion of the previous and next segments used by the current and next point fillets. If more than the total length of the segment would be used, scale the current point's radius just enough to make the two points meet in the middle.
Definition at line 136 of file fillet_curves.cc.
References angle(), blender::math::clamp(), blender::math::distance(), min, and KDL::tan().
Referenced by fillet_curves_bezier(), fillet_curves_poly(), limit_radii(), blender::nodes::node_geo_curve_fillet_cc::node_geo_exec(), SCULPT_geodesic_distances_create(), SCULPT_geodesic_from_vertex(), SCULPT_geodesic_from_vertex_and_symm(), and SCULPT_geodesic_mesh_create().
|
inlinestatic |
Definition at line 65 of file subdivide_curves.cc.
References Freestyle::a, usdtokens::b(), blender::IndexRange::drop_front(), blender::MutableSpan< T >::first(), blender::MutableSpan< T >::index_range(), blender::attribute_math::mix2(), and blender::MutableSpan< T >::size().
Referenced by subdivide_bezier_segment().
std::optional< Mesh * > blender::geometry::mesh_merge_by_distance_all | ( | const Mesh & | mesh, |
IndexMask | selection, | ||
float | merge_distance | ||
) |
Merge selected vertices into other selected vertices within the merge_distance. The merged indices favor speed over accuracy, since the results will depend on the order of the vertices.
Definition at line 1564 of file mesh_merge_by_distance.cc.
References MVert::co, create_merged_mesh(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), mesh, Mesh::mvert, OUT_OF_CONTEXT, blender::IndexMask::size(), Mesh::totvert, and tree.
Referenced by calculate_weld(), and blender::nodes::node_geo_merge_by_distance_cc::mesh_merge_by_distance_all().
std::optional< Mesh * > blender::geometry::mesh_merge_by_distance_connected | ( | const Mesh & | mesh, |
Span< bool > | selection, | ||
float | merge_distance, | ||
bool | only_loose_edges | ||
) |
Merge selected vertices along edges to other selected vertices. Only vertices connected by edges are considered for merging.
Definition at line 1593 of file mesh_merge_by_distance.cc.
References blender::geometry::WeldVertexCluster::co, copy_v3_v3(), create_merged_mesh(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), blender::Span< T >::is_empty(), len_squared_v3(), madd_v3_v3fl(), ME_LOOSEEDGE, Mesh::medge, blender::geometry::WeldVertexCluster::merged_verts, mesh, Mesh::mvert, OUT_OF_CONTEXT, range_vn_i(), square_f(), sub_v3_v3v3(), SWAP, Mesh::totedge, Mesh::totvert, v, v1, v2, and verts.
Referenced by calculate_weld(), and blender::nodes::node_geo_merge_by_distance_cc::mesh_merge_by_distance_connected().
bke::CurvesGeometry blender::geometry::mesh_to_curve_convert | ( | const Mesh & | mesh, |
const IndexMask | selection | ||
) |
Convert the mesh into one or many poly curves. Since curves cannot have branches, intersections of more than three edges will become breaks in curves. Attributes that are not built-in on meshes and not curves are transferred to the result curve.
Definition at line 222 of file mesh_to_curve_convert.cc.
References create_curve_from_vert_indices(), edges_to_curve_point_indices(), get_selected_edges(), mesh, Mesh::mvert, output, and Mesh::totvert.
Referenced by blender::nodes::node_geo_mesh_to_curve_cc::node_geo_exec().
|
static |
Definition at line 159 of file set_curve_type.cc.
References blender::attribute_math::convert_to_static_type(), and src.
|
static |
Definition at line 135 of file set_curve_type.cc.
References blender::IndexRange::drop_back(), blender::IndexRange::drop_front(), blender::MutableSpan< T >::first(), blender::MutableSpan< T >::index_range(), blender::MutableSpan< T >::last(), NURBS_KNOT_MODE_ENDPOINT, NURBS_KNOT_MODE_NORMAL, and src.
PointCloud * blender::geometry::point_merge_by_distance | ( | const PointCloud & | src_points, |
const float | merge_distance, | ||
const IndexMask | selection | ||
) |
Merge selected points into other selected points within the merge_distance. The merged indices favor speed over accuracy, since the results will depend on the order of the points.
Definition at line 16 of file point_merge_by_distance.cc.
References blender::bke::AttributeAccessor::all_ids(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), ATTR_DOMAIN_POINT, BKE_pointcloud_new_nomain(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::attribute_math::convert_to_static_type(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), blender::Array< T, InlineBufferCapacity, Allocator >::fill(), blender::IndexRange::first(), blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), blender::IndexMask::index_range(), blender::Array< T, InlineBufferCapacity, Allocator >::last(), blender::bke::AttributeAccessor::lookup(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::AttributeAccessor::lookup_or_default(), offset, blender::threading::parallel_for(), blender::bke::pointcloud_attributes(), blender::bke::pointcloud_attributes_for_write(), positions, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_contained(), blender::IndexMask::size(), src, tree, blender::GVArrayCommon::type(), and blender::bke::GAttributeReader::varray.
Referenced by blender::nodes::node_geo_merge_by_distance_cc::pointcloud_merge_by_distance().
|
static |
Checks which of the #ordered_attributes exist on the #instances_component. For each attribute that exists on the instances, a pair is returned that contains the attribute index and the corresponding attribute data.
Definition at line 363 of file realize_instances.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bke::AttributeMetaData::data_type, blender::bke::CustomDataAttributes::foreach_attribute(), blender::bke::CustomDataAttributes::get_for_read(), blender::geometry::OrderedAttributes::ids, InstancesComponent::instance_attributes(), InstancesComponent::instances_num(), blender::geometry::OrderedAttributes::kinds, blender::geometry::GatherTasksInfo::r_temporary_arrays, and blender::gpu::shader::to_type().
Referenced by gather_realize_tasks_for_instances().
|
static |
Definition at line 1093 of file realize_instances.cc.
References ATTR_DOMAIN_POINT, attribute, blender::geometry::RealizeCurveInfo::attributes, blender::geometry::AllCurvesInfo::attributes, blender::bke::AttributeAccessor::contains(), blender::geometry::AllCurvesInfo::create_handle_postion_attributes, blender::geometry::AllCurvesInfo::create_id_attribute, blender::geometry::AllCurvesInfo::create_radius_attribute, blender::geometry::AllCurvesInfo::create_resolution_attribute, blender::geometry::RealizeCurveInfo::curves, curves, gather_curves_to_realize(), gather_generic_curve_attributes_to_propagate(), Curves::geometry, blender::GVArrayCommon::get_internal_span(), blender::geometry::RealizeCurveInfo::handle_left, blender::geometry::RealizeCurveInfo::handle_right, blender::geometry::OrderedAttributes::ids, blender::geometry::OrderedAttributes::index_range(), blender::geometry::OrderedAttributes::kinds, blender::bke::AttributeAccessor::lookup(), blender::bke::AttributeAccessor::lookup_or_default(), options, blender::geometry::AllCurvesInfo::order, blender::geometry::RealizeCurveInfo::radius, blender::geometry::AllCurvesInfo::realize_info, blender::geometry::RealizeCurveInfo::resolution, blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), blender::geometry::OrderedAttributes::size(), blender::geometry::RealizeCurveInfo::stored_ids, blender::GSpan::typed(), blender::bke::GAttributeReader::varray, and blender::bke::image::partial_update::wrap().
Referenced by realize_instances().
|
static |
Definition at line 831 of file realize_instances.cc.
References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), attribute, blender::geometry::MeshRealizeInfo::attributes, blender::geometry::AllMeshesInfo::attributes, blender::bke::AttributeAccessor::contains(), blender::geometry::AllMeshesInfo::create_id_attribute, gather_generic_mesh_attributes_to_propagate(), gather_meshes_to_realize(), blender::GVArrayCommon::get_internal_span(), blender::geometry::OrderedAttributes::ids, blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of(), blender::geometry::OrderedAttributes::index_range(), blender::geometry::OrderedAttributes::kinds, blender::bke::AttributeAccessor::lookup(), blender::bke::AttributeAccessor::lookup_or_default(), Mesh::mat, material, blender::geometry::MeshRealizeInfo::material_index_map, blender::geometry::AllMeshesInfo::materials, mesh, blender::geometry::MeshRealizeInfo::mesh, blender::bke::mesh_attributes(), options, blender::geometry::AllMeshesInfo::order, blender::geometry::AllMeshesInfo::realize_info, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), blender::geometry::OrderedAttributes::size(), blender::geometry::MeshRealizeInfo::stored_vertex_ids, Mesh::totcol, blender::GSpan::typed(), and blender::bke::GAttributeReader::varray.
Referenced by realize_instances().
|
static |
Definition at line 648 of file realize_instances.cc.
References ATTR_DOMAIN_POINT, attribute, blender::geometry::PointCloudRealizeInfo::attributes, blender::geometry::AllPointCloudsInfo::attributes, blender::bke::AttributeAccessor::contains(), blender::geometry::AllPointCloudsInfo::create_id_attribute, gather_generic_pointcloud_attributes_to_propagate(), gather_pointclouds_to_realize(), blender::GVArrayCommon::get_internal_span(), blender::VArrayCommon< T >::get_internal_span(), blender::geometry::OrderedAttributes::ids, blender::geometry::OrderedAttributes::index_range(), blender::geometry::OrderedAttributes::kinds, blender::bke::AttributeAccessor::lookup(), blender::bke::AttributeAccessor::lookup_or_default(), options, blender::geometry::AllPointCloudsInfo::order, blender::geometry::PointCloudRealizeInfo::pointcloud, blender::bke::pointcloud_attributes(), blender::geometry::PointCloudRealizeInfo::positions, blender::geometry::AllPointCloudsInfo::realize_info, blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), blender::geometry::OrderedAttributes::size(), blender::geometry::PointCloudRealizeInfo::stored_ids, blender::GSpan::typed(), and blender::bke::GAttributeReader::varray.
Referenced by realize_instances().
GeometrySet blender::geometry::realize_instances | ( | GeometrySet | geometry_set, |
const RealizeInstancesOptions & | options | ||
) |
Join all instances into a single geometry component for each geometry type. For example, all mesh instances (including the already realized mesh) are joined into a single mesh. The output geometry set does not contain any instances. If the input did not contain any instances, it is returned directly.
The id
attribute has special handling. If there is an id attribute on any component, the output will contain an id
attribute as well. The output id is generated by mixing/hashing ids of instances and of the instanced geometry data.
Definition at line 1367 of file realize_instances.cc.
References GeometrySet::add(), blender::geometry::AllPointCloudsInfo::attributes, blender::geometry::AllMeshesInfo::attributes, blender::geometry::AllCurvesInfo::attributes, blender::geometry::AllPointCloudsInfo::create_id_attribute, blender::geometry::AllMeshesInfo::create_id_attribute, blender::geometry::AllCurvesInfo::create_id_attribute, blender::geometry::GatherTasks::curve_tasks, execute_realize_curve_tasks(), execute_realize_mesh_tasks(), execute_realize_pointcloud_tasks(), blender::geometry::GatherTasks::first_edit_data, blender::geometry::GatherTasks::first_volume, gather_realize_tasks_recursive(), GeometrySet::has_instances(), blender::geometry::AllMeshesInfo::materials, blender::geometry::GatherTasks::mesh_tasks, options, blender::geometry::GatherTasks::pointcloud_tasks, preprocess_curves(), preprocess_meshes(), preprocess_pointclouds(), blender::geometry::GatherTasksInfo::r_tasks, remove_id_attribute_from_instances(), and transform().
Referenced by blender::nodes::node_geo_join_geometry_cc::join_component_type(), and blender::nodes::node_geo_realize_instances_cc::node_geo_exec().
|
static |
Definition at line 1357 of file realize_instances.cc.
References GeometrySet::has(), and GeometrySet::modify_geometry_sets().
Referenced by realize_instances().
Curves * blender::geometry::resample_to_count | ( | const CurveComponent & | src_component, |
const fn::Field< bool > & | selection_field, | ||
const fn::Field< int > & | count_field | ||
) |
Create new curves where the selected curves have been resampled with a number of uniform-length samples defined by the count field. Interpolate attributes to the result, with an accuracy that depends on the curve's resolution parameter.
Definition at line 328 of file resample_curves.cc.
References get_count_input_max_one(), and resample_to_uniform().
Referenced by blender::nodes::node_geo_curve_resample_cc::node_geo_exec().
Curves * blender::geometry::resample_to_evaluated | ( | const CurveComponent & | src_component, |
const fn::Field< bool > & | selection_field | ||
) |
Evaluate each selected curve to its implicit evaluated points.
Definition at line 343 of file resample_curves.cc.
References ATTR_DOMAIN_CURVE, CD_DUPLICATE, CD_MASK_ALL, CurvesGeometry::curve_data, CURVE_TYPE_POLY, blender::bke::curves_new_nomain(), blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), CustomData_copy(), blender::bke::CurvesGeometry::ensure_can_interpolate_to_evaluated(), blender::bke::CurvesGeometry::ensure_evaluated_offsets(), blender::IndexMask::extract_ranges_invert(), blender::bke::CurvesGeometry::fill_curve_types(), Curves::geometry, CurveComponent::get_for_read(), blender::IndexMask::index_range(), blender::bke::CurvesGeometry::offsets_for_write(), blender::threading::parallel_for(), and blender::bke::image::partial_update::wrap().
Referenced by blender::nodes::node_geo_curve_resample_cc::node_geo_exec().
Curves * blender::geometry::resample_to_length | ( | const CurveComponent & | src_component, |
const fn::Field< bool > & | selection_field, | ||
const fn::Field< float > & | segment_length_field | ||
) |
Create new curves resampled to make each segment have the length specified by the #segment_length field input, rounded to make the length of each segment the same. The accuracy will depend on the curve's resolution parameter.
Definition at line 335 of file resample_curves.cc.
References get_count_input_from_length(), and resample_to_uniform().
Referenced by blender::nodes::node_geo_curve_resample_cc::node_geo_exec().
|
static |
Definition at line 167 of file resample_curves.cc.
References blender::bke::curves::accumulate_counts_to_offsets(), ATTR_DOMAIN_CURVE, CD_DUPLICATE, CD_MASK_ALL, CurvesGeometry::curve_data, CURVE_TYPE_POLY, blender::bke::CurvesGeometry::curve_types(), blender::bke::curves_new_nomain(), blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), CustomData_copy(), blender::bke::CurvesGeometry::cyclic(), blender::geometry::AttributesForInterpolation::dst, Editable, blender::bke::CurvesGeometry::ensure_evaluated_lengths(), blender::bke::CurvesGeometry::evaluated_positions(), blender::IndexMask::extract_ranges_invert(), blender::bke::curves::fill_curve_counts(), blender::bke::CurvesGeometry::fill_curve_types(), gather_point_attributes_to_interpolate(), Curves::geometry, CurveComponent::get_for_read(), blender::IndexMask::index_range(), blender::MutableSpan< T >::last(), blender::bke::CurvesGeometry::offsets_for_write(), blender::threading::parallel_for(), blender::bke::CurvesGeometry::points_num(), blender::bke::CurvesGeometry::positions_for_write(), CurveComponent::replace(), blender::bke::CurvesGeometry::resize(), and blender::bke::CurvesGeometry::wrap().
Referenced by resample_to_count(), and resample_to_length().
|
static |
Retrieve spans from source and result attributes.
Definition at line 90 of file resample_curves.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), ATTR_DOMAIN_POINT, CurveComponent::attributes(), CurveComponent::attributes_for_write(), BLI_assert, blender::bke::cpp_type_to_custom_data_type(), blender::GVArrayCommon::get_internal_span(), blender::Span< T >::index_range(), blender::bke::GSpanAttributeWriter::span, src, and blender::GVArrayCommon::type().
Referenced by gather_point_attributes_to_interpolate().
|
static |
Definition at line 280 of file set_curve_type.cc.
References curves, and blender::threading::parallel_for().
Referenced by convert_curves_to_bezier(), and convert_curves_to_nurbs().
|
static |
Definition at line 296 of file set_curve_type.cc.
References ATTR_DOMAIN_POINT, blender::geometry::GenericAttributes::attributes, BLI_assert, blender::bke::AttributeMetaData::data_type, blender::bke::AttributeMetaData::domain, blender::geometry::GenericAttributes::dst, blender::bke::AttributeAccessor::for_all(), blender::GVArrayCommon::get_internal_span(), if(), blender::bke::AttributeAccessor::is_builtin(), blender::bke::AttributeAccessor::lookup(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::bke::GSpanAttributeWriter::span, and blender::geometry::GenericAttributes::src.
|
static |
Definition at line 44 of file set_curve_type.cc.
References blender::MutableSpan< T >::index_range(), offset, and src.
Referenced by create_nurbs_to_bezier_positions().
|
static |
Definition at line 143 of file subdivide_curves.cc.
References blender::attribute_math::convert_to_static_type(), and blender::GMutableSpan::type().
Referenced by subdivide_curves().
|
static |
Definition at line 121 of file subdivide_curves.cc.
References blender::IndexMask::index_range(), and blender::threading::parallel_for().
|
static |
Definition at line 106 of file subdivide_curves.cc.
References blender::attribute_math::convert_to_static_type(), and blender::GMutableSpan::type().
Referenced by subdivide_curves().
|
static |
Definition at line 75 of file subdivide_curves.cc.
References blender::IndexMask::index_range(), and blender::threading::parallel_for().
|
static |
Definition at line 224 of file subdivide_curves.cc.
References blender::IndexRange::drop_back(), blender::Span< T >::index_range(), and blender::threading::parallel_for().
|
static |
Definition at line 158 of file subdivide_curves.cc.
References BEZIER_HANDLE_FREE, BEZIER_HANDLE_VECTOR, blender::MutableSpan< T >::fill(), blender::IndexRange::first(), blender::bke::curves::bezier::Insertion::handle_next, blender::bke::curves::bezier::Insertion::handle_prev, blender::bke::curves::bezier::insert(), blender::IndexRange::last(), blender::bke::curves::bezier::Insertion::left_handle, linear_interpolation(), blender::IndexRange::one_after_last(), blender::bke::curves::bezier::Insertion::position, blender::bke::curves::bezier::Insertion::right_handle, blender::bke::curves::bezier::segment_is_vector(), blender::IndexRange::shift(), blender::IndexRange::size(), blender::MutableSpan< T >::slice(), and type.
bke::CurvesGeometry blender::geometry::subdivide_curves | ( | const bke::CurvesGeometry & | src_curves, |
IndexMask | selection, | ||
const VArray< int > & | cuts | ||
) |
Add more points along each segment, with the amount of points to add in each segment described by the #cuts input. The new points are equidistant in parameter space, but not in the actual distances.
selection | A selection of curves to consider when subdividing. |
Definition at line 297 of file subdivide_curves.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), ATTR_DOMAIN_MASK_POINT, attribute, blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), calculate_result_offsets(), blender::bke::curves::copy_only_curve_domain(), blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), blender::IndexMask::extract_ranges_invert(), blender::Array< T, InlineBufferCapacity, Allocator >::fill(), blender::bke::CurvesGeometry::handle_positions_left(), blender::bke::CurvesGeometry::handle_positions_left_for_write(), blender::bke::CurvesGeometry::handle_positions_right(), blender::bke::CurvesGeometry::handle_positions_right_for_write(), blender::bke::CurvesGeometry::handle_types_left(), blender::bke::CurvesGeometry::handle_types_left_for_write(), blender::bke::CurvesGeometry::handle_types_right(), blender::bke::CurvesGeometry::handle_types_right_for_write(), blender::IndexMask::index_range(), blender::Span< T >::last(), blender::bke::CurvesGeometry::offsets(), blender::bke::CurvesGeometry::offsets_for_write(), blender::threading::parallel_for(), blender::bke::CurvesGeometry::points_num(), blender::bke::CurvesGeometry::positions(), blender::bke::CurvesGeometry::positions_for_write(), blender::bke::CurvesGeometry::resize(), blender::bke::retrieve_attributes_for_transfer(), subdivide_attribute_catmull_rom(), and subdivide_attribute_linear().
Referenced by blender::nodes::node_geo_curve_subdivide_cc::node_geo_exec().
|
static |
Definition at line 272 of file realize_instances.cc.
References BLI_assert, blender::threading::parallel_for(), blender::GMutableSpan::size(), src, and blender::GMutableSpan::type().
|
static |
Definition at line 281 of file realize_instances.cc.
References BLI_assert, blender::threading::parallel_for(), blender::GMutableSpan::size(), blender::GPointer::type(), and blender::GMutableSpan::type().
|
static |
Definition at line 28 of file fillet_curves.cc.
References blender::threading::parallel_for(), and src.
|
static |
Definition at line 252 of file set_curve_type.cc.
References CURVE_TYPE_NURBS, and is_nurbs_to_bezier_one_to_one().
|
static |
Definition at line 269 of file set_curve_type.cc.
References CURVE_TYPE_BEZIER, and CURVE_TYPE_CATMULL_ROM.
bool blender::geometry::try_curves_conversion_in_place | ( | IndexMask | selection, |
CurveType | dst_type, | ||
FunctionRef< bke::CurvesGeometry &()> | get_writable_curves_fn | ||
) |
Try the conversion to the #dst_type– avoiding the majority of the work done in convert_curves by modifying an existing object in place rather than creating a new one.
get_writable_curves_fn | Should return the write-able curves to change directly if possible. This is a function in order to avoid the cost of retrieval when unnecessary. |
Definition at line 676 of file set_curve_type.cc.
References conversion_can_change_point_num(), and curves.
Referenced by blender::nodes::node_geo_curve_spline_type_cc::node_geo_exec().
Definition at line 12 of file reverse_uv_sampler.cc.
Referenced by blender::geometry::ReverseUVSampler::ReverseUVSampler(), and blender::geometry::ReverseUVSampler::sample().
|
static |
Definition at line 391 of file mesh_merge_by_distance.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::geometry::WeldEdge::edge_dest, blender::geometry::WeldEdge::edge_orig, blender::Span< T >::index_range(), OUT_OF_CONTEXT, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Span< T >::size(), v1, v2, blender::geometry::WeldEdge::vert_a, and blender::geometry::WeldEdge::vert_b.
Referenced by weld_mesh_context_create().
|
static |
Definition at line 426 of file mesh_merge_by_distance.cc.
References BLI_assert, blender::geometry::WeldEdge::edge_dest, blender::geometry::WeldEdge::edge_orig, ELEM, ELEM_COLLAPSED, blender::geometry::WeldEdge::flag, blender::MutableSpan< T >::index_range(), blender::geometry::WeldGroup::len, blender::geometry::WeldGroup::ofs, OUT_OF_CONTEXT, blender::geometry::WeldEdge::vert_a, and blender::geometry::WeldEdge::vert_b.
Referenced by weld_mesh_context_create().
|
static |
Definition at line 538 of file mesh_merge_by_distance.cc.
References BLI_assert, blender::geometry::WeldEdge::edge_dest, blender::geometry::WeldEdge::edge_orig, ELEM_COLLAPSED, ELEM_MERGED, blender::Array< T, InlineBufferCapacity, Allocator >::fill(), blender::geometry::WeldEdge::flag, OUT_OF_CONTEXT, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::MutableSpan< T >::size(), blender::geometry::WeldEdge::vert_a, and blender::geometry::WeldEdge::vert_b.
Referenced by weld_mesh_context_create().
|
static |
Definition at line 616 of file mesh_merge_by_distance.cc.
References ELEM_COLLAPSED, blender::geometry::WeldLoop::flag, blender::geometry::WeldPoly::flag, blender::geometry::WeldLoopOfPolyIter::group, blender::geometry::WeldLoopOfPolyIter::group_len, l, blender::geometry::WeldLoopOfPolyIter::l_next, blender::geometry::WeldPoly::loop_end, blender::geometry::WeldLoopOfPolyIter::loop_end, blender::geometry::WeldLoopOfPolyIter::loop_map, blender::geometry::WeldPoly::loop_start, blender::geometry::WeldLoopOfPolyIter::loop_start, blender::geometry::WeldLoopOfPolyIter::mloop, OUT_OF_CONTEXT, blender::geometry::WeldLoopOfPolyIter::v, and blender::geometry::WeldLoopOfPolyIter::wloop.
Referenced by create_merged_mesh(), and weld_poly_loop_ctx_setup().
|
static |
Definition at line 668 of file mesh_merge_by_distance.cc.
References BLI_assert, blender::geometry::WeldLoopOfPolyIter::e, MLoop::e, blender::geometry::WeldLoop::edge, ELEM_COLLAPSED, blender::geometry::WeldLoop::flag, blender::geometry::WeldLoopOfPolyIter::group, blender::geometry::WeldLoopOfPolyIter::group_len, l, blender::geometry::WeldLoopOfPolyIter::l_curr, blender::geometry::WeldLoopOfPolyIter::l_next, blender::geometry::WeldLoopOfPolyIter::loop_end, blender::geometry::WeldLoopOfPolyIter::loop_map, blender::geometry::WeldLoop::loop_skip_to, blender::geometry::WeldLoopOfPolyIter::loop_start, blender::geometry::WeldLoopOfPolyIter::mloop, OUT_OF_CONTEXT, blender::geometry::WeldLoopOfPolyIter::type, blender::geometry::WeldLoopOfPolyIter::v, MLoop::v, blender::geometry::WeldLoop::vert, and blender::geometry::WeldLoopOfPolyIter::wloop.
Referenced by create_merged_mesh(), and weld_poly_loop_ctx_setup().
|
static |
Definition at line 1162 of file mesh_merge_by_distance.cc.
References blender::geometry::WeldMesh::edge_groups, blender::geometry::WeldMesh::edge_groups_buffer, blender::geometry::WeldMesh::edge_groups_map, blender::geometry::WeldMesh::edge_kill_len, Mesh::medge, mesh, Mesh::mloop, Mesh::mpoly, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), Mesh::totedge, Mesh::totloop, Mesh::totpoly, Mesh::totvert, blender::geometry::WeldMesh::vert_groups, blender::geometry::WeldMesh::vert_groups_buffer, blender::geometry::WeldMesh::vert_kill_len, weld_edge_ctx_alloc(), weld_edge_ctx_setup(), weld_edge_groups_setup(), weld_poly_loop_ctx_alloc(), weld_poly_loop_ctx_setup(), weld_vert_ctx_alloc_and_setup(), and weld_vert_groups_setup().
Referenced by create_merged_mesh().
|
static |
Definition at line 721 of file mesh_merge_by_distance.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), CLAMP_MIN, e, blender::Span< T >::index_range(), blender::geometry::WeldMesh::loop_map, MPoly::loopstart, blender::geometry::WeldMesh::max_poly_len, MIN2, OUT_OF_CONTEXT, blender::geometry::WeldPoly::poly_dst, blender::geometry::WeldMesh::poly_map, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::IndexRange::slice(), MPoly::totloop, v, blender::geometry::WeldLoop::vert, blender::geometry::WeldMesh::wloop, blender::geometry::WeldMesh::wpoly, and blender::geometry::WeldMesh::wpoly_new_len.
Referenced by weld_mesh_context_create().
|
static |
Definition at line 952 of file mesh_merge_by_distance.cc.
References BLI_assert, blender::geometry::WeldLoop::edge, ELEM_COLLAPSED, blender::MutableSpan< T >::fill(), blender::geometry::WeldLoop::flag, blender::geometry::WeldPoly::flag, l, blender::geometry::WeldGroup::len, blender::geometry::WeldMesh::loop_kill_len, blender::geometry::WeldPoly::loop_len, blender::geometry::WeldMesh::loop_map, blender::geometry::WeldPoly::loops, blender::geometry::WeldGroup::ofs, OUT_OF_CONTEXT, blender::geometry::WeldPoly::poly_dst, blender::geometry::WeldMesh::poly_kill_len, blender::geometry::WeldPoly::poly_orig, blender::geometry::WeldLoopOfPolyIter::v, blender::geometry::WeldLoop::vert, weld_iter_loop_of_poly_begin(), weld_iter_loop_of_poly_next(), weld_poly_split_recursive(), blender::geometry::WeldMesh::wloop, and blender::geometry::WeldMesh::wpoly.
Referenced by weld_mesh_context_create().
|
static |
Definition at line 809 of file mesh_merge_by_distance.cc.
References BLI_assert, ELEM_COLLAPSED, blender::geometry::WeldLoop::flag, blender::geometry::WeldPoly::flag, blender::geometry::WeldGroup::len, blender::geometry::WeldPoly::loop_end, blender::geometry::WeldPoly::loop_len, blender::geometry::WeldMesh::loop_map, blender::geometry::WeldLoop::loop_orig, blender::geometry::WeldLoop::loop_skip_to, blender::geometry::WeldPoly::loop_start, blender::geometry::WeldPoly::loops, blender::geometry::WeldGroup::ofs, OUT_OF_CONTEXT, blender::geometry::WeldPoly::poly_dst, blender::geometry::WeldPoly::poly_orig, blender::geometry::WeldLoop::vert, blender::geometry::WeldMesh::wloop, blender::geometry::WeldMesh::wpoly, and blender::geometry::WeldMesh::wpoly_new_len.
Referenced by weld_poly_loop_ctx_setup().
|
static |
Definition at line 315 of file mesh_merge_by_distance.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Span< T >::index_range(), OUT_OF_CONTEXT, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Span< T >::size(), and blender::geometry::WeldVert::vert_dest.
Referenced by weld_mesh_context_create().
|
static |
Definition at line 332 of file mesh_merge_by_distance.cc.
References BLI_assert, ELEM_MERGED, blender::Array< T, InlineBufferCapacity, Allocator >::fill(), blender::Span< T >::index_range(), OUT_OF_CONTEXT, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), and blender::Span< T >::size().
Referenced by weld_mesh_context_create().
|
staticconstexpr |
Definition at line 28 of file add_curves_on_mesh.cc.
Referenced by find_curve_neighbors().