|
Blender V5.3
|
Namespaces | |
| namespace | boolean |
| namespace | construct |
| namespace | curve_constraints |
| namespace | debug |
| namespace | geom |
| namespace | ngon |
| namespace | profile |
| namespace | quad |
| namespace | tests |
| namespace | uv |
Typedefs | |
| using | ParamKey = uintptr_t |
| using | NeighborCurves = Vector<NeighborCurve, max_neighbors> |
| using | UVVertBucket = Set<int> |
| using | UVVertMap = Map<int, Vector<UVVertBucket>> |
| using | CornerGroup = Vector<int> |
| using | PHashKey = uintptr_t |
Functions | |
| AddCurvesOnMeshOutputs | add_curves_on_mesh (bke::CurvesGeometry &curves, const AddCurvesOnMeshInputs &inputs) |
| float3 | compute_surface_point_normal (const int3 &tri, const float3 &bary_coord, Span< float3 > corner_normals) |
| bke::CurvesGeometry | remove_points_and_split (const bke::CurvesGeometry &curves, const IndexMask &mask) |
| bke::CurvesGeometry | grease_pencil_remove_points_and_split (const bke::CurvesGeometry &curves, const IndexMask &mask) |
| bke::CurvesGeometry | extend_curves (bke::CurvesGeometry &src_curves, const IndexMask &selection, const VArray< float > &start_lengths, const VArray< float > &end_lengths, float overshoot_fac, bool follow_curvature, float point_density, float segment_influence, float max_angle, bool invert_curvature, GeometryNodeCurveSampleMode sample_mode, const bke::AttributeFilter &attribute_filter) |
| Array< Mesh * > | extract_mesh_vertices (const Mesh &mesh, const IndexMask &mask, const bke::AttributeFilter &attribute_filter) |
| Array< Mesh * > | extract_mesh_edges (const Mesh &mesh, const IndexMask &mask, const bke::AttributeFilter &attribute_filter) |
| Array< Mesh * > | extract_mesh_faces (const Mesh &mesh, const IndexMask &mask, const bke::AttributeFilter &attribute_filter) |
| Array< PointCloud * > | extract_pointcloud_points (const PointCloud &pointcloud, const IndexMask &mask, const bke::AttributeFilter &attribute_filter) |
| Array< Curves * > | extract_curves_points (const Curves &curves, const IndexMask &mask, const bke::AttributeFilter &attribute_filter) |
| Array< Curves * > | extract_curves (const Curves &curves, const IndexMask &mask, const bke::AttributeFilter &attribute_filter) |
| Array< bke::Instances * > | extract_instances (const bke::Instances &instances, const IndexMask &mask, const bke::AttributeFilter &attribute_filter) |
| Array< GreasePencil * > | extract_greasepencil_layers (const GreasePencil &grease_pencil, const IndexMask &mask, const bke::AttributeFilter &attribute_filter) |
| Array< GreasePencil * > | extract_greasepencil_layer_points (const GreasePencil &grease_pencil, int layer_i, const IndexMask &mask, const bke::AttributeFilter &attribute_filter) |
| Array< GreasePencil * > | extract_greasepencil_layer_curves (const GreasePencil &grease_pencil, int layer_i, const IndexMask &mask, const bke::AttributeFilter &attribute_filter) |
| bke::CurvesGeometry | fillet_curves_poly (const bke::CurvesGeometry &src_curves, const IndexMask &curve_selection, const VArray< float > &radius, const VArray< int > &counts, bool limit_radius, const bke::AttributeFilter &attribute_filter) |
| bke::CurvesGeometry | fillet_curves_bezier (const bke::CurvesGeometry &src_curves, const IndexMask &curve_selection, const VArray< float > &radius, bool limit_radius, const bke::AttributeFilter &attribute_filter) |
| bke::CurvesGeometry | fit_poly_to_bezier_curves (const bke::CurvesGeometry &src_curves, const IndexMask &curve_selection, const VArray< float > &thresholds, const VArray< bool > &corners, FitMethod method, const bke::AttributeFilter &attribute_filter) |
| void | foreach_real_geometry (bke::GeometrySet &geometry, FunctionRef< void(bke::GeometrySet &geometry_set)> fn) |
| void | sample_curve_padded (const Span< float3 > positions, bool cyclic, MutableSpan< int > r_indices, MutableSpan< float > r_factors) |
| void | sample_curve_padded (const bke::CurvesGeometry &curves, int curve_index, bool cyclic, bool reverse, MutableSpan< int > r_indices, MutableSpan< float > r_factors) |
| void | interpolate_curves (const bke::CurvesGeometry &from_curves, const bke::CurvesGeometry &to_curves, Span< int > from_curve_indices, Span< int > to_curve_indices, const IndexMask &dst_curve_mask, Span< bool > dst_curve_flip_direction, float mix_factor, bke::CurvesGeometry &dst_curves, IndexMaskMemory &memory) |
| void | interpolate_curves_with_samples (const bke::CurvesGeometry &from_curves, const bke::CurvesGeometry &to_curves, Span< int > from_curve_indices, Span< int > to_curve_indices, Span< int > from_sample_indices, Span< int > to_sample_indices, Span< float > from_sample_factors, Span< float > to_sample_factors, const IndexMask &dst_curve_mask, float mix_factor, bke::CurvesGeometry &dst_curves, IndexMaskMemory &memory) |
| bke::GeometrySet | join_geometries (Span< bke::GeometrySet > geometries, const bke::AttributeFilter &attribute_filter, const std::optional< Span< bke::GeometryComponent::Type > > &component_types_to_join=std::nullopt, bool allow_merging_instance_references=true) |
| bke::CurvesGeometry | curves_merge_endpoints (const bke::CurvesGeometry &src_curves, Span< int > connect_to_curve, Span< bool > flip_direction, const bke::AttributeFilter &attribute_filter) |
| GreasePencil * | merge_layers (const GreasePencil &src_grease_pencil, GroupedSpan< int > layers_to_merge, const bke::AttributeFilter &attribute_filter) |
| GreasePencil * | merge_layers_by_name (const GreasePencil &src_grease_pencil, const VArray< bool > &selection, const bke::AttributeFilter &attribute_filter) |
| std::optional< Mesh * > | mesh_bevel (const Mesh &src_mesh, const IndexMask &selection, const BevelParameters ¶ms, const bke::AttributeFilter &attribute_filter) |
| std::optional< Mesh * > | mesh_copy_selection (const Mesh &src_mesh, const VArray< bool > &selection, bke::AttrDomain selection_domain, const bke::AttributeFilter &attribute_filter={}) |
| std::optional< Mesh * > | mesh_copy_selection_keep_verts (const Mesh &src_mesh, const VArray< bool > &selection, bke::AttrDomain selection_domain, const bke::AttributeFilter &attribute_filter={}) |
| std::optional< Mesh * > | mesh_copy_selection_keep_edges (const Mesh &mesh, const VArray< bool > &selection, bke::AttrDomain selection_domain, const bke::AttributeFilter &attribute_filter={}) |
| std::optional< Mesh * > | mesh_merge_verts (const Mesh &mesh, const IndexMask &selection, Span< int > merge_ids, const bke::AttributeFilter &attribute_filter) |
| Mesh * | create_cuboid_mesh (const float3 &size, int verts_x, int verts_y, int verts_z, std::optional< StringRef > uv_id) |
| Mesh * | create_cuboid_mesh (const float3 &size, int verts_x, int verts_y, int verts_z) |
| Mesh * | create_cylinder_or_cone_mesh (float radius_top, float radius_bottom, float depth, int circle_segments, int side_segments, int fill_segments, ConeFillType fill_type, ConeAttributeOutputs &attribute_outputs) |
| Mesh * | create_grid_mesh (int verts_x, int verts_y, float size_x, float size_y, std::optional< StringRef > uv_map_id) |
| Mesh * | create_line_mesh (float3 start, float3 delta, int count) |
| Bounds< float3 > | calculate_bounds_radial_primitive (float radius_top, float radius_bottom, int segments, float height) |
| Mesh * | create_uv_sphere_mesh (float radius, int segments, int rings, std::optional< StringRef > uv_map_id) |
| IndexMask | vert_selection_from_edge (Span< int2 > edges, const IndexMask &edge_mask, int verts_num, IndexMaskMemory &memory) |
| IndexMask | vert_selection_from_face (OffsetIndices< int > faces, const IndexMask &face_mask, Span< int > corner_verts, int verts_num, IndexMaskMemory &memory) |
| IndexMask | edge_selection_from_face (OffsetIndices< int > faces, const IndexMask &face_mask, Span< int > corner_edges, int edges_num, IndexMaskMemory &memory) |
| IndexMask | edge_selection_from_vert (Span< int2 > edges, Span< bool > vert_selection, IndexMaskMemory &memory) |
| IndexMask | face_selection_from_vert (OffsetIndices< int > faces, Span< int > corner_verts, Span< bool > vert_selection, IndexMaskMemory &memory) |
| IndexMask | face_selection_from_edge (OffsetIndices< int > faces, Span< int > corner_edges, Span< bool > edge_mask, IndexMaskMemory &memory) |
| void | split_edges (Mesh &mesh, const IndexMask &selected_edges, const bke::AttributeFilter &attribute_filter={}) |
| bke::CurvesGeometry | mesh_edges_to_curves_convert (const Mesh &mesh, const IndexMask &selection, const bke::AttributeFilter &attribute_filter) |
| bke::CurvesGeometry | create_curve_from_vert_indices (const bke::AttributeAccessor &mesh_attributes, Span< int > vert_indices, Span< int > curve_offsets, IndexRange cyclic_curves, const bke::AttributeFilter &attribute_filter) |
| bke::CurvesGeometry | mesh_faces_to_curves_convert (const Mesh &mesh, const IndexMask &selection, const bke::AttributeFilter &attribute_filter) |
| std::optional< Mesh * > | mesh_triangulate (const Mesh &src_mesh, const IndexMask &selection, TriangulateNGonMode ngon_mode, TriangulateQuadMode quad_mode, const bke::AttributeFilter &attribute_filter) |
| void | mix_geometries (bke::GeometrySet &a, const bke::GeometrySet &b, float factor) |
| void | mix_bundles (nodes::Bundle &a, const nodes::Bundle &b, float factor) |
| void | mix_socket_values (bke::SocketValueVariant &a, const bke::SocketValueVariant &b, const float factor) |
| PointCloud * | point_merge_by_distance (const PointCloud &src_points, const float merge_distance, const IndexMask &selection, const bke::AttributeFilter &attribute_filter) |
| PointCloud * | merge_points (const PointCloud &src_points, const IndexMask &selection, Span< int > merge_ids, const bke::AttributeFilter &attribute_filter) |
| const CPPType & | points_rasterize_attribute_type (const PointRasterizeType rasterize_type) |
| const CPPType & | points_rasterize_grid_type (const PointRasterizeType rasterize_type) |
| bool | use_debug_randomization () |
| void | debug_randomize_vert_order (Mesh *mesh) |
| void | debug_randomize_edge_order (Mesh *mesh) |
| void | debug_randomize_face_order (Mesh *mesh) |
| void | debug_randomize_mesh_order (Mesh *mesh) |
| void | debug_randomize_point_order (PointCloud *pointcloud) |
| void | debug_randomize_curve_order (bke::CurvesGeometry *curves) |
| void | debug_randomize_instance_order (bke::Instances *instances) |
| const MultiValueMap< bke::GeometryComponent::Type, bke::AttrDomain > & | components_supported_reordering () |
| Mesh * | reorder_mesh (const Mesh &src_mesh, Span< int > old_by_new_map, bke::AttrDomain domain, const bke::AttributeFilter &attribute_filter) |
| PointCloud * | reorder_points (const PointCloud &src_pointcloud, Span< int > old_by_new_map, const bke::AttributeFilter &attribute_filter) |
| bke::CurvesGeometry | reorder_curves_geometry (const bke::CurvesGeometry &src_curves, Span< int > old_by_new_map, const bke::AttributeFilter &attribute_filter) |
| Curves * | reorder_curves (const Curves &src_curves, Span< int > old_by_new_map, const bke::AttributeFilter &attribute_filter) |
| bke::Instances * | reorder_instaces (const bke::Instances &src_instances, Span< int > old_by_new_map, const bke::AttributeFilter &attribute_filter) |
| bke::GeometryComponentPtr | reordered_component (const bke::GeometryComponent &src_component, Span< int > old_by_new_map, bke::AttrDomain domain, const bke::AttributeFilter &attribute_filter) |
| std::optional< Array< int > > | sort_indices_by_weights (int domain_size, const IndexMask &mask, const VArray< int > &group_id, const VArray< float > &weight) |
| CurvesGeometry | resample_to_count (const CurvesGeometry &src_curves, const IndexMask &selection, const VArray< int > &counts, const ResampleCurvesOutputAttributeIDs &output_ids={}) |
| CurvesGeometry | resample_to_count (const CurvesGeometry &src_curves, const fn::FieldContext &field_context, const fn::Field< bool > &selection_field, const fn::Field< int > &count_field, const ResampleCurvesOutputAttributeIDs &output_ids={}) |
| CurvesGeometry | resample_to_length (const CurvesGeometry &src_curves, const IndexMask &selection, const VArray< float > &sample_lengths, const ResampleCurvesOutputAttributeIDs &output_ids={}, bool keep_last_segment=false) |
| CurvesGeometry | resample_to_length (const CurvesGeometry &src_curves, const fn::FieldContext &field_context, const fn::Field< bool > &selection_field, const fn::Field< float > &segment_length_field, const ResampleCurvesOutputAttributeIDs &output_ids={}, bool keep_last_segment=false) |
| CurvesGeometry | resample_to_evaluated (const CurvesGeometry &src_curves, const IndexMask &selection, const ResampleCurvesOutputAttributeIDs &output_ids={}) |
| CurvesGeometry | resample_to_evaluated (const CurvesGeometry &src_curves, const fn::FieldContext &field_context, const fn::Field< bool > &selection_field, const ResampleCurvesOutputAttributeIDs &output_ids={}) |
| void | separate_geometry (bke::GeometrySet &geometry_set, bke::AttrDomain domain, GeometryNodeDeleteGeometryMode mode, const fn::Field< bool > &selection_field, const bke::AttributeFilter &attribute_filter, bool &r_is_error) |
| bke::CurvesGeometry | convert_curves (const bke::CurvesGeometry &src_curves, const IndexMask &selection, CurveType dst_type, const bke::AttributeFilter &attribute_filter, const ConvertCurvesOptions &options={}) |
| IndexMask | simplify_curve_attribute (const Span< float3 > positions, const IndexMask &curves_selection, const OffsetIndices< int > points_by_curve, const VArray< bool > &cyclic, float epsilon, GSpan attribute_data, IndexMaskMemory &memory) |
| void | curve_simplify (const Span< float3 > positions, const bool cyclic, const float epsilon, const GSpan attribute_data, MutableSpan< bool > points_to_delete) |
| void | gaussian_blur_1D (const GSpan src, int iterations, const VArray< float > &influence_by_point, const bool smooth_ends, const bool keep_shape, const bool is_cyclic, GMutableSpan dst) |
| void | smooth_curve_attribute (const IndexMask &curves_to_smooth, const OffsetIndices< int > points_by_curve, const VArray< bool > &point_selection, const VArray< bool > &cyclic, int iterations, float influence, bool smooth_ends, bool keep_shape, GMutableSpan attribute_data) |
| void | smooth_curve_attribute (const IndexMask &curves_to_smooth, const OffsetIndices< int > points_by_curve, const VArray< bool > &point_selection, const VArray< bool > &cyclic, int iterations, const VArray< float > &influence_by_point, bool smooth_ends, bool keep_shape, GMutableSpan attribute_data) |
| void | smooth_curve_positions (bke::CurvesGeometry &curves, const IndexMask &curves_to_smooth, const VArray< bool > &point_selection, int iterations, const VArray< float > &influence_by_point, bool smooth_ends, bool keep_shape) |
| void | smooth_curve_positions (bke::CurvesGeometry &curves, const IndexMask &curves_to_smooth, const VArray< bool > &point_selection, int iterations, float influence, bool smooth_ends, bool keep_shape) |
| bke::CurvesGeometry | subdivide_curves (const bke::CurvesGeometry &src_curves, const IndexMask &selection, const VArray< int > &cuts, const bke::AttributeFilter &attribute_filter={}) |
| void | transform_mesh (Mesh &mesh, float3 translation, math::Quaternion rotation, float3 scale) |
| std::optional< TransformGeometryErrors > | transform_geometry (bke::GeometrySet &geometry, const float4x4 &transform) |
| void | translate_geometry (bke::GeometrySet &geometry, const float3 translation) |
| float | pack_islands (Span< PackIsland * > islands, const UVPackIsland_Params ¶ms) |
| void | mul_v2_m2_add_v2v2 (float r[2], const float mat[2][2], const float a[2], const float b[2]) |
| static void | calc_straight_curve_positions (const float3 &a, const float3 &b, MutableSpan< float3 > dst) |
| static void | find_curve_neighbors (const Span< float3 > root_positions, const KDTreeNew< float3 > &old_roots_kdtree, Vector< int > &offset_data, Vector< int > &index_data, Vector< float > &weight_data) |
| static void | calc_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 | calc_position_with_interpolation (CurvesGeometry &curves, const Span< float3 > root_positions_cu, const OffsetIndices< int > neighbor_offsets, const Span< int > neighbor_indices, const Span< float > neighbor_weights, const int old_curves_num, const Span< float > new_lengths_cu, const Span< float3 > new_normals_su, const bke::CurvesSurfaceTransforms &transforms, const Span< int3 > corner_tris, const ReverseUVSampler &reverse_uv_sampler, const Span< float3 > corner_normals_su) |
| static void | calc_radius_without_interpolation (CurvesGeometry &curves, const IndexRange new_points_range, const float radius) |
| static void | calc_radius_with_interpolation (CurvesGeometry &curves, const int old_curves_num, const float radius, const Span< float > new_lengths_cu, const OffsetIndices< int > neighbor_offsets, const Span< int > neighbor_indices, const Span< float > neighbor_weights) |
| static void | extend_curve_straight (const float used_percent_length, const float new_size, const Span< int > start_points, const Span< int > end_points, const int curve, const IndexRange new_curve, const Span< float > use_start_lengths, const Span< float > use_end_lengths, MutableSpan< float3 > positions) |
| static void | extend_curve_curved (const float used_percent_length, const Span< int > start_points, const Span< int > end_points, const OffsetIndices< int > points_by_curve, const int curve, const IndexRange new_curve, const Span< float > use_start_lengths, const Span< float > use_end_lengths, const float max_angle, const float segment_influence, const bool invert_curvature, MutableSpan< float3 > positions) |
| static void | duplicate_fillet_point_data (const OffsetIndices< int > src_points_by_curve, const OffsetIndices< int > dst_points_by_curve, const IndexMask &curve_selection, const Span< int > all_point_offsets, const GSpan src, GMutableSpan dst) |
| static void | calculate_result_offsets (const OffsetIndices< int > src_points_by_curve, const IndexMask &selection, const IndexMask &unselected, 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 void | zero_degenerate_radii (const Span< float3 > directions, const Span< float > angles, MutableSpan< float > radii) |
| 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 OffsetIndices< int > dst_offsets, MutableSpan< float3 > dst) |
| static HandleType | fillet_handle_type (const float3 &position, const float3 &handle, const float3 &other_handle) |
| 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 OffsetIndices< 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 OffsetIndices< 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, const bke::AttributeFilter &attribute_filter) |
| static void | extract_real_geometries_recursive (bke::GeometrySet &geometry, Vector< int > &path, Map< bke::GeometrySet, Vector< Vector< int > > > &r_real_geometries) |
| static void | reinsert_modified_geometry_recursive (bke::GeometrySet &geometry, const bke::GeometrySet &geometry_to_insert, const Span< int > path) |
| static Array< float > | build_point_to_sample_map (const Span< float3 > positions, const bool cyclic, const int samples_num) |
| static void | assign_samples_to_segments (const int num_dst_points, const Span< float3 > src_positions, const bool cyclic, MutableSpan< int > dst_sample_offsets) |
| static void | reverse_samples (const int points_num, MutableSpan< int > r_indices, MutableSpan< float > r_factors) |
| static bool | interpolate_attribute_to_curves (const StringRef name, const std::array< int, CURVE_TYPES_NUM > &type_counts) |
| static bool | interpolate_attribute_to_poly_curve (const StringRef name) |
| static AttributesForInterpolation | retrieve_attribute_spans (const Span< StringRef > names, const CurvesGeometry &src_from_curves, const CurvesGeometry &src_to_curves, const bke::AttrDomain domain, CurvesGeometry &dst_curves) |
| static AttributesForInterpolation | gather_point_attributes_to_interpolate (const CurvesGeometry &from_curves, const CurvesGeometry &to_curves, CurvesGeometry &dst_curves) |
| static AttributesForInterpolation | gather_curve_attributes_to_interpolate (const CurvesGeometry &from_curves, const CurvesGeometry &to_curves, CurvesGeometry &dst_curves) |
| static void | sample_curve_attribute (const bke::CurvesGeometry &src_curves, const Span< int > src_curve_indices, const OffsetIndices< int > dst_points_by_curve, const GSpan src_data, const IndexMask &dst_curve_mask, const Span< int > dst_sample_indices, const Span< float > dst_sample_factors, GMutableSpan dst_data) |
| static float4 | calculate_catmull_rom_basis_derivative (const float parameter) |
| static int4 | get_catmull_rom_indices (const int src_index, const int src_index_last, const bool cyclic) |
| static void | sample_poly_curve_positions_handles (const bool cyclic, const Span< float3 > src_pos, const Span< int > dst_indices, const Span< float > dst_factors, const IndexRange dst_points, const int8_t dst_type, MutableSpan< float3 > dst_pos, MutableSpan< float3 > dst_left, MutableSpan< float3 > dst_right, MutableSpan< int8_t > dst_types_left, MutableSpan< int8_t > dst_types_right) |
| static void | sample_catmull_rom_curve_positions_handles (const bool cyclic, const IndexRange src_points, const Span< float3 > src_pos, const Span< int > dst_indices, const Span< float > dst_factors, const IndexRange dst_points, const int8_t dst_type, MutableSpan< float3 > dst_pos, MutableSpan< float3 > dst_left, MutableSpan< float3 > dst_right, MutableSpan< int8_t > dst_types_left, MutableSpan< int8_t > dst_types_right) |
| static void | sample_bezier_curve_positions_handles (const bool cyclic, const IndexRange src_points, const Span< float3 > src_pos, const Span< float3 > src_handle_left, const Span< float3 > src_handle_right, const Span< int8_t > src_types_left, const Span< int8_t > src_types_right, const Span< int > dst_indices, const Span< float > dst_factors, const IndexRange dst_points, MutableSpan< float3 > dst_pos, MutableSpan< float3 > dst_left, MutableSpan< float3 > dst_right, MutableSpan< int8_t > dst_types_left, MutableSpan< int8_t > dst_types_right) |
| static void | sample_curve_positions_and_handles (const bke::CurvesGeometry &src_curves, const Span< int > src_curve_indices, const OffsetIndices< int > dst_points_by_curve, const VArray< int8_t > dst_types, const IndexMask &dst_curve_mask, const Span< int > dst_sample_indices, const Span< float > dst_sample_factors, MutableSpan< float3 > dst_positions, MutableSpan< float3 > dst_handles_left, MutableSpan< float3 > dst_handles_right, MutableSpan< int8_t > dst_handle_types_left, MutableSpan< int8_t > dst_handle_types_right) |
| template<typename T> | |
| static void | mix_arrays (const Span< T > from, const Span< T > to, const float mix_factor, const MutableSpan< T > dst) |
| static void | mix_arrays (const GSpan src_from, const GSpan src_to, const Span< float > mix_factors, const IndexMask &selection, const GMutableSpan dst) |
| static void | mix_arrays (const GSpan src_from, const GSpan src_to, const Span< float > mix_factors, const IndexMask &group_selection, const OffsetIndices< int > groups, const GMutableSpan dst) |
| static int8_t | mix_handle_type (const int8_t from_type, const int8_t to_type) |
| static void | mix_handle_type_arrays (const Span< int8_t > src_from, const Span< int8_t > src_to, const IndexMask &group_selection, const OffsetIndices< int > groups, const MutableSpan< int8_t > dst) |
| static void | mix_curve_type (const Span< int > from_curve_indices, const Span< int > to_curve_indices, const VArray< int8_t > &from_types, const VArray< int8_t > &to_types, const IndexMask &dst_curve_mask, MutableSpan< int8_t > dst_curve_types) |
| static void | sample_curve_uniform (const bke::CurvesGeometry &curves, const int curve_index, const bool cyclic, const bool reverse, MutableSpan< int > r_segment_indices, MutableSpan< float > r_factors) |
| static GeometrySet::GatheredAttributes | get_final_attribute_info (const Span< const GeometryComponent * > components, const Span< StringRef > ignored_attributes) |
| static void | fill_new_attribute (const Span< const GeometryComponent * > src_components, const StringRef name, const bke::AttrType data_type, const bke::AttrDomain domain, GMutableSpan dst_span) |
| static bool | try_join_single_value_attribute (const Span< const GeometryComponent * > src_components, const StringRef name, const bke::AttrDomain domain, const bke::AttrType data_type, bke::MutableAttributeAccessor dst_attributes) |
| static void | join_attributes (const Span< const GeometryComponent * > src_components, GeometryComponent &result, const Span< StringRef > ignored_attributes) |
| static void | join_instances (const Span< const GeometryComponent * > src_components, const bool allow_merging_instance_references, GeometrySet &result) |
| static void | join_volumes (const Span< const GeometryComponent * >, GeometrySet &) |
| static void | join_component_type (const bke::GeometryComponent::Type component_type, const Span< GeometrySet > src_geometry_sets, const bke::AttributeFilter &attribute_filter, const bool allow_merging_instance_references, GeometrySet &result) |
| GeometrySet | join_geometries (const Span< GeometrySet > geometries, const bke::AttributeFilter &attribute_filter, const std::optional< Span< GeometryComponent::Type > > &component_types_to_join, const bool allow_merging_instance_references) |
| template<typename Fn> | |
| static void | foreach_connected_curve (const Span< int > connect_to_curve, MutableSpan< uint8_t > flags, const int start, Fn fn) |
| static Vector< int > | toposort_connected_curves (const Span< int > connect_to_curve) |
| static void | reverse_order (GMutableSpan span) |
| static void | reorder_and_flip_attributes_group_to_group (const bke::AttributeAccessor src_attributes, const bke::AttrDomain domain, const OffsetIndices< int > src_offsets, const OffsetIndices< int > dst_offsets, const Span< int > old_by_new_map, const Span< bool > flip_direction, bke::MutableAttributeAccessor dst_attributes) |
| static bke::CurvesGeometry | reorder_and_flip_curves (const bke::CurvesGeometry &src_curves, const Span< int > old_by_new_map, const Span< bool > flip_direction) |
| static void | find_connected_ranges (const bke::CurvesGeometry &src_curves, const Span< int > old_by_new_map, Span< int > connect_to_curve, Span< bool > cyclic, Vector< int > &r_joined_curve_offsets, Vector< bool > &r_joined_cyclic) |
| static bke::CurvesGeometry | join_curves_ranges (const bke::CurvesGeometry &src_curves, const OffsetIndices< int > old_curves_by_new) |
| static bke::CurvesGeometry | join_curves (const GreasePencil &src_grease_pencil, const Span< const bke::CurvesGeometry * > all_src_curves, const Span< float4x4 > transforms_to_apply, const bke::AttributeFilter &attribute_filter) |
| static void | remap_verts (const OffsetIndices< int > src_faces, const OffsetIndices< int > dst_faces, const int src_verts_num, const IndexMask &vert_mask, const IndexMask &edge_mask, const IndexMask &face_mask, const Span< int2 > src_edges, const Span< int > src_corner_verts, MutableSpan< int2 > dst_edges, MutableSpan< int > dst_corner_verts) |
| static void | remap_edges (const OffsetIndices< int > src_faces, const OffsetIndices< int > dst_faces, const int src_edges_num, const IndexMask &edge_mask, const IndexMask &face_mask, const Span< int > src_corner_edges, MutableSpan< int > dst_corner_edges) |
| static void | copy_loose_vert_hint (const Mesh &src, Mesh &dst) |
| static void | copy_loose_edge_hint (const Mesh &src, Mesh &dst) |
| static void | copy_overlapping_hint (const Mesh &src, Mesh &dst) |
| static void | gather_vert_attributes (const Mesh &mesh_src, const bke::AttributeFilter &attribute_filter, const IndexMask &vert_mask, Mesh &mesh_dst) |
| template<typename Fn> | |
| static void | foreach_weld_face_corner (const WeldFace &weld_face, const Span< int > corner_next, const Fn &fn) |
| static void | calculate_positions (const CuboidConfig &config, MutableSpan< float3 > positions) |
| static void | define_quad (MutableSpan< int > corner_verts, const int corner, const int vert_1, const int vert_2, const int vert_3, const int vert_4) |
| static void | calculate_corner_verts (const CuboidConfig &config, MutableSpan< int > corner_verts) |
| static void | calculate_uvs (const CuboidConfig &config, Mesh *mesh, const StringRef uv_id) |
| static void | calculate_cone_verts (const ConeConfig &config, MutableSpan< float3 > positions) |
| static void | calculate_cone_edges (const ConeConfig &config, MutableSpan< int2 > edges) |
| static void | calculate_cone_faces (const ConeConfig &config, MutableSpan< int > corner_verts, MutableSpan< int > corner_edges, MutableSpan< int > face_sizes) |
| static void | calculate_selection_outputs (const ConeConfig &config, const ConeAttributeOutputs &attribute_outputs, bke::MutableAttributeAccessor attributes) |
| static void | calculate_cone_uvs (const ConeConfig &config, Mesh *mesh, const StringRef uv_map_id) |
| static Mesh * | create_vertex_mesh () |
| static Bounds< float3 > | calculate_bounds_cylinder (const ConeConfig &config) |
| static void | calculate_uvs (Mesh *mesh, const Span< float3 > positions, const Span< int > corner_verts, const float size_x, const float size_y, const StringRef uv_map_id) |
| static int | sphere_vert_total (const int segments, const int rings) |
| static int | sphere_edge_total (const int segments, const int rings) |
| static int | sphere_corner_total (const int segments, const int rings) |
| static int | sphere_face_total (const int segments, const int rings) |
| static BLI_NOINLINE void | calculate_sphere_vertex_data (MutableSpan< float3 > positions, MutableSpan< float3 > vert_normals, const float radius, const int segments, const int rings) |
| static BLI_NOINLINE void | calculate_sphere_edge_indices (MutableSpan< int2 > edges, const int segments, const int rings) |
| static BLI_NOINLINE void | calculate_sphere_faces (MutableSpan< int > face_offsets, const int segments) |
| static BLI_NOINLINE void | calculate_sphere_corners (MutableSpan< int > corner_verts, MutableSpan< int > corner_edges, const int segments, const int rings) |
| static BLI_NOINLINE void | calculate_sphere_uvs (Mesh *mesh, const float segments, const float rings, const StringRef uv_map_id) |
| static Bounds< float3 > | calculate_bounds_uv_sphere (const float radius, const int segments, const int rings) |
| static IndexMask | mapped_corner_selection_from_face (const OffsetIndices< int > faces, const IndexMask &face_mask, const Span< int > corner_verts_or_edges, const int verts_or_edges_num, IndexMaskMemory &memory) |
| static IndexMask | face_selection_from_mapped_corner (const OffsetIndices< int > faces, const Span< int > corner_verts_or_edges, const Span< bool > vert_or_edge_selection, IndexMaskMemory &memory) |
| static void | propagate_vert_attributes (Mesh &mesh, const Span< int > new_to_old_verts_map) |
| static void | propagate_edge_attributes (Mesh &mesh, const Span< int > new_to_old_edge_map) |
| static int | corner_on_edge_connected_to_vert (const Span< int > corner_verts, const int corner, const IndexRange face, const int vert) |
| static Vector< CornerGroup > | calc_corner_groups_for_vertex (const OffsetIndices< int > faces, const Span< int > corner_verts, const Span< int > corner_edges, const GroupedSpan< int > edge_to_corner_map, const Span< int > corner_to_face_map, const BitSpan split_edges, const Span< int > connected_corners, const int vert) |
| static BLI_NOINLINE Array< Vector< CornerGroup > > | calc_all_corner_groups (const OffsetIndices< int > faces, const Span< int > corner_verts, const Span< int > corner_edges, const GroupedSpan< int > vert_to_corner_map, const GroupedSpan< int > edge_to_corner_map, const Span< int > corner_to_face_map, const BitSpan split_edges, const IndexMask &affected_verts) |
| static VertLooseEdges | calc_vert_loose_edges (const GroupedSpan< int > vert_to_edge_map, const BitSpan loose_edges, const BitSpan split_edges, const int vert) |
| static OffsetIndices< int > | calc_vert_ranges_per_old_vert (const IndexMask &affected_verts, const Span< Vector< CornerGroup > > corner_groups, const GroupedSpan< int > vert_to_edge_map, const BitSpan loose_edges, const BitSpan split_edges, Array< int > &offset_data) |
| static void | update_corner_verts (const int orig_verts_num, const Span< Vector< CornerGroup > > corner_groups, const OffsetIndices< int > new_verts_by_affected_vert, MutableSpan< int > new_corner_verts) |
| static OrderedEdge | edge_from_corner (const OffsetIndices< int > faces, const Span< int > corner_verts, const Span< int > corner_to_face_map, const int corner) |
| static Array< int2 > | calc_new_edges (const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > edge_to_corner_map, const Span< int > corner_to_face_map, const IndexMask &selected_edges, MutableSpan< int2 > edges, MutableSpan< int > corner_edges, MutableSpan< int > r_new_edge_offsets) |
| static void | update_unselected_edges (const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > edge_to_corner_map, const Span< int > corner_to_face_map, const IndexMask &unselected_edges, MutableSpan< int2 > edges) |
| static void | swap_edge_vert (int2 &edge, const int old_vert, const int new_vert) |
| static void | reassign_loose_edge_verts (const int orig_verts_num, const IndexMask &affected_verts, const GroupedSpan< int > vert_to_edge_map, const BitSpan loose_edges, const BitSpan split_edges, const Span< Vector< CornerGroup > > corner_groups, const OffsetIndices< int > new_verts_by_affected_vert, MutableSpan< int2 > edges) |
| static Array< int > | offsets_to_map (const IndexMask &mask, const OffsetIndices< int > offsets) |
| static auto | filter_builtin_attributes (const bke::AttributeAccessor &mesh_attributes, const bke::AttributeAccessor &curves_attributes, Set< StringRef > &storage, const bke::AttributeFilter &attribute_filter) |
| static BLI_NOINLINE CurveFromEdgesOutput | edges_to_curve_point_indices (const int verts_num, const Span< int2 > edges) |
| static BLI_NOINLINE bke::CurvesGeometry | edges_to_curves_convert (const Mesh &mesh, const Span< int2 > edges, const bke::AttributeFilter &attribute_filter) |
| static bke::CurvesGeometry | create_curves_for_faces (const Mesh &mesh, const OffsetIndices< int > faces, const IndexMask &selection) |
| static Span< int > | create_point_to_vert_map (const Mesh &mesh, const OffsetIndices< int > faces, const OffsetIndices< int > points_by_curve, const IndexMask &selection, Array< int > &map_data) |
| static void | gather (const Span< int > src, const Span< int16_t > indices, MutableSpan< int > dst) |
| static Span< int > | gather_or_reference (const Span< int > src, const Span< int16_t > indices, Vector< int > &dst) |
| static Span< int > | gather_or_reference (const Span< int > src, const IndexMaskSegment mask, Vector< int > &dst) |
| static Span< float3 > | face_normals_if_worthwhile (const Mesh &src_mesh, const int selection_size) |
| static void | copy_loose_vert_hint (const Mesh &src, Mesh &dst) |
| static OffsetIndices< int > | gather_selected_offsets (const OffsetIndices< int > src_offsets, const IndexMaskSegment selection, MutableSpan< int > dst_offsets) |
| static int3 | tri_to_ordered (const int3 tri) |
| static Span< int3 > | tri_to_ordered_tri (MutableSpan< int3 > tris) |
| static IndexMask | face_tris_mask (const OffsetIndices< int > src_faces, const IndexMask &mask, IndexMaskMemory &memory) |
| static IndexMask | tris_in_set (const IndexMask &tri_mask, const OffsetIndices< int > faces, const Span< int > corner_verts, const VectorSet< TriKey, 4, DefaultProbingStrategy, FaceHash, FacesEquality, SimpleVectorSetSlot< TriKey, int > > &unique_tris, IndexMaskMemory &memory) |
| static void | face_keys_to_face_indices (const Span< TriKey > faces, MutableSpan< int > indices) |
| static void | quad_indices_of_tris (const IndexMask &quads, MutableSpan< int > indices) |
| static void | ngon_indices_of_tris (const IndexMask &ngons, const OffsetIndices< int > tris_by_ngon, MutableSpan< int > indices) |
| static bool | sharing_info_equal (const ImplicitSharingInfo *a, const ImplicitSharingInfo *b) |
| template<typename T> | |
| void | mix_with_indices (MutableSpan< T > a, const VArray< T > &b, const Span< int > index_map, const float factor) |
| static void | mix_with_indices (GMutableSpan a, const GVArray &b, const Span< int > index_map, const float factor) |
| template<typename T> | |
| static void | mix (MutableSpan< T > a, const VArray< T > &b, const float factor) |
| static void | mix (GMutableSpan a, const GVArray &b, const float factor) |
| static void | mix_attributes (bke::MutableAttributeAccessor attributes_a, const bke::AttributeAccessor b_attributes, const Span< int > index_map, const bke::AttrDomain mix_domain, const float factor, const Set< std::string > &names_to_skip={}) |
| static Array< int > | create_id_index_map (const bke::AttributeAccessor attributes_a, const bke::AttributeAccessor b_attributes, const bke::AttrDomain id_domain) |
| static void | mix_socket_values_same_type (bke::SocketValueVariant &a, const bke::SocketValueVariant &b, const float factor) |
| static void | mix_bundle_items (nodes::BundleItemValue &a, const nodes::BundleItemValue &b, const float factor) |
| static Array< int > | get_permutation (const int length, const int seed) |
| static Array< int > | invert_permutation (const Span< int > permutation) |
| static int | seed_from_mesh (const Mesh &mesh) |
| static int | seed_from_pointcloud (const PointCloud &pointcloud) |
| static int | seed_from_curves (const bke::CurvesGeometry &curves) |
| static int | seed_from_instances (const bke::Instances &instances) |
| static void | reorder_customdata (CustomData &data, const Span< int > new_by_old_map) |
| static void | reorder_attribute_domain (bke::AttributeStorage &data, const bke::AttrDomain domain, const Span< int > new_by_old_map) |
| static Array< int > | make_new_offset_indices (const OffsetIndices< int > old_offsets, const Span< int > old_by_new_map) |
| static void | reorder_customdata_groups (CustomData &data, const OffsetIndices< int > old_offsets, const OffsetIndices< int > new_offsets, const Span< int > new_by_old_map) |
| static void | reorder_attribute_groups (bke::AttributeStorage &storage, const bke::AttrDomain domain, const OffsetIndices< int > old_offsets, const OffsetIndices< int > new_offsets, const Span< int > new_by_old_map) |
| static bool | valid_int_num (const int64_t num) |
| static int64_t | get_final_points_num (const GatherTasks &tasks) |
| static bool | skip_transform (const float4x4 &transform) |
| static void | threaded_copy (const GVArray &src, GMutableSpan dst) |
| static void | threaded_fill (const GPointer value, GMutableSpan dst) |
| static void | copy_generic_attributes_to_result (const Span< std::optional< GVArray > > src_attributes, const AttributeFallbacksArray &attribute_fallbacks, const OrderedAttributes &ordered_attributes, const FunctionRef< IndexRange(bke::AttrDomain)> &range_fn, MutableSpan< GSpanAttributeWriter > dst_attribute_writers) |
| static void | create_result_ids (const RealizeInstancesOptions &options, const VArray< int > &stored_ids, const int task_id, MutableSpan< int > dst_ids) |
| static VectorSet< int > | gather_all_fill_ids (const VArray< int > &fill_ids) |
| static bool | try_join_single_value_attribute (const int tasks_num, const OrderedAttributes &ordered_attributes, const FunctionRef< TaskAttrInfo(int)> get_task_attributes, const int attr_index, bke::MutableAttributeAccessor dst_attributes) |
| static void | reorder_attributes_group_to_group (const bke::AttributeAccessor src_attributes, const bke::AttrDomain domain, const OffsetIndices< int > src_offsets, const OffsetIndices< int > dst_offsets, const Span< int > old_by_new_map, const bke::AttributeFilter &attribute_filter, bke::MutableAttributeAccessor dst_attributes) |
| static Array< int > | invert_permutation (const Span< int > permutation) |
| static void | copy_and_reorder_mesh_verts (const Mesh &src_mesh, const Span< int > old_by_new_map, const bke::AttributeFilter &attribute_filter, Mesh &dst_mesh) |
| static void | copy_and_reorder_mesh_edges (const Mesh &src_mesh, const Span< int > old_by_new_map, const bke::AttributeFilter &attribute_filter, Mesh &dst_mesh) |
| static void | copy_and_reorder_mesh_faces (const Mesh &src_mesh, const Span< int > old_by_new_map, const bke::AttributeFilter &attribute_filter, Mesh &dst_mesh) |
| static void | copy_and_reorder_mesh (const Mesh &src_mesh, const Span< int > old_by_new_map, const bke::AttrDomain domain, const bke::AttributeFilter &attribute_filter, Mesh &dst_mesh) |
| static void | copy_and_reorder_points (const PointCloud &src_pointcloud, const Span< int > old_by_new_map, const bke::AttributeFilter &attribute_filter, PointCloud &dst_pointcloud) |
| static void | copy_and_reorder_curves (const bke::CurvesGeometry &src_curves, const Span< int > old_by_new_map, const bke::AttributeFilter &attribute_filter, bke::CurvesGeometry &dst_curves) |
| static void | copy_and_reorder_instaces (const bke::Instances &src_instances, const Span< int > old_by_new_map, const bke::AttributeFilter &attribute_filter, bke::Instances &dst_instances) |
| template<typename T, typename Func> | |
| static void | parallel_transform (MutableSpan< T > values, const int64_t grain_size, const Func &func) |
| static void | grouped_sort (const OffsetIndices< int > offsets, const Span< float > weights, MutableSpan< int > indices) |
| static void | find_points_by_group_index (const Span< int > indices, MutableSpan< int > r_offsets, MutableSpan< int > r_indices) |
| static int | identifiers_to_indices (MutableSpan< int > r_identifiers_to_indices) |
| static fn::Field< int > | get_count_input_max_one (const fn::Field< int > &count_field) |
| static int | get_count_from_length (const float curve_length, const float sample_length, const bool keep_last_segment) |
| static fn::Field< int > | get_count_input_from_length (const fn::Field< float > &length_field, const bool keep_last_segment) |
| static bool | interpolate_attribute_to_curves (const StringRef name, const std::array< int, CURVE_TYPES_NUM > &type_counts) |
| static bool | interpolate_attribute_to_poly_curve (const StringRef name) |
| static void | retrieve_attribute_spans (const Span< StringRef > names, const CurvesGeometry &src_curves, CurvesGeometry &dst_curves, Vector< GVArraySpan > &src_arrays, Vector< GMutableSpan > &dst_arrays, Vector< bke::GSpanAttributeWriter > &dst_writers) |
| static void | gather_point_attributes_to_interpolate (const CurvesGeometry &src_curves, CurvesGeometry &dst_curves, AttributesForResample &result, const ResampleCurvesOutputAttributeIDs &output_ids) |
| static void | copy_or_defaults_for_unselected_curves (const CurvesGeometry &src_curves, const IndexMask &unselected_curves, const AttributesForResample &attributes, CurvesGeometry &dst_curves) |
| static void | normalize_span (MutableSpan< float3 > data) |
| static void | normalize_curve_point_data (const IndexMaskSegment curve_selection, const OffsetIndices< int > points_by_curve, MutableSpan< float3 > data) |
| static void | resample_to_uniform (const CurvesGeometry &src_curves, const IndexMask &selection, const ResampleCurvesOutputAttributeIDs &output_ids, CurvesGeometry &dst_curves) |
| static CurvesGeometry | resample_to_uniform (const CurvesGeometry &src_curves, const fn::FieldContext &field_context, const fn::Field< bool > &selection_field, const fn::Field< int > &count_field, const ResampleCurvesOutputAttributeIDs &output_ids) |
| static int2 | uv_to_cell (const float2 &uv, const int resolution) |
| static Bounds< int2 > | tri_to_cell_bounds (const int3 &tri, const int resolution, const Span< float2 > uv_map) |
| static void | sort_tris_into_rows (const Span< float2 > uv_map, const Span< int3 > corner_tris, const int resolution, threading::EnumerableThreadSpecific< LocalData > &data_per_thread) |
| static void | finish_rows (const Span< int > all_ys, const Span< const LocalData * > local_data_vec, const Bounds< int > y_bounds, ReverseUVSampler::LookupGrid &lookup_grid) |
| static Span< int > | lookup_tris_in_cell (const int2 cell, const ReverseUVSampler::LookupGrid &lookup_grid) |
| static std::optional< bke::CurvesGeometry > | separate_curves_selection (const bke::CurvesGeometry &src_curves, const fn::FieldContext &field_context, const fn::Field< bool > &selection_field, const AttrDomain domain, const bke::AttributeFilter &attribute_filter) |
| static std::optional< PointCloud * > | separate_pointcloud_selection (const PointCloud &src_pointcloud, const fn::Field< bool > &selection_field, const bke::AttributeFilter &attribute_filter) |
| static void | delete_selected_instances (bke::GeometrySet &geometry_set, const fn::Field< bool > &selection_field, const bke::AttributeFilter &attribute_filter) |
| static std::optional< Mesh * > | separate_mesh_selection (const Mesh &mesh, const fn::Field< bool > &selection_field, const AttrDomain selection_domain, const GeometryNodeDeleteGeometryMode mode, const bke::AttributeFilter &attribute_filter) |
| static std::optional< GreasePencil * > | separate_grease_pencil_layer_selection (const GreasePencil &src_grease_pencil, const fn::Field< bool > &selection_field, const bke::AttributeFilter &attribute_filter) |
| static bool | is_nurbs_to_bezier_one_to_one (const KnotsMode knots_mode) |
| template<typename T> | |
| static void | scale_input_assign (const Span< T > src, const int scale, const int offset, MutableSpan< T > 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) |
| 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 bke::CurvesGeometry | convert_curves_to_bezier (const bke::CurvesGeometry &src_curves, const IndexMask &selection, const bke::AttributeFilter &attribute_filter) |
| static bke::CurvesGeometry | convert_curves_to_nurbs (const bke::CurvesGeometry &src_curves, const IndexMask &selection, const bke::AttributeFilter &attribute_filter) |
| static bke::CurvesGeometry | convert_curves_trivial (const bke::CurvesGeometry &src_curves, const IndexMask &selection, const CurveType dst_type) |
| static bke::CurvesGeometry | convert_curves_to_catmull_rom_or_poly (const bke::CurvesGeometry &src_curves, const IndexMask &selection, const CurveType dst_type, const bke::AttributeFilter &attribute_filter, const ConvertCurvesOptions &options) |
| static bke::CurvesGeometry | convert_bezier_or_catmull_rom_to_poly_before_conversion_to_nurbs (const bke::CurvesGeometry &src_curves, const IndexMask &selection, const ConvertCurvesOptions &options) |
| template<typename T> | |
| float | perpendicular_distance (const Span< float3 > positions, const Span< T > attribute_data, const int64_t first_index, const int64_t last_index, const int64_t index) |
| template<typename T> | |
| static void | ramer_douglas_peucker (const IndexRange range, const Span< float3 > positions, const float epsilon, const Span< T > attribute_data, MutableSpan< bool > points_to_delete) |
| template<typename T> | |
| static void | curve_simplify (const Span< float3 > positions, const bool cyclic, const float epsilon, const Span< T > attribute_data, MutableSpan< bool > points_to_delete) |
| template<typename T> | |
| static void | gaussian_blur_1D (const Span< T > src, const int iterations, const VArray< float > &influence_by_point, const bool smooth_ends, const bool keep_shape, const bool is_cyclic, MutableSpan< T > dst) |
| static void | calculate_result_offsets (const bke::CurvesGeometry &src_curves, const IndexMask &selection, const IndexMask &unselected, 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 OffsetIndices< int > src_points_by_curve, const OffsetIndices< int > dst_points_by_curve, const IndexMask &selection, const Span< int > all_point_offsets, const Span< T > src, MutableSpan< T > dst) |
| static void | subdivide_attribute_linear (const OffsetIndices< int > src_points_by_curve, const OffsetIndices< int > dst_points_by_curve, const IndexMask &selection, const Span< int > all_point_offsets, const GSpan src, GMutableSpan dst) |
| static void | subdivide_attribute_catmull_rom (const OffsetIndices< int > src_points_by_curve, const OffsetIndices< int > dst_points_by_curve, const IndexMask &selection, const Span< int > all_point_offsets, const Span< bool > cyclic, const GSpan src, GMutableSpan dst) |
| static HandleType | aligned_or_free_handle_type (const HandleType type) |
| 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, const int dst_next_segment_start, 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) |
| 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 OffsetIndices< 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) |
| static void | translate_positions (MutableSpan< float3 > positions, const float3 &translation) |
| static void | translate_pointcloud (PointCloud &pointcloud, const float3 translation) |
| static void | transform_pointcloud (PointCloud &pointcloud, const float4x4 &transform) |
| static void | translate_greasepencil (GreasePencil &grease_pencil, const float3 translation) |
| static void | transform_greasepencil (GreasePencil &grease_pencil, const float4x4 &transform) |
| static void | translate_instances (bke::Instances &instances, const float3 translation) |
| static void | transform_instances (bke::Instances &instances, const float4x4 &transform) |
| static void | transform_volume (Volume &volume, const float4x4 &transform, TransformGeometryErrors &r_errors) |
| static void | translate_volume (Volume &volume, const float3 translation) |
| static void | transform_curve_edit_hints (bke::CurvesEditHints &edit_hints, const float4x4 &transform) |
| static void | transform_grease_pencil_edit_hints (bke::GreasePencilEditHints &edit_hints, const float4x4 &transform) |
| static void | transform_gizmo_edit_hints (bke::GizmoEditHints &edit_hints, const float4x4 &transform) |
| static void | translate_curve_edit_hints (bke::CurvesEditHints &edit_hints, const float3 &translation) |
| static void | translate_gizmos_edit_hints (bke::GizmoEditHints &edit_hints, const float3 &translation) |
| static float | dist_signed_squared_to_edge (const float2 probe, const float2 uva, const float2 uvb) |
| static float | get_aspect_scaled_extent (const rctf &extent, const UVPackIsland_Params ¶ms) |
| static float | get_aspect_scaled_area (const rctf &extent, const UVPackIsland_Params ¶ms) |
| static bool | is_larger (const rctf &a, const rctf &b, const UVPackIsland_Params ¶ms) |
| static bool | can_rotate (const Span< PackIsland * > islands, const UVPackIsland_Params ¶ms) |
| static float2 | sincos_rotate_90 (const float2 &sincos) |
| static float2 | sincos_wrap (const float2 &sincos) |
| static float2 | sincos_plusminus_90 (const float2 &sincos) |
| static void | transformation_from_sincos (const float2 &sincos, const float aspect_y, float r_matrix[2][2]) |
| static void | inverse_transformation_from_sincos (const float2 &sincos, const float aspect_y, float r_matrix[2][2]) |
| static void | pack_islands_alpaca_turbo (const int64_t exclude_index, const rctf &exclude, const Span< std::unique_ptr< UVAABBIsland > > islands, const float target_aspect_y, MutableSpan< UVPhi > r_phis, rctf *r_extent) |
| static void | update_hole_rotate (float2 &hole, float2 &hole_diagonal, bool &hole_rotate, const float u0, const float v0, const float u1, const float v1) |
| static void | pack_islands_alpaca_rotate (const int64_t exclude_index, const rctf &exclude, const Span< std::unique_ptr< UVAABBIsland > > islands, const float target_aspect_y, MutableSpan< UVPhi > r_phis, rctf *r_extent) |
| static void | pack_islands_fast (const int64_t exclude_index, const rctf &exclude, const Span< std::unique_ptr< UVAABBIsland > > aabbs, const bool rotate, const float target_aspect_y, MutableSpan< UVPhi > r_phis, rctf *r_extent) |
| static void | pack_gobel (const Span< std::unique_ptr< UVAABBIsland > > aabbs, const float scale, const int m, MutableSpan< UVPhi > r_phis) |
| static bool | pack_islands_optimal_pack_table (const int table_count, const float max_extent, const float *optimal, const char *, int64_t island_count, const float large_uv, const Span< std::unique_ptr< UVAABBIsland > > aabbs, const UVPackIsland_Params ¶ms, MutableSpan< UVPhi > r_phis, rctf *r_extent) |
| static void | pack_islands_optimal_pack (const Span< std::unique_ptr< UVAABBIsland > > aabbs, const UVPackIsland_Params ¶ms, MutableSpan< UVPhi > r_phis, rctf *r_extent) |
| static void | pack_island_box_pack_2d (const Span< std::unique_ptr< UVAABBIsland > > aabbs, const UVPackIsland_Params ¶ms, MutableSpan< UVPhi > r_phis, rctf *r_extent) |
| static float | signed_distance_fat_triangle (const float2 probe, const float2 uv0, const float2 uv1, const float2 uv2) |
| static UVPhi | find_best_fit_for_island (const PackIsland *island, const int scan_line, const Occupancy &occupancy, const float scale, const int angle_90_multiple, const float margin, const float target_aspect_y) |
| static float | guess_initial_scale (const Span< PackIsland * > islands, const float scale, const float margin) |
| static bool | rotate_inside_square (const Span< std::unique_ptr< UVAABBIsland > > island_indices, const Span< PackIsland * > islands, const UVPackIsland_Params ¶ms, const float scale, const float margin, MutableSpan< UVPhi > r_phis, rctf *r_extent) |
| static int64_t | pack_island_xatlas (const Span< std::unique_ptr< UVAABBIsland > > island_indices, const Span< PackIsland * > islands, const float scale, const float margin, const UVPackIsland_Params ¶ms, MutableSpan< UVPhi > r_phis, rctf *r_extent) |
| static float | pack_islands_scale_margin (const Span< PackIsland * > islands, const float scale, const float margin, const UVPackIsland_Params ¶ms, MutableSpan< UVPhi > r_phis) |
| static float | pack_islands_margin_fraction (const Span< PackIsland * > islands, const float margin_fraction, const bool rescale_margin, const UVPackIsland_Params ¶ms) |
| static float | calc_margin_from_aabb_length_sum (const Span< PackIsland * > island_vector, const UVPackIsland_Params ¶ms) |
| static bool | can_rotate_with_method (const PackIsland &island, const UVPackIsland_Params ¶ms, const eUVPackIsland_RotationMethod rotate_method) |
| static float | p_chart_minimum_area_angle (PChart *chart) |
| static PHash * | phash_new (PHashLink **list, int sizehint) |
| static void | phash_safe_delete (PHash **pph) |
| static int | phash_size (PHash *ph) |
| static void | phash_insert (PHash *ph, PHashLink *link) |
| static PHashLink * | phash_lookup (PHash *ph, PHashKey key) |
| static PHashLink * | phash_next (PHash *ph, PHashKey key, PHashLink *link) |
| static void | fix_large_angle (const float v_fix[3], const float v1[3], const float v2[3], double *r_fix, double *r_a1, double *r_a2) |
| static void | p_triangle_angles (const float v1[3], const float v2[3], const float v3[3], double *r_a1, double *r_a2, double *r_a3) |
| static void | p_face_angles (PFace *f, double *r_a1, double *r_a2, double *r_a3) |
| static float | p_vec_cos (const float v1[3], const float v2[3], const float v3[3]) |
| static void | p_triangle_cos (const float v1[3], const float v2[3], const float v3[3], float *r_cos1, float *r_cos2, float *r_cos3) |
| static void UNUSED_FUNCTION | p_face_cos (PFace *f, float *r_cos1, float *r_cos2, float *r_cos3) |
| static float | p_face_area (PFace *f) |
| static float | p_area_signed (const float v1[2], const float v2[2], const float v3[2]) |
| static float | p_face_uv_area_signed (PFace *f) |
| static float | p_edge_length (PEdge *e) |
| static float | p_edge_length_squared (PEdge *e) |
| static float | p_edge_uv_length (PEdge *e) |
| static void | p_chart_uv_bbox (PChart *chart, float minv[2], float maxv[2]) |
| static float | p_chart_uv_area (PChart *chart) |
| static void | p_chart_uv_scale (PChart *chart, const float scale) |
| static void | uv_parametrizer_scale_x (ParamHandle *phandle, const float scale_x) |
| static void | p_chart_uv_rotate (PChart *chart, float angle) |
| static void | p_chart_uv_translate (PChart *chart, const float trans[2]) |
| static void | p_chart_uv_transform (PChart *chart, const float mat[2][2]) |
| static void | p_chart_uv_to_array (PChart *chart, MutableSpan< float2 > points) |
| static bool | p_intersect_line_2d_dir (const float v1[2], const float dir1[2], const float v2[2], const float dir2[2], float r_isect[2]) |
| static PEdge * | p_wheel_edge_next (PEdge *e) |
| static const PEdge * | p_wheel_edge_next (const PEdge *e) |
| static PEdge * | p_wheel_edge_prev (PEdge *e) |
| static PEdge * | p_boundary_edge_next (PEdge *e) |
| static PEdge * | p_boundary_edge_prev (PEdge *e) |
| static bool | p_vert_interior (PVert *v) |
| static void | p_face_flip (PFace *f) |
| static void | p_vert_load_pin_select_uvs (ParamHandle *handle, PVert *v) |
| static void | p_flush_uvs (ParamHandle *handle, PChart *chart) |
| static void | p_face_backup_uvs (PFace *f) |
| static void | p_face_restore_uvs (PFace *f) |
| static PVert * | p_vert_add (ParamHandle *handle, PHashKey key, const float co[3], const float weight, PEdge *e) |
| static PVert * | p_vert_lookup (ParamHandle *handle, PHashKey key, const float co[3], const float weight, PEdge *e) |
| static PVert * | p_vert_copy (ParamHandle *handle, PVert *v) |
| static PEdge * | p_edge_lookup (ParamHandle *handle, const PHashKey *vkeys) |
| static int | p_face_exists (ParamHandle *handle, const ParamKey *pvkeys, int i1, int i2, int i3) |
| static bool | p_edge_implicit_seam (PEdge *e, PEdge *ep) |
| static bool | p_edge_has_pair (ParamHandle *handle, PEdge *e, bool topology_from_uvs, PEdge **r_pair) |
| static bool | p_edge_connect_pair (ParamHandle *handle, PEdge *e, bool topology_from_uvs, PEdge ***stack) |
| static int | p_connect_pairs (ParamHandle *handle, bool topology_from_uvs) |
| static void | p_split_vert (ParamHandle *handle, PChart *chart, PEdge *e) |
| static PChart ** | p_split_charts (ParamHandle *handle, PChart *chart, int ncharts) |
| static PFace * | p_face_add (ParamHandle *handle) |
| static PFace * | p_face_add_construct (ParamHandle *handle, ParamKey key, const ParamKey *vkeys, const float **co, float **uv, const float *weight, int i1, int i2, int i3, const bool *pin, const bool *select) |
| static PFace * | p_face_add_fill (ParamHandle *handle, PChart *chart, PVert *v1, PVert *v2, PVert *v3) |
| static void | p_chart_boundaries (PChart *chart, PEdge **r_outer) |
| static void | p_polygon_calc_tris (ParamHandle *handle, const float **co, uint(**r_tris)[3], uint nverts) |
| static void | p_chart_fill_boundary (ParamHandle *handle, PChart *chart, MutableSpan< PEdge * > border_edges, const float **co) |
| static void | p_chart_fill_boundaries (ParamHandle *handle, PChart *chart, const PEdge *outer) |
| static void | p_vert_fix_edge_pointer (PVert *v) |
| static void | p_collapsing_verts (PEdge *edge, PEdge *pair, PVert **r_newv, PVert **r_keepv) |
| static void | p_collapse_edge (PEdge *edge, PEdge *pair) |
| static bool | p_collapse_allowed_topologic (PEdge *edge, PEdge *pair) |
| static void | p_collapse_cost_vertex (PVert *vert, float *r_mincost, PEdge **r_mine, const std::function< float(PEdge *, PEdge *)> &collapse_cost_fn, const std::function< float(PEdge *, PEdge *)> &collapse_allowed_fn) |
| static void | p_chart_post_collapse_flush (PChart *chart, PEdge *collapsed) |
| static void | p_chart_simplify_compute (PChart *chart, std::function< float(PEdge *, PEdge *)> collapse_cost_fn, std::function< float(PEdge *, PEdge *)> collapse_allowed_fn) |
| static void | p_abf_setup_system (PAbfSystem *sys) |
| static void | p_abf_compute_sines (PAbfSystem *sys) |
| static float | p_abf_compute_sin_product (PAbfSystem *sys, PVert *v, int aid) |
| static float | p_abf_compute_grad_alpha (PAbfSystem *sys, PFace *f, PEdge *e) |
| static float | p_abf_compute_gradient (PAbfSystem *sys, PChart *chart) |
| static void | p_abf_adjust_alpha (PAbfSystem *sys, const int id, const float dlambda1, const float pre) |
| static bool | p_abf_matrix_invert (PAbfSystem *sys, PChart *chart) |
| static bool | p_chart_abf_solve (PChart *chart) |
| static void | p_chart_pin_positions (PChart *chart, PVert **pin1, PVert **pin2) |
| static bool | p_chart_symmetry_pins (PChart *chart, PEdge *outer, PVert **pin1, PVert **pin2) |
| static void | p_chart_extrema_verts (PChart *chart, PVert **pin1, PVert **pin2) |
| static void | p_chart_orig_bounds_init (PChart *chart) |
| static void | p_chart_lscm_begin (PChart *chart, bool live, bool abf, const bool use_original_bounds) |
| static bool | p_chart_lscm_solve (ParamHandle *handle, PChart *chart) |
| static void | p_chart_lscm_transform_single_pin (PChart *chart) |
| static void | p_chart_lscm_end (PChart *chart) |
| static void | p_stretch_pin_boundary (PChart *chart) |
| static float | p_face_stretch (PFace *f) |
| static float | p_stretch_compute_vertex (PVert *v) |
| static void | p_chart_stretch_minimize (PChart *chart, RNG *rng) |
| static int | p_compare_geometric_uv (const void *a, const void *b) |
| static bool | p_chart_convex_hull (PChart *chart, PVert ***r_verts, int *r_nverts, int *r_right) |
| static float | p_rectangle_area (float *p1, float *dir, float *p2, float *p3, float *p4) |
| static void | p_chart_rotate_minimum_area (PChart *chart) |
| static void | p_chart_rotate_fit_aabb (PChart *chart) |
| static GeoUVPinIndex * | new_geo_uv_pinindex (ParamHandle *handle, const float uv[2]) |
| static void | p_add_ngon (ParamHandle *handle, const ParamKey key, const int nverts, const ParamKey *vkeys, const float **co, float **uv, const float *weight, const bool *pin, const bool *select) |
Merge Map Creation | |
| std::optional< Mesh * > | mesh_merge_by_distance_all (const Mesh &mesh, const IndexMask &selection, float merge_distance, const bke::AttributeFilter &attribute_filter=bke::AttributeFilter::default_filter()) |
| std::optional< Mesh * > | mesh_merge_by_distance_connected (const Mesh &mesh, Span< bool > selection, float merge_distance, bool only_loose_edges, const bke::AttributeFilter &attribute_filter=bke::AttributeFilter::default_filter()) |
| Mesh * | mesh_merge_verts (const Mesh &mesh, Span< int > vert_src_to_target, int removed_verts_num, bool do_mix_data) |
Realize Instances | |
| RealizeInstancesResult | realize_instances (bke::GeometrySet geometry_set, const RealizeInstancesOptions &options) |
| RealizeInstancesResult | realize_instances (bke::GeometrySet geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option) |
| static void | remove_id_attribute_from_instances (bke::GeometrySet &geometry_set) |
| static void | propagate_instances_to_keep (const bke::GeometrySet &geometry_set, const IndexMask &selection, bke::GeometrySet &new_geometry_set, const bke::AttributeFilter &attribute_filter) |
Public API | |
| bke::CurvesGeometry | trim_curves (const bke::CurvesGeometry &src_curves, const IndexMask &selection, const VArray< float > &starts, const VArray< float > &ends, GeometryNodeCurveSampleMode mode, const bke::AttributeFilter &attribute_filter) |
Chart Construction: | |
Faces and seams may only be added between #ParamHandle::ParamHandle() and #geometry::uv_parametrizer_construct_end. The pointers to co and uv are stored, rather than being copied. Vertices are implicitly created. In #geometry::uv_parametrizer_construct_end the mesh will be split up according to the seams. The resulting charts must be manifold, connected and open (at least one boundary loop). The output will be written to the uv pointers. | |
| void | uv_parametrizer_aspect_ratio (ParamHandle *handle, float aspect_y) |
| void | uv_prepare_pin_index (ParamHandle *handle, const int bmvertindex, const float uv[2]) |
| ParamKey | uv_find_pin_index (ParamHandle *handle, const int bmvertindex, const float uv[2]) |
| void | uv_parametrizer_face_add (ParamHandle *handle, const ParamKey key, const int nverts, const ParamKey *vkeys, const float **co, float **uv, const float *weight, const bool *pin, const bool *select) |
| void | uv_parametrizer_edge_set_seam (ParamHandle *phandle, const ParamKey *vkeys) |
| void | uv_parametrizer_construct_end (ParamHandle *phandle, bool fill_holes, bool topology_from_uvs, int *r_count_failed=nullptr) |
SLIM: | |
| |
| void | uv_parametrizer_slim_solve (ParamHandle *phandle, const ParamSlimOptions *slim_options, bool use_original_bounds, int *count_changed, int *count_failed) |
| void | uv_parametrizer_slim_live_begin (ParamHandle *phandle, const ParamSlimOptions *slim_options) |
| void | uv_parametrizer_slim_live_solve_iteration (ParamHandle *phandle) |
| void | uv_parametrizer_slim_live_end (ParamHandle *phandle) |
| void | uv_parametrizer_slim_stretch_iteration (ParamHandle *phandle, float blend) |
| bool | uv_parametrizer_is_slim (const ParamHandle *phandle) |
Least Squares Conformal Maps: | |
Charts with less than two pinned vertices are assigned two pins. LSCM is divided to three steps:
UV coordinates are allowed to change within begin/end, for quick re-solving. | |
| void | uv_parametrizer_lscm_begin (ParamHandle *handle, bool live, bool abf, bool use_original_bounds) |
| void | uv_parametrizer_lscm_solve (ParamHandle *handle, int *count_changed, int *count_failed) |
| void | uv_parametrizer_lscm_end (ParamHandle *handle) |
Stretch | |
| void | uv_parametrizer_stretch_begin (ParamHandle *handle) |
| void | uv_parametrizer_stretch_blend (ParamHandle *handle, float blend) |
| void | uv_parametrizer_stretch_iter (ParamHandle *handle) |
| void | uv_parametrizer_stretch_end (ParamHandle *handle) |
Packing | |
| void | uv_parametrizer_pack (ParamHandle *handle, const UVPackIsland_Params ¶ms) |
Original Bounds | |
| void | uv_parametrizer_original_bounds (ParamHandle *phandle) |
Average area for all charts | |
| void | uv_parametrizer_average (ParamHandle *handle, bool ignore_pinned, bool scale_uv, bool shear) |
Flushing | |
| void | uv_parametrizer_flush (ParamHandle *handle) |
| void | uv_parametrizer_flush_restore (ParamHandle *handle) |
Vert API | |
| static Array< bool > | find_affected_verts (const Span< int > vert_src_to_target) |
Edge API | |
| static IndexMask | find_collapsed_and_weld_edges (const Span< int2 > edges, const Span< int > vert_src_to_target, const Span< bool > vert_affected, IndexMaskMemory &memory, MutableSpan< int > r_edge_src_to_target, int *r_collapsed_edges_num) |
| static int | find_duplicate_edges (const Span< int2 > edges, const Span< int > vert_src_to_target, const IndexMask &weld_edges, const int verts_num, MutableSpan< int > r_edge_src_to_target) |
Poly and Loop API | |
| static void | weld_face_corner_ctx_alloc (const OffsetIndices< int > faces, const Span< int > corner_verts, WeldMesh *r_weld_mesh) |
| static void | weld_face_split_recursive (int face_size, const Span< int > corner_verts, WeldFace *r_wp, WeldMesh *r_weld_mesh, RemovedFacesAndCorners &r_removed) |
| static int | collapse_weld_face (const Span< int > corner_edges, const Span< int > edge_src_to_target, WeldFace &weld_face, MutableSpan< int > corner_next, RemovedFacesAndCorners &r_removed) |
| static void | weld_face_corner_ctx_setup_collapsed_and_split (const Span< int > corner_verts, const Span< int > corner_edges, const int remaining_edge_ctx_num, WeldMesh *r_weld_mesh) |
| static void | weld_face_find_doubles (const Span< int > corner_verts, WeldMesh *r_weld_mesh) |
Mesh API | |
| static void | weld_mesh_context_create (const Mesh &mesh, const Span< int > vert_src_to_target, const Span< bool > vert_affected, const int removed_verts_num, WeldMesh *r_weld_mesh) |
Merging | |
| static IndexMask | merge_survivors (const Span< int > src_to_target, IndexMaskMemory &memory) |
| static MergePropagationMap | merge_propagation_map (const Span< int > src_to_target, const IndexMask &survivors, const Span< int > src_to_dst, const bool do_mix_data, IndexMaskMemory &memory) |
| static Array< int > | merge_src_to_dst_map (const Span< int > src_to_target, const IndexMask &survivors) |
Mesh Vertex Merging | |
| static void | copy_and_mix_attributes (const bke::AttributeAccessor src_attributes, const bke::AttrDomain domain, const bke::AttributeFilter &attribute_filter, const MergePropagationMap &map, bke::MutableAttributeAccessor dst_attributes) |
| static void | mix_vertex_groups (const Mesh &mesh_src, const MergePropagationMap &map, Mesh &mesh_dst) |
| static Set< StringRef > | get_vertex_group_names (const Mesh &mesh) |
| static Mesh * | create_merged_mesh (const Mesh &mesh, const Span< int > vert_src_to_target, const int removed_vertex_count, const bool do_mix_data, const bke::AttributeFilter &attribute_filter) |
Gather Realize Tasks | |
| static void | gather_realize_tasks_recursive (GatherTasksInfo &gather_info, const int current_depth, const int target_depth, const bke::GeometrySet &geometry_set, const float4x4 &base_transform, const InstanceContext &base_instance_context) |
| static Vector< AttrFallbackData > | prepare_attribute_fallbacks (GatherTasksInfo &gather_info, const Instances &instances, const OrderedAttributes &ordered_attributes) |
| static void | foreach_geometry_in_reference (const InstanceReference &reference, const float4x4 &base_transform, const uint32_t id, FunctionRef< void(const bke::GeometrySet &geometry_set, const float4x4 &transform, uint32_t id)> fn) |
| static void | gather_realize_tasks_for_instances (GatherTasksInfo &gather_info, const int current_depth, const int target_depth, const Instances &instances, const float4x4 &base_transform, const InstanceContext &base_instance_context) |
| static void | gather_attribute_propagation_components (const bke::GeometrySet &geometry, const bke::GeometryComponent::Type component_type, const RealizeInstancesOptions &options, const int current_depth, const std::optional< int > max_depth, Set< bke::GeometryComponentPtr > &r_components) |
| static void | gather_attribute_propagation_components_with_custom_depths (const bke::GeometrySet &geometry, const bke::GeometryComponent::Type component_type, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option, Set< bke::GeometryComponentPtr > &r_components) |
| static bke::GeometrySet::GatheredAttributes | gather_attributes_to_propagate (const bke::GeometrySet &geometry, const bke::GeometryComponent::Type component_type, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option) |
Instance | |
| static OrderedAttributes | gather_generic_instance_attributes_to_propagate (const bke::GeometrySet &in_geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option) |
| static void | execute_instances_tasks (const Span< bke::GeometryComponentPtr > src_components, const Span< float4x4 > src_base_transforms, const OrderedAttributes &all_instances_attributes, const Span< geometry::AttributeFallbacksArray > attribute_fallback, bke::GeometrySet &r_realized_geometry) |
Point Cloud | |
| static OrderedAttributes | gather_generic_pointcloud_attributes_to_propagate (const bke::GeometrySet &in_geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option, bool &r_create_radii, bool &r_create_id) |
| static void | gather_pointclouds_to_realize (const bke::GeometrySet &geometry_set, VectorSet< const PointCloud * > &r_pointclouds) |
| static AllPointCloudsInfo | preprocess_pointclouds (const bke::GeometrySet &geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option) |
| static void | execute_realize_pointcloud_task (const RealizeInstancesOptions &options, const RealizePointCloudTask &task, const OrderedAttributes &ordered_attributes, MutableSpan< GSpanAttributeWriter > dst_attribute_writers, MutableSpan< float > all_dst_radii, MutableSpan< int > all_dst_ids, MutableSpan< float3 > all_dst_positions) |
| static void | add_instance_attributes_to_single_geometry (const OrderedAttributes &ordered_attributes, const AttributeFallbacksArray &attribute_fallbacks, bke::MutableAttributeAccessor attributes) |
| static void | execute_realize_pointcloud_tasks (const RealizeInstancesOptions &options, const GatherOffsets &offsets, const AllPointCloudsInfo &all_pointclouds_info, const Span< RealizePointCloudTask > tasks, const OrderedAttributes &ordered_attributes, RealizeInstancesResult &r_result) |
Mesh | |
| static OrderedAttributes | gather_generic_mesh_attributes_to_propagate (const bke::GeometrySet &in_geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option, bool &r_create_id, bool &r_create_material_index) |
| static void | gather_meshes_to_realize (const bke::GeometrySet &geometry_set, VectorSet< const Mesh * > &r_meshes) |
| static AllMeshesInfo | preprocess_meshes (const bke::GeometrySet &geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option) |
| static void | execute_realize_mesh_task (const RealizeInstancesOptions &options, const RealizeMeshTask &task, const OrderedAttributes &ordered_attributes, MutableSpan< GSpanAttributeWriter > dst_attribute_writers, MutableSpan< float3 > all_dst_positions, MutableSpan< int2 > all_dst_edges, MutableSpan< int > all_dst_face_offsets, MutableSpan< int > all_dst_corner_verts, MutableSpan< int > all_dst_corner_edges, MutableSpan< int > all_dst_vert_ids, GSpanAttributeWriter &all_dst_custom_normals, MutableSpan< int > all_dst_origindex_vert, MutableSpan< int > all_dst_origindex_edge, MutableSpan< int > all_dst_origindex_face) |
| static void | copy_vertex_group_name (ListBaseT< bDeformGroup > *dst_deform_group, const OrderedAttributes &ordered_attributes, const bDeformGroup &src_deform_group) |
| static void | copy_vertex_group_names (Mesh &dst_mesh, const OrderedAttributes &ordered_attributes, const Span< const Mesh * > src_meshes) |
| static int | get_mapped_material_index (const MeshRealizeInfo &info, const int index) |
| static std::optional< int > | calc_material_index_max_hint (const Span< MeshRealizeInfo > infos) |
| static std::optional< int > | calc_single_value_material_index (const AllMeshesInfo &all_meshes_info) |
| static void | join_mesh_material_indices (const AllMeshesInfo &all_meshes_info, const Span< RealizeMeshTask > tasks, Mesh &dst_mesh) |
| static void | execute_realize_mesh_tasks (const RealizeInstancesOptions &options, const GatherOffsets &offsets, const AllMeshesInfo &all_meshes_info, const Span< RealizeMeshTask > tasks, const OrderedAttributes &ordered_attributes, const VectorSet< Material * > &ordered_materials, RealizeInstancesResult &r_result) |
Curves | |
| static OrderedAttributes | gather_generic_curve_attributes_to_propagate (const bke::GeometrySet &in_geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option, bool &r_create_id, bool &r_create_fill_id) |
| static void | gather_curves_to_realize (const bke::GeometrySet &geometry_set, VectorSet< const Curves * > &r_curves) |
| static AllCurvesInfo | preprocess_curves (const bke::GeometrySet &geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_option) |
| static void | initialize_curves_builtin_attribute_defaults (const AllCurvesInfo &all_curves_info, InstanceContext &attribute_fallbacks) |
| 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< int > all_dst_fill_ids, MutableSpan< float3 > all_handle_left, MutableSpan< float3 > all_handle_right, MutableSpan< float > all_radii, MutableSpan< float3 > all_custom_normals) |
| static void | copy_vertex_group_names (CurvesGeometry &dst_curve, const OrderedAttributes &ordered_attributes, const Span< const Curves * > src_curves) |
| static void | execute_realize_curve_tasks (const RealizeInstancesOptions &options, const GatherOffsets &offsets, const AllCurvesInfo &all_curves_info, const Span< RealizeCurveTask > tasks, const OrderedAttributes &ordered_attributes, RealizeInstancesResult &r_result) |
Grease Pencil | |
| static OrderedAttributes | gather_generic_grease_pencil_attributes_to_propagate (const bke::GeometrySet &in_geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_options) |
| static void | gather_grease_pencils_to_realize (const bke::GeometrySet &geometry_set, VectorSet< const GreasePencil * > &r_grease_pencils) |
| static AllGreasePencilsInfo | preprocess_grease_pencils (const bke::GeometrySet &geometry_set, const RealizeInstancesOptions &options, const VariedDepthOptions &varied_depth_options) |
| static void | execute_realize_grease_pencil_task (const RealizeGreasePencilTask &task, const OrderedAttributes &ordered_attributes, GreasePencil &dst_grease_pencil, MutableSpan< GSpanAttributeWriter > dst_attribute_writers) |
| static void | transform_grease_pencil_layers (Span< bke::greasepencil::Layer * > layers, const float4x4 &transform) |
| static void | execute_realize_grease_pencil_tasks (const AllGreasePencilsInfo &all_grease_pencils_info, const GatherOffsets &offsets, const Span< RealizeGreasePencilTask > tasks, const OrderedAttributes &ordered_attributes, RealizeInstancesResult &r_result) |
Edit Data | |
| static void | execute_realize_edit_data_tasks (const Span< RealizeEditDataTask > tasks, bke::GeometrySet &r_realized_geometry) |
Lookup Curve Points | |
| static bke::curves::CurvePoint | lookup_point_uniform_spacing (const Span< float > lengths, const float sample_length, const bool cyclic, const int resolution, const int num_curve_points) |
| static bke::curves::CurvePoint | lookup_point_polygonal (const Span< float > lengths, const float sample_length, const bool cyclic, const int evaluated_size) |
| static bke::curves::CurvePoint | lookup_point_bezier (const Span< int > bezier_offsets, const Span< float > lengths, const float sample_length, const bool cyclic, const int num_curve_points) |
| static bke::curves::CurvePoint | lookup_point_bezier (const bke::CurvesGeometry &src_curves, const OffsetIndices< int > evaluated_points_by_curve, const int64_t curve_index, const Span< float > accumulated_lengths, const float sample_length, const bool cyclic, const int resolution, const int num_curve_points) |
| static bke::curves::CurvePoint | lookup_curve_point (const bke::CurvesGeometry &src_curves, const OffsetIndices< int > evaluated_points_by_curve, const CurveType curve_type, const int64_t curve_index, const Span< float > accumulated_lengths, const float sample_length, const bool cyclic, const int resolution, const int num_curve_points) |
Utility Functions | |
| static void | fill_bezier_data (bke::CurvesGeometry &dst_curves, const IndexMask &selection) |
| static void | fill_nurbs_data (bke::CurvesGeometry &dst_curves, const IndexMask &selection) |
| template<typename T> | |
| static int64_t | copy_point_data_between_endpoints (const Span< T > src_data, MutableSpan< T > dst_data, const bke::curves::IndexRangeCyclic src_range, int64_t dst_index) |
Sampling Utilities | |
| template<typename T> | |
| static T | interpolate_catmull_rom (const Span< T > src_data, const bke::curves::CurvePoint insertion_point, const bool src_cyclic) |
| static bke::curves::bezier::Insertion | knot_insert_bezier (const Span< float3 > positions, const Span< float3 > handles_left, const Span< float3 > handles_right, const bke::curves::CurvePoint insertion_point) |
Sample Curve Interval (Trim) | |
| template<typename T, bool include_start_point = true> | |
| static void | sample_interval_linear (const Span< T > src_data, MutableSpan< T > dst_data, bke::curves::IndexRangeCyclic src_range, const IndexRange dst_range, const bke::curves::CurvePoint start_point, const bke::curves::CurvePoint end_point) |
| template<typename T> | |
| static void | sample_interval_catmull_rom (const Span< T > src_data, MutableSpan< T > dst_data, bke::curves::IndexRangeCyclic src_range, const IndexRange dst_range, const bke::curves::CurvePoint start_point, const bke::curves::CurvePoint end_point, const bool src_cyclic) |
| template<bool include_start_point = true> | |
| static void | sample_interval_bezier (const Span< float3 > src_positions, 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, 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, bke::curves::IndexRangeCyclic src_range, const IndexRange dst_range, const bke::curves::CurvePoint start_point, const bke::curves::CurvePoint end_point) |
Trim Curves | |
| static void | trim_attribute_linear (const bke::CurvesGeometry &src_curves, bke::CurvesGeometry &dst_curves, const IndexMask &selection, const Span< bke::curves::CurvePoint > start_points, const Span< bke::curves::CurvePoint > end_points, const Span< bke::curves::IndexRangeCyclic > src_ranges, MutableSpan< bke::AttributeTransferData > transfer_attributes) |
| static void | trim_polygonal_curves (const bke::CurvesGeometry &src_curves, bke::CurvesGeometry &dst_curves, const IndexMask &selection, const Span< bke::curves::CurvePoint > start_points, const Span< bke::curves::CurvePoint > end_points, const Span< bke::curves::IndexRangeCyclic > src_ranges, MutableSpan< bke::AttributeTransferData > transfer_attributes) |
| static void | trim_catmull_rom_curves (const bke::CurvesGeometry &src_curves, bke::CurvesGeometry &dst_curves, const IndexMask &selection, const Span< bke::curves::CurvePoint > start_points, const Span< bke::curves::CurvePoint > end_points, const Span< bke::curves::IndexRangeCyclic > src_ranges, MutableSpan< bke::AttributeTransferData > transfer_attributes) |
| static void | trim_bezier_curves (const bke::CurvesGeometry &src_curves, bke::CurvesGeometry &dst_curves, const IndexMask &selection, const Span< bke::curves::CurvePoint > start_points, const Span< bke::curves::CurvePoint > end_points, const Span< bke::curves::IndexRangeCyclic > src_ranges, MutableSpan< bke::AttributeTransferData > transfer_attributes) |
| static void | trim_evaluated_curves (const bke::CurvesGeometry &src_curves, bke::CurvesGeometry &dst_curves, const IndexMask &selection, const Span< bke::curves::CurvePoint > start_points, const Span< bke::curves::CurvePoint > end_points, const Span< bke::curves::IndexRangeCyclic > src_ranges, MutableSpan< bke::AttributeTransferData > transfer_attributes) |
Compute trim parameters | |
| static float | trim_sample_length (const Span< float > accumulated_lengths, const float sample_length, const GeometryNodeCurveSampleMode mode) |
| static void | compute_curve_trim_parameters (const bke::CurvesGeometry &curves, const IndexMask &selection, const VArray< float > &starts, const VArray< float > &ends, const GeometryNodeCurveSampleMode mode, MutableSpan< int > dst_curve_size, MutableSpan< bke::curves::CurvePoint > start_points, MutableSpan< bke::curves::CurvePoint > end_points, MutableSpan< bke::curves::IndexRangeCyclic > src_ranges) |
Implement <tt>pack_islands</tt> | |
| static bool | overlap_aabb (const float2 &pivot_a, const float2 &half_diagonal_a, const float2 &pivot_b, const float2 &half_diagonal_b) |
| static void | finalize_geometry (const Span< PackIsland * > islands, const UVPackIsland_Params ¶ms) |
| float | pack_islands (const Span< PackIsland * > islands, const UVPackIsland_Params ¶ms) |
Variables | |
| static constexpr int | max_neighbors = 5 |
| static constexpr int | P_NGON_STACK_NUM = 32 |
| static int | PHashSizes [] |
Degenerate Geometry Fixing | |
| static const float | CORR_ZERO_AREA_EPS = 1.0e-10f |
| static void | p_chart_flush_collapsed_uvs (PChart *chart) |
| static bool | p_collapse_doubles_allowed (PEdge *edge, PEdge *pair, float threshold_squared) |
| static float | p_collapse_doubles_cost (PEdge *edge, PEdge *pair) |
| static void UNUSED_FUNCTION | p_chart_collapse_doubles (PChart *chart, const float threshold) |
| static bool | p_validate_corrected_coords_point (const PEdge *corr_e, const float corr_co1[3], const float corr_co2[3], const float min_area, const float min_angle_cos) |
| static bool | p_validate_corrected_coords (const PEdge *corr_e, const float corr_co[3], float min_area, float min_angle_cos) |
| static bool | p_edge_matrix (float R[3][3], const float edge_dir[3]) |
| static bool | p_edge_matrix (float R[3][3], const PEdge *e) |
| static bool | p_chart_correct_degenerate_triangle_point (PFace *f, float min_area, float min_angle_cos) |
| static bool | p_chart_correct_degenerate_triangles2 (PChart *chart, float min_area, float min_angle) |
| static bool | p_validate_triangle_angles (const PVert *vert1, const PVert *vert2, const PVert *vert3, const float min_angle_cos) |
| static bool UNUSED_FUNCTION_NO_SLIM | p_chart_correct_degenerate_triangles (PChart *chart, const float min_area, const float min_angle) |
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::CornerGroup = Vector<int> |
Definition at line 150 of file mesh_split_edges.cc.
Definition at line 43 of file add_curves_on_mesh.cc.
| using blender::geometry::ParamKey = uintptr_t |
Definition at line 33 of file GEO_uv_parametrizer.hh.
| using blender::geometry::PHashKey = uintptr_t |
Definition at line 52 of file uv_parametrizer.cc.
| using blender::geometry::UVVertBucket = Set<int> |
Definition at line 76 of file mesh_bevel.cc.
| using blender::geometry::UVVertMap = Map<int, Vector<UVVertBucket>> |
Definition at line 77 of file mesh_bevel.cc.
|
strong |
| Enumerator | |
|---|---|
| Smaller | |
| Straight | |
| Larger | |
Definition at line 56 of file mesh_bevel.cc.
|
strong |
Definition at line 40 of file BKE_attribute_enums.hh.
|
strong |
Definition at line 40 of file BKE_attribute_enums.hh.
|
strong |
Definition at line 40 of file BKE_attribute_enums.hh.
|
strong |
| Enumerator | |
|---|---|
| Vertices | |
| Edges | |
Definition at line 28 of file GEO_mesh_bevel.hh.
|
strong |
| Enumerator | |
|---|---|
| Sharp | |
| Patch | |
| Arc | |
Definition at line 35 of file GEO_mesh_bevel.hh.
|
strong |
| Enumerator | |
|---|---|
| None | |
| NGon | |
| Triangles | |
Definition at line 27 of file GEO_mesh_primitive_cylinder_cone.hh.
|
strong |
| Enumerator | |
|---|---|
| Refit | Iteratively removes knots/control points with the least error starting with a dense curve. |
| Split | Uses a least squares solver to recursively find the control points. |
Definition at line 15 of file GEO_fit_curves.hh.
|
strong |
| Enumerator | |
|---|---|
| Orig | |
| Edge | |
| Vert | |
| Profile | |
Definition at line 49 of file mesh_bevel.cc.
| Enumerator | |
|---|---|
| OnStack | |
| Inserted | |
Definition at line 19 of file merge_curves.cc.
|
strong |
Kernel functions for weighting point influence on surrounding voxels.
Definition at line 36 of file GEO_points_to_volume.hh.
|
strong |
| Enumerator | |
|---|---|
| None | |
| Poly | |
| Adj | |
| TriFan | |
| Cutoff | |
Definition at line 79 of file mesh_bevel.cc.
|
strong |
Identifies the role of a newly created edge for the BevelAttributeOutputs fields.
| Enumerator | |
|---|---|
| Other | |
| OuterEdge | Outermost edge of a bevel strip - adjacent to the surviving original geometry. |
| MidEdge | Mid-ring edge of a bevel strip (at k = nseg / 2, only when nseg >= 2). |
Definition at line 198 of file mesh_bevel.cc.
|
strong |
Identifies the role of a newly created face for the BevelAttributeOutputs fields.
| Enumerator | |
|---|---|
| Other | |
| VertexFace | Face that fills the VMesh cap around a beveled vertex. |
| EdgeFace | Face (quad) that fills a bevel strip along a beveled edge. |
Definition at line 189 of file mesh_bevel.cc.
| Enumerator | |
|---|---|
| PEDGE_SEAM | |
| PEDGE_VERTEX_SPLIT | |
| PEDGE_PIN | |
| PEDGE_SELECT | |
| PEDGE_DONE | |
| PEDGE_FILLED | |
| PEDGE_COLLAPSE | |
| PEDGE_COLLAPSE_EDGE | |
| PEDGE_COLLAPSE_PAIR | |
Definition at line 127 of file uv_parametrizer.cc.
| Enumerator | |
|---|---|
| PFACE_CONNECTED | |
| PFACE_FILLED | |
| PFACE_COLLAPSE | |
| PFACE_DONE | |
Definition at line 142 of file uv_parametrizer.cc.
| Enumerator | |
|---|---|
| PHANDLE_STATE_ALLOCATED | |
| PHANDLE_STATE_CONSTRUCTED | |
| PHANDLE_STATE_LSCM | |
| PHANDLE_STATE_STRETCH | |
Definition at line 36 of file GEO_uv_parametrizer.hh.
|
strong |
Supported rasterization types.
| Enumerator | |
|---|---|
| Scalar | Rasterize a float attribute into a float grid. |
| Vector | Rasterize a vector attribute into a vector grid. |
Definition at line 28 of file GEO_points_to_volume.hh.
| Enumerator | |
|---|---|
| PVERT_PIN | |
| PVERT_SELECT | |
| PVERT_INTERIOR | |
| PVERT_COLLAPSE | |
| PVERT_SPLIT | |
Definition at line 119 of file uv_parametrizer.cc.
|
strong |
| Enumerator | |
|---|---|
| Beauty | Add a "beauty" pass on top of the standard ear-clipping algorithm. |
| EarClip | |
Definition at line 24 of file GEO_mesh_triangulate.hh.
|
strong |
Definition at line 31 of file GEO_mesh_triangulate.hh.
|
strong |
| Enumerator | |
|---|---|
| Adj | |
| Cutoff | |
Definition at line 87 of file mesh_bevel.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 326 of file add_curves_on_mesh.cc.
References add_curves_on_mesh(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::bke::attribute_filter_from_skip_ref(), blender::BLI_assert(), calc_position_with_interpolation(), calc_position_without_interpolation(), calc_radius_with_interpolation(), calc_radius_without_interpolation(), blender::MutableSpan< T >::copy_from(), blender::offset_indices::copy_group_sizes(), blender::geometry::AddCurvesOnMeshInputs::corner_normals_su, blender::bke::Curve, blender::CURVE_TYPE_CATMULL_ROM, blender::Default, blender::math::distance(), blender::IndexRange::drop_back(), blender::geometry::AddCurvesOnMeshInputs::fallback_curve_length, blender::geometry::AddCurvesOnMeshInputs::fallback_curve_radius, blender::geometry::AddCurvesOnMeshInputs::fallback_point_count, blender::Array< T, InlineBufferCapacity, Allocator >::fill(), blender::bke::fill_attribute_range_default(), find_curve_neighbors(), blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), blender::geometry::AddCurvesOnMeshInputs::interpolate_length, blender::geometry::AddCurvesOnMeshInputs::interpolate_point_count, blender::geometry::AddCurvesOnMeshInputs::interpolate_radius, blender::geometry::AddCurvesOnMeshInputs::interpolate_resolution, blender::geometry::AddCurvesOnMeshInputs::interpolate_shape, length(), blender::bke::MutableAttributeAccessor::lookup_for_write_span(), blender::bke::attribute_math::mix3(), blender::bke::attribute_math::mix_groups(), blender::geometry::AddCurvesOnMeshOutputs::new_curves_range, blender::geometry::AddCurvesOnMeshOutputs::new_points_range, blender::geometry::ReverseUVSampler::Ok, blender::geometry::AddCurvesOnMeshInputs::old_roots_kdtree, blender::threading::parallel_for(), blender::bke::Point, PRF_scope, blender::result, blender::geometry::AddCurvesOnMeshInputs::reverse_uv_sampler, blender::geometry::ReverseUVSampler::sample(), blender::bke::mesh_surface_sample::sample_corner_normals(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::geometry::AddCurvesOnMeshInputs::surface, blender::geometry::AddCurvesOnMeshInputs::surface_corner_tris, blender::bke::CurvesSurfaceTransforms::surface_to_curves, blender::bke::CurvesSurfaceTransforms::surface_to_curves_normal, blender::MutableSpan< T >::take_back(), blender::MutableSpan< T >::take_front(), blender::math::transform_point(), blender::geometry::AddCurvesOnMeshInputs::transforms, blender::geometry::AddCurvesOnMeshOutputs::uv_error, and blender::geometry::AddCurvesOnMeshInputs::uvs.
Referenced by add_curves_on_mesh(), and blender::ed::sculpt_paint::AddOperationExecutor::execute().
|
static |
Definition at line 1361 of file realize_instances.cc.
References blender::bke::MutableAttributeAccessor::add(), add_instance_attributes_to_single_geometry(), blender::geometry::AttributeFallbacksArray::array, blender::bke::attribute_type_to_cpp_type(), blender::geometry::OrderedAttributes::index_range(), blender::geometry::OrderedAttributes::kinds, and blender::geometry::OrderedAttributes::names.
Referenced by add_instance_attributes_to_single_geometry(), execute_realize_curve_tasks(), execute_realize_grease_pencil_tasks(), execute_realize_mesh_tasks(), and execute_realize_pointcloud_tasks().
|
static |
Definition at line 145 of file subdivide_curves.cc.
References aligned_or_free_handle_type(), blender::BEZIER_HANDLE_ALIGN, blender::BEZIER_HANDLE_AUTO, blender::BEZIER_HANDLE_FREE, blender::BEZIER_HANDLE_VECTOR, and BLI_assert_unreachable.
Referenced by aligned_or_free_handle_type(), and subdivide_bezier_segment().
|
static |
Definition at line 61 of file interpolate_curves.cc.
References assign_samples_to_segments(), blender::BLI_assert(), build_point_to_sample_map(), blender::Span< T >::index_range(), blender::MutableSpan< T >::last(), blender::math::round(), blender::IndexRange::size(), and blender::MutableSpan< T >::size().
Referenced by assign_samples_to_segments(), and sample_curve_padded().
|
static |
Definition at line 47 of file set_curve_type.cc.
References bezier_positions_to_nurbs(), and blender::Span< T >::index_range().
Referenced by bezier_positions_to_nurbs(), catmull_rom_to_nurbs_positions(), and convert_curves_to_nurbs().
|
static |
Definition at line 31 of file interpolate_curves.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), build_point_to_sample_map(), blender::math::distance(), blender::IndexRange::drop_front(), blender::array_utils::fill_index_range(), blender::Span< T >::first(), blender::Span< T >::index_range(), blender::Array< T, InlineBufferCapacity, Allocator >::last(), blender::Span< T >::last(), blender::math::safe_divide(), and blender::IndexRange::size().
Referenced by assign_samples_to_segments(), build_point_to_sample_map(), and sample_curve_padded().
|
static |
Definition at line 214 of file mesh_split_edges.cc.
References BLI_NOINLINE, calc_all_corner_groups(), calc_corner_groups_for_vertex(), blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), blender::index_mask::IndexMask::size(), and split_edges().
Referenced by calc_all_corner_groups(), and split_edges().
|
static |
Collect groups of corners connected by edges bordered by boundary edges or split edges. We store corner indices instead of edge indices because later on in the algorithm we only relink the corner_vert array to each group's new vertex.
The corners are not ordered in winding order, since we only need to group connected faces into each group.
Definition at line 160 of file mesh_split_edges.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), calc_corner_groups_for_vertex(), corner_on_edge_connected_to_vert(), blender::bke::mesh::face_corner_prev(), blender::Span< T >::first_index(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::Span< T >::size(), and split_edges().
Referenced by calc_all_corner_groups(), and calc_corner_groups_for_vertex().
|
static |
Definition at line 2150 of file uv_pack.cc.
References calc_margin_from_aabb_length_sum(), blender::geometry::UVPackIsland_Params::margin, sqrtf, and w().
Referenced by calc_margin_from_aabb_length_sum(), and pack_islands().
|
static |
If the max material index can be easily fetched from the inputs from the inputs without much work, return the common maximum.
Definition at line 1873 of file realize_instances.cc.
References calc_material_index_max_hint(), get_mapped_material_index(), and max.
Referenced by calc_material_index_max_hint(), and join_mesh_material_indices().
|
static |
Based on updated corner vertex indices, update the edges in each face. This includes updating corner edge indices, adding new edges, and reusing original edges for the first "split" edge. The main complexity comes from the fact that in the case of single isolated split edges, no new edges are created because they all end up identical. We need to handle this case, but since it's rare, we optimize for the case that it doesn't happen first.
Definition at line 350 of file mesh_split_edges.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::Vector< T, InlineBufferCapacity, Allocator >::append_and_get_index(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), calc_new_edges(), edge_from_corner(), blender::Vector< T, InlineBufferCapacity, Allocator >::first(), blender::Vector< T, InlineBufferCapacity, Allocator >::first_index_of_try(), blender::index_mask::IndexMask::foreach_index(), blender::index_mask::IndexMask::foreach_index_optimized(), blender::exec_mode::grain_size(), blender::offset_indices::OffsetIndices< T >::index_range(), blender::threading::parallel_for(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by calc_new_edges(), and split_edges().
|
static |
Definition at line 138 of file add_curves_on_mesh.cc.
References blender::length_parameterize::accumulate_lengths(), calc_position_with_interpolation(), calc_straight_curve_positions(), compute_surface_point_normal(), blender::Default, blender::MutableSpan< T >::fill(), blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), blender::math::interpolate(), blender::IndexRange::is_empty(), blender::Array< T, InlineBufferCapacity, Allocator >::last(), blender::mul_m3_v3(), blender::math::normalize(), blender::geometry::ReverseUVSampler::Ok, blender::threading::parallel_for(), PRF_scope, blender::result, blender::rotation_between_vecs_to_mat3(), blender::geometry::ReverseUVSampler::sample(), blender::length_parameterize::sample_at_lengths(), blender::length_parameterize::segments_num(), blender::IndexRange::size(), blender::Span< T >::size(), blender::MutableSpan< T >::slice(), blender::bke::CurvesSurfaceTransforms::surface_to_curves_normal, and blender::math::transform_direction().
Referenced by add_curves_on_mesh(), and calc_position_with_interpolation().
|
static |
Definition at line 111 of file add_curves_on_mesh.cc.
References calc_position_without_interpolation(), calc_straight_curve_positions(), blender::Default, length(), blender::math::normalize(), blender::threading::parallel_for(), PRF_scope, blender::Span< T >::size(), blender::MutableSpan< T >::slice(), and blender::math::transform_direction().
Referenced by add_curves_on_mesh(), and calc_position_without_interpolation().
|
static |
Definition at line 257 of file add_curves_on_mesh.cc.
References blender::length_parameterize::accumulate_lengths(), calc_radius_with_interpolation(), blender::MutableSpan< T >::fill(), blender::bke::SpanAttributeWriter< T >::finish(), blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), blender::math::interpolate(), blender::IndexRange::is_empty(), blender::Array< T, InlineBufferCapacity, Allocator >::last(), blender::bke::MutableAttributeAccessor::lookup_for_write_span(), blender::threading::parallel_for(), blender::length_parameterize::sample_at_lengths(), blender::length_parameterize::segments_num(), blender::IndexRange::size(), blender::Span< T >::size(), blender::MutableSpan< T >::slice(), and blender::bke::SpanAttributeWriter< T >::span.
Referenced by add_curves_on_mesh(), and calc_radius_with_interpolation().
|
static |
Definition at line 243 of file add_curves_on_mesh.cc.
References calc_radius_without_interpolation(), blender::compare_ff_relative(), FLT_EPSILON, and blender::VArrayCommon< T >::get_if_single().
Referenced by add_curves_on_mesh(), and calc_radius_without_interpolation().
|
static |
Definition at line 1892 of file realize_instances.cc.
References calc_single_value_material_index(), blender::IndexRange::drop_front(), blender::VArrayCommon< T >::get_if_single(), get_mapped_material_index(), blender::Span< T >::index_range(), blender::geometry::MeshRealizeInfo::material_indices, blender::threading::parallel_reduce(), and blender::geometry::AllMeshesInfo::realize_info.
Referenced by calc_single_value_material_index(), and join_mesh_material_indices().
|
static |
Definition at line 54 of file add_curves_on_mesh.cc.
References b, calc_straight_curve_positions(), blender::MutableSpan< T >::index_range(), blender::bke::attribute_math::mix2(), blender::math::rcp(), blender::MutableSpan< T >::size(), and step.
Referenced by calc_position_with_interpolation(), calc_position_without_interpolation(), and calc_straight_curve_positions().
|
static |
Find selected and non-selected loose edges connected to a vertex.
Definition at line 248 of file mesh_split_edges.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), calc_vert_loose_edges(), blender::geometry::VertLooseEdges::selected, split_edges(), and blender::geometry::VertLooseEdges::unselected.
Referenced by calc_vert_loose_edges(), and reassign_loose_edge_verts().
|
static |
Every affected vertex maps to potentially multiple output vertices. Create a mapping from affected vertex index to the group of output vertex indices (indices are within those groups, not indices in arrays of all vertices). For every original vertex, reuse the original vertex for the first of:
Definition at line 278 of file mesh_split_edges.cc.
References calc_vert_ranges_per_old_vert(), blender::index_mask::IndexMask::index_range(), blender::threading::parallel_for(), blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::index_mask::IndexMask::size(), and split_edges().
Referenced by calc_vert_ranges_per_old_vert(), and split_edges().
|
static |
Definition at line 100 of file fillet_curves.cc.
References blender::angle_v3v3(), calculate_angles(), blender::IndexRange::drop_front(), blender::MutableSpan< T >::first(), blender::Span< T >::first(), blender::Span< T >::index_range(), blender::Span< T >::last(), and M_PI.
Referenced by calculate_angles(), and fillet_curves().
|
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 320 of file fillet_curves.cc.
References calculate_bezier_handles_bezier_mode(), blender::Span< T >::index_range(), blender::IndexRange::last(), and blender::threading::parallel_for().
Referenced by calculate_bezier_handles_bezier_mode(), and fillet_curves().
|
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 387 of file fillet_curves.cc.
References calculate_bezier_handles_poly_mode(), blender::Span< T >::index_range(), blender::IndexRange::last(), and blender::threading::parallel_for().
Referenced by calculate_bezier_handles_poly_mode(), and fillet_curves().
|
static |
Definition at line 656 of file mesh_primitive_cylinder_cone.cc.
References calculate_bounds_cylinder(), calculate_bounds_radial_primitive(), blender::geometry::ConeConfig::circle_segments, blender::geometry::ConeConfig::height, blender::geometry::ConeConfig::radius_bottom, and blender::geometry::ConeConfig::radius_top.
Referenced by calculate_bounds_cylinder(), and create_cylinder_or_cone_mesh().
| Bounds< float3 > blender::geometry::calculate_bounds_radial_primitive | ( | float | radius_top, |
| float | radius_bottom, | ||
| int | segments, | ||
| float | height ) |
Calculates the bounds of a radial primitive. The algorithm assumes X-axis symmetry of primitives.
Definition at line 20 of file mesh_primitive_uv_sphere.cc.
References calculate_bounds_radial_primitive(), and delta_phi().
Referenced by blender::nodes::node_geo_mesh_primitive_circle_cc::calculate_bounds_circle(), calculate_bounds_cylinder(), calculate_bounds_radial_primitive(), and calculate_bounds_uv_sphere().
|
static |
Definition at line 292 of file mesh_primitive_uv_sphere.cc.
References calculate_bounds_radial_primitive(), calculate_bounds_uv_sphere(), and float.
Referenced by calculate_bounds_uv_sphere(), and create_uv_sphere_mesh().
Definition at line 501 of file interpolate_curves.cc.
References calculate_catmull_rom_basis_derivative().
Referenced by calculate_catmull_rom_basis_derivative(), and sample_catmull_rom_curve_positions_handles().
|
static |
Definition at line 326 of file mesh_primitive_cylinder_cone.cc.
References blender::geometry::ConeConfig::bottom_has_center_vert, calculate_cone_edges(), blender::geometry::ConeConfig::circle_segments, blender::geometry::ConeConfig::first_ring_verts_start, blender::geometry::ConeConfig::first_vert, blender::IndexRange::IndexRange(), blender::geometry::ConeConfig::last_ring_verts_start, blender::geometry::ConeConfig::last_vert, blender::geometry::ConeConfig::top_has_center_vert, and blender::geometry::ConeConfig::tot_edge_rings.
Referenced by calculate_cone_edges(), and create_cylinder_or_cone_mesh().
|
static |
Definition at line 371 of file mesh_primitive_cylinder_cone.cc.
References blender::geometry::ConeConfig::bottom_has_center_vert, calculate_cone_faces(), blender::geometry::ConeConfig::circle_segments, blender::MutableSpan< T >::fill(), blender::array_utils::fill_index_range(), blender::geometry::ConeConfig::fill_type, blender::MutableSpan< T >::first(), blender::geometry::ConeConfig::first_ring_edges_start, blender::geometry::ConeConfig::first_ring_verts_start, blender::IndexRange::IndexRange(), blender::geometry::ConeConfig::last_edge, blender::geometry::ConeConfig::last_fan_edges_start, blender::geometry::ConeConfig::last_ring_edges_start, blender::geometry::ConeConfig::last_ring_verts_start, blender::geometry::ConeConfig::last_vert, NGon, blender::MutableSpan< T >::slice(), blender::MutableSpan< T >::take_front(), blender::geometry::ConeConfig::top_has_center_vert, and blender::geometry::ConeConfig::tot_quad_rings.
Referenced by calculate_cone_faces(), and create_cylinder_or_cone_mesh().
|
static |
If the top is the cone tip or has a fill, it is unwrapped into a circle in the lower left quadrant of the UV. Likewise, if the bottom is the cone tip or has a fill, it is unwrapped into a circle in the lower right quadrant of the UV. If the mesh is a truncated cone or a cylinder, the side faces are unwrapped into a rectangle that fills the top half of the UV (or the entire UV, if there are no fills).
Definition at line 530 of file mesh_primitive_cylinder_cone.cc.
References angle(), blender::geometry::ConeConfig::bottom_has_center_vert, blender::geometry::ConeConfig::bottom_is_point, calculate_cone_uvs(), blender::geometry::ConeConfig::circle_segments, blender::bke::Corner, blender::geometry::ConeConfig::fill_segments, blender::geometry::ConeConfig::fill_type, blender::bke::SpanAttributeWriter< T >::finish(), float, blender::IndexRange::IndexRange(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), NGon, None, blender::geometry::ConeConfig::side_segments, blender::bke::SpanAttributeWriter< T >::span, blender::geometry::ConeConfig::top_has_center_vert, and blender::geometry::ConeConfig::top_is_point.
Referenced by calculate_cone_uvs(), and create_cylinder_or_cone_mesh().
|
static |
Definition at line 262 of file mesh_primitive_cylinder_cone.cc.
References angle(), blender::geometry::ConeConfig::bottom_has_center_vert, blender::geometry::ConeConfig::bottom_is_point, calculate_cone_verts(), blender::geometry::ConeConfig::circle_segments, blender::geometry::ConeConfig::fill_segments, float, blender::geometry::ConeConfig::height, blender::IndexRange::IndexRange(), blender::geometry::ConeConfig::radius_bottom, blender::geometry::ConeConfig::radius_top, blender::geometry::ConeConfig::side_segments, blender::geometry::ConeConfig::top_has_center_vert, blender::geometry::ConeConfig::top_is_point, blender::x, and y.
Referenced by calculate_cone_verts(), and create_cylinder_or_cone_mesh().
|
static |
Definition at line 123 of file mesh_primitive_cuboid.cc.
References calculate_corner_verts(), define_quad(), blender::geometry::CuboidConfig::edges_x, blender::geometry::CuboidConfig::edges_y, blender::geometry::CuboidConfig::edges_z, blender::IndexRange::IndexRange(), blender::geometry::CuboidConfig::verts_x, blender::geometry::CuboidConfig::verts_y, blender::geometry::CuboidConfig::verts_z, blender::x, y, and z().
Referenced by calculate_corner_verts(), and create_cuboid_mesh().
|
static |
Definition at line 92 of file fillet_curves.cc.
References calculate_directions(), blender::IndexRange::drop_back(), blender::Span< T >::first(), blender::Span< T >::index_range(), blender::MutableSpan< T >::last(), blender::Span< T >::last(), and blender::math::normalize().
Referenced by calculate_directions(), and fillet_curves().
|
static |
Definition at line 229 of file fillet_curves.cc.
References calculate_fillet_positions(), blender::Span< T >::index_range(), blender::IndexRange::last(), and blender::threading::parallel_for().
Referenced by calculate_fillet_positions(), and fillet_curves().
|
static |
Definition at line 56 of file mesh_primitive_cuboid.cc.
References calculate_positions(), blender::geometry::CuboidConfig::edges_x, blender::geometry::CuboidConfig::edges_y, blender::geometry::CuboidConfig::edges_z, ELEM, blender::IndexRange::IndexRange(), blender::geometry::CuboidConfig::size, blender::geometry::CuboidConfig::verts_x, blender::geometry::CuboidConfig::verts_y, blender::geometry::CuboidConfig::verts_z, blender::x, y, and z().
Referenced by calculate_positions(), and create_cuboid_mesh().
|
static |
Definition at line 21 of file subdivide_curves.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), calculate_result_offsets(), blender::offset_indices::copy_group_sizes(), blender::MutableSpan< T >::drop_back(), blender::MutableSpan< T >::first(), blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), blender::MutableSpan< T >::last(), blender::VArrayCommon< T >::materialize_compressed(), blender::bke::curves::per_curve_point_offsets_range(), blender::bke::CurvesGeometry::points_by_curve(), blender::IndexRange::size(), and blender::MutableSpan< T >::slice().
|
static |
Definition at line 44 of file fillet_curves.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), calculate_result_offsets(), blender::offset_indices::copy_group_sizes(), blender::devirtualize_varray(), blender::MutableSpan< T >::drop_back(), blender::MutableSpan< T >::first(), blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), blender::IndexRange::IndexRange(), blender::MutableSpan< T >::last(), blender::VArrayCommon< T >::materialize_compressed(), blender::bke::curves::per_curve_point_offsets_range(), blender::IndexRange::size(), and blender::MutableSpan< T >::slice().
Referenced by calculate_result_offsets(), calculate_result_offsets(), fillet_curves(), and subdivide_curves().
|
static |
Definition at line 475 of file mesh_primitive_cylinder_cone.cc.
References blender::geometry::ConeConfig::bottom_faces_len, blender::geometry::ConeConfig::bottom_faces_start, blender::geometry::ConeAttributeOutputs::bottom_id, blender::geometry::ConeConfig::bottom_is_point, calculate_selection_outputs(), blender::geometry::ConeConfig::circle_segments, blender::bke::Face, blender::geometry::ConeConfig::fill_type, blender::bke::SpanAttributeWriter< T >::finish(), blender::geometry::ConeConfig::first_vert, blender::geometry::ConeConfig::last_ring_verts_start, blender::geometry::ConeConfig::last_vert, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), None, blender::bke::Point, blender::geometry::ConeConfig::side_faces_len, blender::geometry::ConeConfig::side_faces_start, blender::geometry::ConeAttributeOutputs::side_id, blender::bke::SpanAttributeWriter< T >::span, blender::geometry::ConeConfig::top_faces_len, blender::geometry::ConeAttributeOutputs::top_id, and blender::geometry::ConeConfig::top_is_point.
Referenced by calculate_selection_outputs(), and create_cylinder_or_cone_mesh().
|
static |
Definition at line 167 of file mesh_primitive_uv_sphere.cc.
References BLI_NOINLINE, calculate_sphere_corners(), blender::IndexRange::IndexRange(), and sphere_vert_total().
Referenced by calculate_sphere_corners(), and create_uv_sphere_mesh().
|
static |
Definition at line 108 of file mesh_primitive_uv_sphere.cc.
References BLI_NOINLINE, calculate_sphere_edge_indices(), blender::IndexRange::IndexRange(), and sphere_vert_total().
Referenced by calculate_sphere_edge_indices(), and create_uv_sphere_mesh().
|
static |
Definition at line 154 of file mesh_primitive_uv_sphere.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), BLI_NOINLINE, calculate_sphere_faces(), blender::MutableSpan< T >::drop_back(), blender::MutableSpan< T >::drop_front(), blender::MutableSpan< T >::fill(), blender::MutableSpan< T >::take_back(), and blender::MutableSpan< T >::take_front().
Referenced by calculate_sphere_faces(), and create_uv_sphere_mesh().
|
static |
Definition at line 243 of file mesh_primitive_uv_sphere.cc.
References BLI_NOINLINE, calculate_sphere_uvs(), blender::bke::Corner, blender::bke::SpanAttributeWriter< T >::finish(), float, blender::IndexRange::IndexRange(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), and blender::bke::SpanAttributeWriter< T >::span.
Referenced by calculate_sphere_uvs(), and create_uv_sphere_mesh().
|
static |
Also calculate vertex normals here, since the calculation is trivial, and it allows avoiding the calculation later, if it's necessary. The vertex normals are just the normalized positions.
Definition at line 67 of file mesh_primitive_uv_sphere.cc.
References BLI_NOINLINE, calculate_sphere_vertex_data(), delta_phi(), blender::MutableSpan< T >::first(), blender::IndexRange::IndexRange(), blender::MutableSpan< T >::last(), sin_theta(), blender::x, y, and z().
Referenced by calculate_sphere_vertex_data(), and create_uv_sphere_mesh().
|
static |
Definition at line 296 of file mesh_primitive_cuboid.cc.
References calculate_uvs(), blender::bke::Corner, blender::geometry::CuboidConfig::edges_x, blender::geometry::CuboidConfig::edges_y, blender::geometry::CuboidConfig::edges_z, blender::bke::SpanAttributeWriter< T >::finish(), float, blender::IndexRange::IndexRange(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::SpanAttributeWriter< T >::span, blender::x, y, and z().
Referenced by calculate_uvs(), calculate_uvs(), and create_cuboid_mesh().
|
static |
Definition at line 16 of file mesh_primitive_grid.cc.
References calculate_uvs(), blender::bke::Corner, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::threading::memory_bandwidth_bound_task(), blender::Span< T >::size_in_bytes(), and blender::bke::SpanAttributeWriter< T >::span.
|
static |
Definition at line 191 of file uv_pack.cc.
References can_rotate().
Referenced by can_rotate(), and pack_islands_scale_margin().
|
static |
Definition at line 2421 of file uv_pack.cc.
References can_rotate_with_method(), blender::ED_UVPACK_PIN_LOCK_ALL, blender::ED_UVPACK_PIN_LOCK_ROTATION, blender::ED_UVPACK_PIN_LOCK_ROTATION_SCALE, blender::ED_UVPACK_ROTATION_AXIS_ALIGNED_X, blender::ED_UVPACK_ROTATION_AXIS_ALIGNED_Y, blender::ED_UVPACK_ROTATION_NONE, ELEM, blender::geometry::UVPackIsland_Params::pin_method, and blender::geometry::PackIsland::pinned.
Referenced by blender::geometry::PackIsland::can_rotate_(), blender::geometry::PackIsland::can_rotate_before_pack_(), and can_rotate_with_method().
|
static |
Definition at line 59 of file set_curve_type.cc.
References catmull_rom_to_bezier_handles(), blender::IndexRange::drop_back(), blender::IndexRange::drop_front(), blender::MutableSpan< T >::first(), blender::Span< T >::first(), blender::Span< T >::index_range(), blender::MutableSpan< T >::last(), blender::Span< T >::last(), and blender::Span< T >::size().
Referenced by catmull_rom_to_bezier_handles(), catmull_rom_to_nurbs_positions(), and convert_curves_to_bezier().
|
static |
Definition at line 94 of file set_curve_type.cc.
References bezier_positions_to_nurbs(), catmull_rom_to_bezier_handles(), catmull_rom_to_nurbs_positions(), and blender::Span< T >::size().
Referenced by catmull_rom_to_nurbs_positions(), and convert_curves_to_nurbs().
|
static |
Remove the corners of collapsed edges from a weld face by relinking the remaining corners.
Definition at line 534 of file mesh_merge_verts.cc.
References collapse_weld_face(), blender::geometry::WeldFace::corner_end, blender::geometry::WeldFace::corner_start, blender::geometry::RemovedFacesAndCorners::corners, blender::geometry::WeldFace::corners_num, ELEM_COLLAPSED, blender::geometry::WeldFace::face_dst, and blender::geometry::RemovedFacesAndCorners::faces.
Referenced by collapse_weld_face(), and weld_face_corner_ctx_setup_collapsed_and_split().
| const MultiValueMap< bke::GeometryComponent::Type, bke::AttrDomain > & blender::geometry::components_supported_reordering | ( | ) |
Definition at line 39 of file reorder.cc.
References blender::MultiValueMap< Key, Value >::add(), blender::MultiValueMap< Key, Value >::add_multiple(), components_supported_reordering(), blender::bke::GeometryComponent::Curve, blender::bke::GeometryComponent::Instance, blender::bke::GeometryComponent::Mesh, and blender::bke::GeometryComponent::PointCloud.
Referenced by components_supported_reordering(), and blender::nodes::node_geo_sort_elements_cc::node_geo_exec().
|
static |
Compute the selected range of points for every selected curve.
Definition at line 831 of file trim_curves.cc.
References blender::BLI_assert(), compute_curve_trim_parameters(), blender::CURVE_TYPE_NURBS, blender::Default, blender::index_mask::IndexMask::foreach_index(), blender::bke::curves::IndexRangeCyclic::get_range_between_endpoints(), blender::bke::curves::IndexRangeCyclic::get_range_from_size(), blender::exec_mode::grain_size(), blender::Span< T >::last(), lookup_curve_point(), PRF_scope, blender::MutableSpan< T >::size(), blender::offset_indices::OffsetIndices< T >::size(), blender::Span< T >::size(), and trim_sample_length().
Referenced by compute_curve_trim_parameters(), and trim_curves().
| float3 blender::geometry::compute_surface_point_normal | ( | const int3 & | tri, |
| const float3 & | bary_coord, | ||
| Span< float3 > | corner_normals ) |
Definition at line 45 of file add_curves_on_mesh.cc.
References bary_coord, compute_surface_point_normal(), blender::math::normalize(), and blender::bke::mesh_surface_sample::sample_corner_attribute_with_bary_coords().
Referenced by calc_position_with_interpolation(), compute_surface_point_normal(), blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide(), and blender::ed::sculpt_paint::PuffOperationExecutor::puff().
|
static |
Converts some curves to poly curves before they are converted to nurbs. This is useful because it discards the bezier/catmull-rom shape which is sometimes the desired behavior.
Definition at line 765 of file set_curve_type.cc.
References convert_bezier_or_catmull_rom_to_poly_before_conversion_to_nurbs(), convert_curves_trivial(), blender::CURVE_TYPE_BEZIER, blender::CURVE_TYPE_CATMULL_ROM, blender::CURVE_TYPE_POLY, blender::bke::CurvesGeometry::curve_types(), blender::IndexMask::from_predicate(), and options.
Referenced by convert_bezier_or_catmull_rom_to_poly_before_conversion_to_nurbs(), and convert_curves().
| bke::CurvesGeometry blender::geometry::convert_curves | ( | const bke::CurvesGeometry & | src_curves, |
| const IndexMask & | selection, | ||
| CurveType | dst_type, | ||
| const bke::AttributeFilter & | attribute_filter, | ||
| const ConvertCurvesOptions & | options = {} ) |
Change the types of the selected curves, potentially changing the total point count.
Definition at line 785 of file set_curve_type.cc.
References BLI_assert_unreachable, convert_bezier_or_catmull_rom_to_poly_before_conversion_to_nurbs(), convert_curves(), convert_curves_to_bezier(), convert_curves_to_catmull_rom_or_poly(), convert_curves_to_nurbs(), blender::CURVE_TYPE_BEZIER, blender::CURVE_TYPE_CATMULL_ROM, blender::CURVE_TYPE_NURBS, blender::CURVE_TYPE_POLY, and options.
Referenced by convert_curves(), blender::ed::sculpt_paint::greasepencil::convert_stroke_type(), blender::ed::greasepencil::convert_to_bezier(), blender::ed::greasepencil::convert_to_catmull_rom(), blender::ed::greasepencil::convert_to_nurbs(), blender::ed::curves::curve_type_set::exec(), blender::io::grease_pencil::SVGExporter::export_grease_pencil_objects(), blender::ed::greasepencil::grease_pencil_set_curve_type_exec(), and blender::nodes::node_geo_curve_spline_type_cc::node_geo_exec().
|
static |
Definition at line 219 of file set_curve_type.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), attribute, blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), blender::BEZIER_HANDLE_ALIGN, blender::BEZIER_HANDLE_VECTOR, blender::BKE_defgroup_copy_list(), blender::bke::CurvesGeometry::calculate_bezier_auto_handles(), catmull_rom_to_bezier_handles(), blender::index_mask::IndexMask::complement(), convert_curves_to_bezier(), blender::bke::curves::nurbs::copy_custom_knots(), blender::offset_indices::copy_group_sizes(), blender::array_utils::copy_group_to_group(), blender::bke::curves::copy_only_curve_domain(), create_nurbs_to_bezier_handles(), create_nurbs_to_bezier_positions(), blender::bke::curves::curve_to_point_selection(), blender::CURVE_TYPE_BEZIER, blender::bke::CurvesGeometry::curve_type_counts(), blender::CURVE_TYPE_NURBS, blender::bke::CurvesGeometry::curve_types(), blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), blender::IndexRange::drop_back(), blender::IndexRange::drop_front(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::bke::CurvesGeometry::fill_curve_types(), blender::bke::curves::fill_points(), blender::IndexRange::first(), blender::MutableSpan< T >::first(), blender::bke::curves::foreach_curve_by_type(), blender::index_mask::IndexMask::foreach_index(), blender::bke::attribute_math::gather(), blender::exec_mode::grain_size(), 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::MutableSpan< T >::index_range(), is_nurbs_to_bezier_one_to_one(), blender::IndexRange::last(), blender::MutableSpan< T >::last(), blender::index_mask::IndexMask::min_array_size(), blender::NURBS_KNOT_MODE_ENDPOINT, blender::NURBS_KNOT_MODE_NORMAL, blender::bke::CurvesGeometry::nurbs_knots_modes(), blender::bke::CurvesGeometry::offsets_for_write(), blender::bke::Point, blender::bke::CurvesGeometry::points_by_curve(), position, blender::bke::CurvesGeometry::positions(), blender::bke::CurvesGeometry::positions_for_write(), blender::bke::CurvesGeometry::resize(), blender::bke::retrieve_attributes_for_transfer(), scale_input_assign(), blender::IndexRange::size(), blender::MutableSpan< T >::slice(), blender::Span< T >::slice(), to_bezier_size(), and blender::CurvesGeometry::vertex_group_names.
Referenced by convert_curves(), and convert_curves_to_bezier().
|
static |
Definition at line 638 of file set_curve_type.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), attribute, blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), blender::BKE_defgroup_copy_list(), blender::index_mask::IndexMask::complement(), convert_curves_to_catmull_rom_or_poly(), convert_curves_trivial(), blender::bke::curves::nurbs::copy_custom_knots(), blender::offset_indices::copy_group_sizes(), blender::array_utils::copy_group_to_group(), blender::bke::curves::copy_only_curve_domain(), blender::CURVE_TYPE_BEZIER, blender::CURVE_TYPE_CATMULL_ROM, blender::bke::CurvesGeometry::curve_type_counts(), blender::bke::CurvesGeometry::curve_types(), blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), blender::CPPType::fill_assign_n(), blender::bke::CurvesGeometry::fill_curve_types(), blender::bke::curves::foreach_curve_by_type(), blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), blender::bke::CurvesGeometry::handle_positions_left(), blender::bke::CurvesGeometry::handle_positions_right(), blender::bke::CurvesGeometry::has_curve_with_type(), blender::IndexRange::index_range(), blender::MutableSpan< T >::last(), blender::bke::CurvesGeometry::offsets_for_write(), options, blender::bke::Point, blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::positions(), blender::bke::CurvesGeometry::positions_for_write(), blender::bke::CurvesGeometry::resize(), blender::bke::retrieve_attributes_for_transfer(), blender::IndexRange::size(), blender::IndexRange::start(), and blender::CurvesGeometry::vertex_group_names.
Referenced by convert_curves(), and convert_curves_to_catmull_rom_or_poly().
|
static |
Definition at line 439 of file set_curve_type.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), attribute, blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), bezier_positions_to_nurbs(), blender::BKE_defgroup_copy_list(), catmull_rom_to_nurbs_positions(), blender::index_mask::IndexMask::complement(), blender::bke::AttributeAccessor::contains(), convert_curves_to_nurbs(), blender::bke::curves::nurbs::copy_custom_knots(), blender::offset_indices::copy_group_sizes(), blender::array_utils::copy_group_to_group(), blender::bke::curves::copy_only_curve_domain(), blender::bke::curves::curve_to_point_selection(), blender::bke::CurvesGeometry::curve_type_counts(), blender::CURVE_TYPE_NURBS, blender::bke::CurvesGeometry::curve_types(), blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), blender::bke::CurvesGeometry::fill_curve_types(), blender::bke::curves::fill_points(), blender::bke::curves::foreach_curve_by_type(), blender::index_mask::IndexMask::foreach_index(), blender::index_mask::IndexMask::foreach_index_optimized(), blender::index_mask::IndexMask::foreach_segment(), blender::bke::attribute_math::gather(), blender::VArrayCommon< T >::get_internal_single(), blender::exec_mode::grain_size(), blender::bke::CurvesGeometry::handle_positions_left(), blender::bke::CurvesGeometry::handle_positions_right(), blender::IndexRange::index_range(), blender::IndexMask::IndexMask(), blender::VArrayCommon< T >::is_single(), blender::MutableSpan< T >::last(), blender::index_mask::masked_fill(), blender::index_mask::IndexMask::min_array_size(), blender::NURBS_KNOT_MODE_BEZIER, blender::NURBS_KNOT_MODE_ENDPOINT, blender::NURBS_KNOT_MODE_NORMAL, blender::bke::CurvesGeometry::nurbs_knots_modes_for_write(), blender::bke::CurvesGeometry::nurbs_orders_for_write(), blender::bke::CurvesGeometry::nurbs_weights(), blender::bke::CurvesGeometry::nurbs_weights_for_write(), blender::bke::CurvesGeometry::offsets_for_write(), blender::bke::Point, blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::positions(), blender::bke::CurvesGeometry::positions_for_write(), blender::bke::CurvesGeometry::resize(), blender::bke::retrieve_attributes_for_transfer(), blender::MutableSpan< T >::slice(), blender::Span< T >::slice(), to_nurbs_size(), and blender::CurvesGeometry::vertex_group_names.
Referenced by convert_curves(), and convert_curves_to_nurbs().
|
static |
Definition at line 628 of file set_curve_type.cc.
References convert_curves_trivial(), blender::bke::CurvesGeometry::fill_curve_types(), and blender::bke::CurvesGeometry::remove_attributes_based_on_types().
Referenced by convert_bezier_or_catmull_rom_to_poly_before_conversion_to_nurbs(), convert_curves_to_catmull_rom_or_poly(), and convert_curves_trivial().
|
static |
Copy attributes from a source element for every result element, and mix the values for result elements created from multiple source elements. When nothing is mixed and the result domain is unchanged, attribute arrays are shared with the source.
Definition at line 880 of file mesh_merge_verts.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::bke::AttributeFilter::allow_skip(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::GVArrayCommon::common_info(), copy_and_mix_attributes(), blender::CommonVArrayInfo::data, blender::offset_indices::GroupedSpan< T >::data, blender::bke::AttributeIter::data_type, blender::bke::AttributeIter::domain, blender::geometry::MergePropagationMap::dst_to_src, blender::bke::GSpanAttributeWriter::finish(), blender::bke::AttributeAccessor::foreach_attribute(), blender::bke::attribute_math::gather(), blender::bke::gather_attributes(), blender::bke::AttributeIter::get(), blender::bke::subdiv::init(), blender::index_mask::IndexMask::is_empty(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::attribute_math::mix_groups(), blender::geometry::MergePropagationMap::mixed, blender::geometry::MergePropagationMap::mixed_groups(), blender::bke::AttributeIter::name, blender::offset_indices::GroupedSpan< T >::offsets, blender::CommonVArrayInfo::Single, blender::bke::GSpanAttributeWriter::span, blender::bke::String, blender::CommonVArrayInfo::type, and blender::GVArrayCommon::type().
Referenced by copy_and_mix_attributes(), and create_merged_mesh().
|
static |
Definition at line 289 of file reorder.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::MutableSpan< T >::as_span(), blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), copy_and_reorder_curves(), blender::bke::Curve, blender::IndexMask::from_indices(), blender::bke::gather_attributes(), blender::bke::curves::nurbs::gather_custom_knots(), blender::offset_indices::gather_group_sizes(), blender::bke::CurvesGeometry::nurbs_custom_knots_update_size(), blender::bke::CurvesGeometry::nurbs_has_custom_knots(), blender::bke::CurvesGeometry::offsets(), blender::bke::CurvesGeometry::offsets_for_write(), blender::bke::Point, reorder_attributes_group_to_group(), and blender::bke::CurvesGeometry::tag_topology_changed().
Referenced by copy_and_reorder_curves(), and reorder_curves_geometry().
|
static |
Definition at line 322 of file reorder.cc.
References blender::bke::Instances::add_reference(), blender::bke::Instances::attributes(), blender::bke::Instances::attributes_for_write(), blender::BLI_assert(), copy_and_reorder_instaces(), blender::array_utils::gather(), blender::bke::gather_attributes(), blender::bke::Instance, blender::bke::Instances::instances_num(), blender::bke::Instances::references(), blender::bke::Instances::resize(), blender::bke::Instances::transforms(), and blender::bke::Instances::transforms_for_write().
Referenced by copy_and_reorder_instaces(), and reorder_instaces().
|
static |
Definition at line 251 of file reorder.cc.
References copy_and_reorder_mesh(), copy_and_reorder_mesh_edges(), copy_and_reorder_mesh_faces(), copy_and_reorder_mesh_verts(), blender::bke::Edge, blender::bke::Face, and blender::bke::Point.
Referenced by copy_and_reorder_mesh(), and reorder_mesh().
|
static |
Definition at line 164 of file reorder.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::bke::attribute_filter_with_skip_ref(), copy_and_reorder_mesh_edges(), blender::bke::copy_attributes(), blender::implicit_sharing::copy_shared_pointer(), blender::bke::Corner, blender::bke::Edge, blender::bke::Face, blender::Mesh::face_offset_indices, blender::bke::MeshRuntime::face_offsets_sharing_info, blender::implicit_sharing::free_shared_data(), blender::array_utils::gather(), blender::bke::gather_attributes(), invert_permutation(), blender::bke::Point, and blender::Mesh::runtime.
Referenced by copy_and_reorder_mesh(), and copy_and_reorder_mesh_edges().
|
static |
Definition at line 211 of file reorder.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::MutableSpan< T >::as_span(), copy_and_reorder_mesh_faces(), blender::bke::copy_attributes(), blender::bke::Corner, blender::bke::Edge, blender::bke::Face, blender::bke::gather_attributes(), blender::offset_indices::gather_group_sizes(), blender::bke::Point, and reorder_attributes_group_to_group().
Referenced by copy_and_reorder_mesh(), and copy_and_reorder_mesh_faces().
|
static |
Definition at line 112 of file reorder.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::bke::attribute_filter_with_skip_ref(), copy_and_reorder_mesh_verts(), blender::bke::copy_attributes(), blender::implicit_sharing::copy_shared_pointer(), blender::bke::Corner, blender::bke::Edge, blender::bke::Face, blender::Mesh::face_offset_indices, blender::bke::MeshRuntime::face_offsets_sharing_info, blender::implicit_sharing::free_shared_data(), blender::array_utils::gather(), blender::bke::gather_attributes(), invert_permutation(), blender::bke::Point, and blender::Mesh::runtime.
Referenced by copy_and_reorder_mesh(), and copy_and_reorder_mesh_verts().
|
static |
Definition at line 274 of file reorder.cc.
References copy_and_reorder_points(), blender::bke::gather_attributes(), and blender::bke::Point.
Referenced by copy_and_reorder_points(), and reorder_points().
|
static |
Definition at line 430 of file realize_instances.cc.
References copy_generic_attributes_to_result(), blender::MutableSpan< T >::index_range(), and blender::threading::parallel_for().
Referenced by copy_generic_attributes_to_result(), execute_realize_grease_pencil_task(), and execute_realize_pointcloud_task().
Definition at line 90 of file mesh_copy_selection.cc.
References copy_loose_edge_hint(), blender::bke::MeshRuntime::loose_edges_cache, and blender::Mesh::runtime.
Referenced by copy_loose_edge_hint(), and mesh_copy_selection_keep_verts().
Definition at line 82 of file mesh_copy_selection.cc.
References copy_loose_vert_hint(), blender::bke::MeshRuntime::loose_verts_cache, and blender::Mesh::runtime.
Referenced by copy_loose_vert_hint(), mesh_copy_selection_keep_edges(), and mesh_triangulate().
Definition at line 74 of file mesh_triangulate.cc.
References copy_loose_vert_hint(), blender::bke::MeshRuntime::loose_verts_cache, and blender::Mesh::runtime.
|
static |
Definition at line 211 of file resample_curves.cc.
References blender::array_utils::copy_group_to_group(), copy_or_defaults_for_unselected_curves(), blender::geometry::AttributesForResample::dst, blender::geometry::AttributesForResample::dst_no_interpolation, blender::geometry::AttributesForResample::dst_normals, blender::geometry::AttributesForResample::dst_tangents, blender::bke::curves::fill_points(), blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::positions(), blender::bke::CurvesGeometry::positions_for_write(), blender::geometry::AttributesForResample::src, and blender::geometry::AttributesForResample::src_no_interpolation.
Referenced by copy_or_defaults_for_unselected_curves(), resample_to_evaluated(), and resample_to_uniform().
Definition at line 98 of file mesh_copy_selection.cc.
References copy_overlapping_hint().
Referenced by copy_overlapping_hint(), mesh_copy_selection_keep_edges(), and mesh_copy_selection_keep_verts().
|
static |
Definition at line 217 of file trim_curves.cc.
References blender::MutableSpan< T >::copy_from(), copy_point_data_between_endpoints(), blender::bke::curves::IndexRangeCyclic::curve_range(), blender::bke::curves::IndexRangeCyclic::cycles(), blender::bke::curves::IndexRangeCyclic::first(), blender::IndexRange::first(), blender::bke::curves::IndexRangeCyclic::one_after_last(), blender::bke::curves::IndexRangeCyclic::size_after_loop(), blender::bke::curves::IndexRangeCyclic::size_before_loop(), blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
Referenced by copy_point_data_between_endpoints(), sample_interval_catmull_rom(), and sample_interval_linear().
|
static |
Definition at line 1821 of file realize_instances.cc.
References blender::BLI_addtail(), blender::blender::StringRefBase::copy_utf8_truncated(), copy_vertex_group_name(), blender::bke::AttributeDomainAndType::data_type, blender::bke::AttributeDomainAndType::domain, blender::bke::Float, blender::geometry::OrderedAttributes::kinds, blender::bDeformGroup::name, blender::geometry::OrderedAttributes::names, and blender::bke::Point.
Referenced by copy_vertex_group_name(), copy_vertex_group_names(), and copy_vertex_group_names().
|
static |
|
static |
Definition at line 1842 of file realize_instances.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), copy_vertex_group_name(), copy_vertex_group_names(), blender::bDeformGroup::name, and blender::Mesh::vertex_group_names.
Referenced by copy_vertex_group_names(), copy_vertex_group_names(), execute_realize_curve_tasks(), and execute_realize_mesh_tasks().
|
static |
Used for fanning around the corners connected to a vertex.
Depending on the winding direction of neighboring faces, traveling from a corner across an edge to a different face can give a corner that uses a different vertex than the original. To find the face's corner that uses the original vertex, we may have to use the next corner instead.
Definition at line 137 of file mesh_split_edges.cc.
References blender::BLI_assert(), corner_on_edge_connected_to_vert(), and blender::bke::mesh::face_corner_next().
Referenced by calc_corner_groups_for_vertex(), and corner_on_edge_connected_to_vert().
| Mesh * blender::geometry::create_cuboid_mesh | ( | const float3 & | size, |
| int | verts_x, | ||
| int | verts_y, | ||
| int | verts_z ) |
Definition at line 402 of file mesh_primitive_cuboid.cc.
References create_cuboid_mesh().
| Mesh * blender::geometry::create_cuboid_mesh | ( | const float3 & | size, |
| int | verts_x, | ||
| int | verts_y, | ||
| int | verts_z, | ||
| std::optional< StringRef > | uv_id ) |
Definition at line 372 of file mesh_primitive_cuboid.cc.
References blender::BKE_mesh_new_nomain(), calculate_corner_verts(), calculate_positions(), calculate_uvs(), create_cuboid_mesh(), blender::geometry::CuboidConfig::face_count, blender::offset_indices::fill_constant_group_size(), blender::geometry::CuboidConfig::loop_count, blender::bke::mesh_calc_edges(), blender::bke::mesh_smooth_set(), and blender::geometry::CuboidConfig::vertex_count.
Referenced by blender::nodes::node_geo_mesh_primitive_cube_cc::create_cube_mesh(), create_cuboid_mesh(), create_cuboid_mesh(), blender::nodes::node_geo_bounding_box_cc::node_geo_exec(), blender::bke::tests::BMeshPaintBVHTest::SetUp(), blender::bke::tests::GridsBVHTest::SetUp(), blender::bke::tests::MeshPaintBVHTest::SetUp(), blender::ed::sculpt_paint::undo::tests::SculptUndoTest::SetUp(), blender::ed::sculpt_paint::tests::TEST_F(), and blender::ed::sculpt_paint::tests::TEST_F().
| BLI_NOINLINE bke::CurvesGeometry blender::geometry::create_curve_from_vert_indices | ( | const bke::AttributeAccessor & | mesh_attributes, |
| Span< int > | vert_indices, | ||
| Span< int > | curve_offsets, | ||
| IndexRange | cyclic_curves, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 38 of file mesh_to_curve_convert.cc.
References blender::bke::MutableAttributeAccessor::add(), BLI_NOINLINE, blender::GVArrayCommon::common_info(), create_curve_from_vert_indices(), blender::CURVE_TYPE_POLY, blender::CommonVArrayInfo::data, blender::bke::AttributeIter::data_type, debug_randomize_curve_order(), blender::Default, blender::bke::AttributeIter::domain, filter_builtin_attributes(), blender::bke::GSpanAttributeWriter::finish(), blender::bke::AttributeAccessor::foreach_attribute(), blender::bke::attribute_math::gather(), blender::bke::gather_attributes(), blender::bke::AttributeIter::get(), blender::GPointer::GPointer(), blender::bke::subdiv::init(), blender::IndexRange::is_empty(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::AttributeIter::name, blender::bke::Point, PRF_scope, blender::CommonVArrayInfo::Single, blender::Span< T >::size(), blender::bke::GSpanAttributeWriter::span, blender::bke::String, blender::CommonVArrayInfo::type, blender::GVArrayCommon::type(), and blender::bke::GAttributeReader::varray.
Referenced by create_curve_from_vert_indices(), blender::nodes::node_geo_edge_paths_to_curves_cc::edge_paths_to_curves_convert(), and edges_to_curves_convert().
|
static |
Definition at line 253 of file mesh_to_curve_convert.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::BKE_defgroup_copy_list(), blender::implicit_sharing::copy_shared_pointer(), create_curves_for_faces(), blender::bke::Curve, blender::CURVE_TYPE_POLY, blender::offset_indices::gather_selected_offsets(), blender::index_mask::IndexMask::size(), and blender::offset_indices::OffsetIndices< T >::size().
Referenced by create_curves_for_faces(), and mesh_faces_to_curves_convert().
| Mesh * blender::geometry::create_cylinder_or_cone_mesh | ( | float | radius_top, |
| float | radius_bottom, | ||
| float | depth, | ||
| int | circle_segments, | ||
| int | side_segments, | ||
| int | fill_segments, | ||
| ConeFillType | fill_type, | ||
| ConeAttributeOutputs & | attribute_outputs ) |
Definition at line 662 of file mesh_primitive_cylinder_cone.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::BKE_mesh_new_nomain(), blender::geometry::ConeConfig::bottom_is_point, calculate_bounds_cylinder(), calculate_cone_edges(), calculate_cone_faces(), calculate_cone_uvs(), calculate_cone_verts(), calculate_selection_outputs(), create_cylinder_or_cone_mesh(), create_line_mesh(), create_vertex_mesh(), blender::MutableSpan< T >::drop_back(), float, blender::geometry::ConeConfig::height, blender::bke::mesh_smooth_set(), blender::geometry::ConeConfig::side_segments, blender::geometry::ConeConfig::top_is_point, blender::geometry::ConeConfig::tot_corners, blender::geometry::ConeConfig::tot_edges, blender::geometry::ConeConfig::tot_faces, blender::geometry::ConeConfig::tot_verts, and blender::geometry::ConeAttributeOutputs::uv_map_id.
Referenced by create_cylinder_or_cone_mesh(), blender::nodes::node_geo_mesh_primitive_cone_cc::node_geo_exec(), and blender::nodes::node_geo_mesh_primitive_cylinder_cc::node_geo_exec().
| Mesh * blender::geometry::create_grid_mesh | ( | int | verts_x, |
| int | verts_y, | ||
| float | size_x, | ||
| float | size_y, | ||
| std::optional< StringRef > | uv_map_id ) |
Definition at line 44 of file mesh_primitive_grid.cc.
References blender::BKE_mesh_new_nomain(), blender::BLI_assert(), create_grid_mesh(), blender::offset_indices::fill_constant_group_size(), blender::threading::memory_bandwidth_bound_task(), blender::bke::mesh_smooth_set(), and blender::MutableSpan< T >::size_in_bytes().
Referenced by blender::nodes::node_geo_mesh_primitive_cube_cc::create_cube_mesh(), create_grid_mesh(), blender::nodes::node_geo_mesh_primitive_grid_cc::node_geo_exec(), blender::ed::sculpt_paint::tests::TEST_F(), blender::ed::sculpt_paint::tests::TEST_F(), and blender::ed::sculpt_paint::tests::TEST_F().
|
static |
Definition at line 126 of file mix_geometries.cc.
References create_id_index_map(), blender::bke::GAttributeReader::domain, blender::blender::Span< T >::index_range(), blender::CPPType::is(), blender::bke::AttributeAccessor::lookup(), blender::threading::parallel_for(), blender::bke::GAttributeReader::sharing_info, sharing_info_equal(), blender::blender::Span< T >::size(), blender::GVArrayCommon::type(), blender::GVArray::typed(), and blender::bke::GAttributeReader::varray.
Referenced by create_id_index_map(), and mix_geometries().
Definition at line 17 of file mesh_primitive_line.cc.
References blender::BKE_mesh_new_nomain(), create_line_mesh(), blender::threading::memory_bandwidth_bound_task(), and blender::MutableSpan< T >::size_in_bytes().
Referenced by blender::nodes::node_geo_mesh_primitive_cube_cc::create_cube_mesh(), create_cylinder_or_cone_mesh(), create_line_mesh(), and blender::nodes::node_geo_mesh_primitive_line_cc::node_geo_exec().
|
static |
Definition at line 948 of file mesh_merge_verts.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::bke::attribute_filter_with_skip_ref(), blender::BKE_mesh_copy_parameters_for_eval(), blender::BKE_mesh_new_nomain(), blender::BLI_assert(), blender::CD_CONSTRUCT, blender::CD_ORIGINDEX, copy_and_mix_attributes(), create_merged_mesh(), blender::CustomData_add_layer(), blender::CustomData_get_layer(), blender::CustomData_has_layer(), blender::Default, blender::geometry::MergePropagationMap::dst_to_src, blender::bke::Edge, blender::geometry::WeldMesh::edge_src_to_target, find_affected_verts(), blender::array_utils::gather(), get_vertex_group_names(), blender::MutableSpan< T >::index_range(), merge_propagation_map(), merge_src_to_dst_map(), merge_survivors(), mix_vertex_groups(), blender::geometry::WeldMesh::new_faces_num, blender::threading::parallel_for(), blender::bke::Point, PRF_scope, blender::geometry::WeldMesh::removed_corners_num, blender::geometry::WeldMesh::removed_edges_num, blender::geometry::WeldMesh::removed_faces_num, blender::geometry::WeldMesh::removed_verts_num, blender::result, SCOPED_TIMER, blender::index_mask::IndexMask::size(), blender::offset_indices::OffsetIndices< T >::size(), blender::Span< T >::size(), and weld_mesh_context_create().
Referenced by create_merged_mesh(), mesh_merge_by_distance_connected(), mesh_merge_verts(), and mesh_merge_verts().
|
static |
Definition at line 106 of file set_curve_type.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), create_nurbs_to_bezier_handles(), float, blender::IndexRange::IndexRange(), is_nurbs_to_bezier_one_to_one(), blender::NURBS_KNOT_MODE_NORMAL, blender::Vector< T, InlineBufferCapacity, Allocator >::pop_last(), and blender::Span< T >::size().
Referenced by convert_curves_to_bezier(), and create_nurbs_to_bezier_handles().
|
static |
Definition at line 174 of file set_curve_type.cc.
References create_nurbs_to_bezier_positions(), blender::MutableSpan< T >::index_range(), blender::math::interpolate(), is_nurbs_to_bezier_one_to_one(), and scale_input_assign().
Referenced by convert_curves_to_bezier(), and create_nurbs_to_bezier_positions().
|
static |
Definition at line 279 of file mesh_to_curve_convert.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), create_point_to_vert_map(), blender::array_utils::gather_group_to_group(), blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::index_mask::IndexMask::size(), blender::offset_indices::OffsetIndices< T >::size(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by create_point_to_vert_map(), and mesh_faces_to_curves_convert().
|
static |
Definition at line 462 of file realize_instances.cc.
References create_result_ids(), blender::MutableSpan< T >::fill(), blender::MutableSpan< T >::index_range(), blender::VArrayCommon< T >::is_empty(), blender::VArrayCommon< T >::materialize(), options, and blender::threading::parallel_for().
Referenced by create_result_ids(), and execute_realize_pointcloud_task().
| Mesh * blender::geometry::create_uv_sphere_mesh | ( | float | radius, |
| int | segments, | ||
| int | rings, | ||
| std::optional< StringRef > | uv_map_id ) |
Definition at line 302 of file mesh_primitive_uv_sphere.cc.
References blender::BKE_mesh_new_nomain(), calculate_bounds_uv_sphere(), calculate_sphere_corners(), calculate_sphere_edge_indices(), calculate_sphere_faces(), calculate_sphere_uvs(), calculate_sphere_vertex_data(), create_uv_sphere_mesh(), blender::bke::mesh_smooth_set(), blender::bke::mesh_vert_normals_assign(), blender::threading::parallel_invoke(), sphere_corner_total(), sphere_edge_total(), sphere_face_total(), and sphere_vert_total().
Referenced by create_uv_sphere_mesh(), and blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::node_geo_exec().
|
static |
Definition at line 648 of file mesh_primitive_cylinder_cone.cc.
References blender::BKE_mesh_new_nomain(), and create_vertex_mesh().
Referenced by create_cylinder_or_cone_mesh(), and create_vertex_mesh().
| void blender::geometry::curve_simplify | ( | const Span< float3 > | positions, |
| const bool | cyclic, | ||
| const float | epsilon, | ||
| const GSpan | attribute_data, | ||
| MutableSpan< bool > | points_to_delete ) |
Same as above, but only for a single curve. All spans are expected to be the size of the curve.
Definition at line 124 of file simplify_curves.cc.
References curve_simplify(), float, T, blender::CPPType::to_static_type(), blender::GSpan::type(), and blender::GSpan::typed().
Referenced by curve_simplify(), curve_simplify(), simplify_curve_attribute(), and blender::ed::sculpt_paint::greasepencil::simplify_stroke().
|
static |
Definition at line 98 of file simplify_curves.cc.
References blender::MutableSpan< T >::as_span(), curve_simplify(), blender::array_utils::find_all_ranges(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), and blender::threading::parallel_for().
| bke::CurvesGeometry blender::geometry::curves_merge_endpoints | ( | const bke::CurvesGeometry & | src_curves, |
| Span< int > | connect_to_curve, | ||
| Span< bool > | flip_direction, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Join each selected curve's end point with another curve's start point to form a single curve.
| connect_to_curve | Index of the curve to connect to, invalid indices are ignored (set to -1 to leave a curve disconnected). |
| flip_direction | Flip direction of input curves. |
curves_merge_endpoints seems to be working only with CURVE_TYPE_POLY, still adding this here in advance.
Definition at line 298 of file merge_curves.cc.
References blender::BLI_assert(), curves_merge_endpoints(), blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), blender::bke::CurvesGeometry::cyclic_for_write(), find_connected_ranges(), join_curves_ranges(), blender::bke::CurvesGeometry::nurbs_has_custom_knots(), blender::NURBS_KNOT_MODE_NORMAL, reorder_and_flip_curves(), blender::Span< T >::size(), toposort_connected_curves(), and blender::bke::curves::nurbs::update_custom_knot_modes().
Referenced by curves_merge_endpoints(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), and blender::geometry::tests::TEST_F().
| void blender::geometry::debug_randomize_curve_order | ( | bke::CurvesGeometry * | curves | ) |
Definition at line 274 of file randomize.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::bke::Curve, debug_randomize_curve_order(), get_permutation(), invert_permutation(), make_new_offset_indices(), blender::bke::Point, reorder_attribute_domain(), reorder_attribute_groups(), reorder_customdata_groups(), seed_from_curves(), and use_debug_randomization().
Referenced by create_curve_from_vert_indices(), blender::nodes::node_geo_string_to_curves_cc::create_curve_instances(), blender::nodes::node_geo_points_to_curves_cc::curves_from_points(), and debug_randomize_curve_order().
| void blender::geometry::debug_randomize_edge_order | ( | Mesh * | mesh | ) |
Definition at line 138 of file randomize.cc.
References debug_randomize_edge_order(), blender::e, blender::bke::Edge, get_permutation(), invert_permutation(), reorder_attribute_domain(), reorder_customdata(), seed_from_mesh(), and use_debug_randomization().
Referenced by debug_randomize_edge_order(), debug_randomize_mesh_order(), blender::nodes::node_geo_triangulate_cc::node_geo_exec(), and split_edges().
| void blender::geometry::debug_randomize_face_order | ( | Mesh * | mesh | ) |
Definition at line 229 of file randomize.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::bke::Corner, debug_randomize_face_order(), blender::bke::Face, get_permutation(), invert_permutation(), make_new_offset_indices(), reorder_attribute_domain(), reorder_attribute_groups(), reorder_customdata(), reorder_customdata_groups(), seed_from_mesh(), and use_debug_randomization().
Referenced by debug_randomize_face_order(), debug_randomize_mesh_order(), and blender::nodes::node_geo_triangulate_cc::node_geo_exec().
| void blender::geometry::debug_randomize_instance_order | ( | bke::Instances * | instances | ) |
Definition at line 316 of file randomize.cc.
References blender::bke::Instances::attribute_storage(), debug_randomize_instance_order(), get_permutation(), blender::bke::Instance, blender::bke::Instances::instances_num(), reorder_attribute_domain(), seed_from_instances(), and use_debug_randomization().
Referenced by debug_randomize_instance_order(), and blender::nodes::node_geo_split_to_instances_cc::node_geo_exec().
| void blender::geometry::debug_randomize_mesh_order | ( | Mesh * | mesh | ) |
Definition at line 305 of file randomize.cc.
References debug_randomize_edge_order(), debug_randomize_face_order(), debug_randomize_mesh_order(), debug_randomize_vert_order(), and use_debug_randomization().
Referenced by blender::nodes::node_geo_mesh_primitive_ico_sphere_cc::create_ico_sphere_mesh(), blender::nodes::node_geo_curve_to_mesh_cc::curve_to_mesh(), debug_randomize_mesh_order(), blender::doEdgeSplit(), blender::modify_mesh(), blender::modify_mesh(), blender::nodes::node_geo_boolean_cc::node_geo_exec(), blender::nodes::node_geo_convex_hull_cc::node_geo_exec(), blender::nodes::node_geo_dual_mesh_cc::node_geo_exec(), blender::nodes::node_geo_extrude_mesh_cc::node_geo_exec(), and blender::nodes::node_geo_grid_to_mesh_cc::node_geo_exec().
| void blender::geometry::debug_randomize_point_order | ( | PointCloud * | pointcloud | ) |
Definition at line 258 of file randomize.cc.
References blender::PointCloud::attribute_storage, debug_randomize_point_order(), get_permutation(), invert_permutation(), blender::bke::Point, reorder_attribute_domain(), seed_from_pointcloud(), blender::PointCloud::totpoint, and use_debug_randomization().
Referenced by blender::nodes::node_geo_distribute_points_on_faces_cc::create_points_poisson_disk(), blender::nodes::node_geo_distribute_points_on_faces_cc::create_points_random(), debug_randomize_point_order(), blender::nodes::node_geo_distribute_points_in_grid_cc::node_geo_exec(), blender::nodes::node_geo_distribute_points_in_volume_cc::node_geo_exec(), and blender::nodes::node_geo_grid_to_points_cc::node_geo_exec().
| void blender::geometry::debug_randomize_vert_order | ( | Mesh * | mesh | ) |
Definition at line 115 of file randomize.cc.
References debug_randomize_vert_order(), get_permutation(), invert_permutation(), blender::bke::Point, reorder_attribute_domain(), reorder_customdata(), seed_from_mesh(), use_debug_randomization(), and blender::v.
Referenced by debug_randomize_mesh_order(), debug_randomize_vert_order(), and split_edges().
|
static |
Definition at line 110 of file mesh_primitive_cuboid.cc.
References define_quad().
Referenced by calculate_corner_verts(), and define_quad().
|
static |
Definition at line 85 of file separate_geometry.cc.
References delete_selected_instances(), blender::fn::FieldEvaluator::evaluate(), blender::fn::FieldEvaluator::get_evaluated_selection_as_mask(), blender::bke::GeometrySet::get_instances_for_write(), blender::bke::Instances::instances_num(), blender::index_mask::IndexMask::is_empty(), blender::bke::GeometrySet::remove(), blender::bke::Instances::remove(), and blender::fn::FieldEvaluator::set_selection().
Referenced by delete_selected_instances(), and separate_geometry().
|
static |
Compute signed distance squared to a line passing through uva and uvb.
Definition at line 72 of file uv_pack.cc.
References dist_signed_squared_to_edge(), and blender::math::length_squared().
Referenced by blender::geometry::PackIsland::add_triangle(), dist_signed_squared_to_edge(), and signed_distance_fat_triangle().
|
static |
Definition at line 23 of file fillet_curves.cc.
References duplicate_fillet_point_data(), blender::index_mask::IndexMask::foreach_index(), blender::bke::attribute_math::gather_to_groups(), blender::exec_mode::grain_size(), blender::bke::curves::per_curve_point_offsets_range(), blender::IndexRange::size(), blender::GMutableSpan::slice(), blender::GSpan::slice(), and blender::Span< T >::slice().
Referenced by duplicate_fillet_point_data(), and fillet_curves().
|
static |
Definition at line 333 of file mesh_split_edges.cc.
References edge_from_corner(), and blender::bke::mesh::face_corner_next().
Referenced by calc_new_edges(), edge_from_corner(), and update_unselected_edges().
| IndexMask blender::geometry::edge_selection_from_face | ( | OffsetIndices< int > | faces, |
| const IndexMask & | face_mask, | ||
| Span< int > | corner_edges, | ||
| int | edges_num, | ||
| IndexMaskMemory & | memory ) |
An edge is selected if it is used by a selected face.
Definition at line 58 of file mesh_selection.cc.
References edge_selection_from_face(), and mapped_corner_selection_from_face().
Referenced by blender::ed::transform::calc_target_elems(), edge_selection_from_face(), and mesh_copy_selection_keep_verts().
| IndexMask blender::geometry::edge_selection_from_vert | ( | Span< int2 > | edges, |
| Span< bool > | vert_selection, | ||
| IndexMaskMemory & | memory ) |
An edge is selected if both of its vertices are selected.
Definition at line 67 of file mesh_selection.cc.
References blender::Default, edge_selection_from_vert(), blender::IndexMask::from_predicate(), blender::Span< T >::index_range(), and PRF_scope.
Referenced by edge_selection_from_vert().
|
static |
Definition at line 118 of file mesh_to_curve_convert.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), BLI_NOINLINE, blender::offset_indices::build_reverse_offsets(), blender::Span< T >::cast(), blender::Default, blender::IndexRange::drop_front(), edges_to_curve_point_indices(), blender::Span< T >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::IndexRange::IndexRange(), PRF_scope, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and blender::v2.
Referenced by edges_to_curve_point_indices(), and edges_to_curves_convert().
|
static |
Definition at line 228 of file mesh_to_curve_convert.cc.
References BLI_NOINLINE, create_curve_from_vert_indices(), edges_to_curve_point_indices(), edges_to_curves_convert(), and output.
Referenced by edges_to_curves_convert(), and mesh_edges_to_curves_convert().
|
static |
Definition at line 1115 of file realize_instances.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::BLI_assert(), blender::array_utils::copy(), blender::Default, blender::CPPType::default_value(), ELEM, execute_instances_tasks(), blender::bke::GSpanAttributeWriter::finish(), blender::array_utils::gather(), blender::bke::InstancesComponent::get(), blender::geometry::OrderedAttributes::index_range(), blender::Span< T >::index_range(), blender::bke::Instance, blender::bke::Instances::instances_num(), blender::Span< T >::is_empty(), blender::geometry::OrderedAttributes::kinds, blender::bke::AttributeAccessor::lookup(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::geometry::OrderedAttributes::names, PRF_scope, blender::bke::Instances::reference_handles(), blender::bke::Instances::references(), blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::geometry::OrderedAttributes::size(), blender::Span< T >::size(), blender::GMutableSpan::slice(), blender::MutableSpan< T >::slice(), blender::bke::GSpanAttributeWriter::span, threaded_copy(), threaded_fill(), blender::offset_indices::OffsetIndices< T >::total_size(), blender::bke::Instances::transforms(), try_join_single_value_attribute(), and blender::GMutableSpan::type().
Referenced by execute_instances_tasks(), and realize_instances().
|
static |
Definition at line 2325 of file realize_instances.cc.
References blender::geometry::AllCurvesInfo::create_custom_normal_attribute, blender::geometry::AllCurvesInfo::create_handle_postion_attributes, blender::geometry::AllCurvesInfo::create_radius_attribute, blender::geometry::CurvesElementStartIndices::curve, blender::geometry::RealizeCurveTask::curve_info, blender::geometry::RealizeCurveInfo::curves, blender::geometry::CurvesElementStartIndices::custom_knot, blender::geometry::RealizeCurveInfo::custom_normal, execute_realize_curve_task(), blender::MutableSpan< T >::fill(), blender::geometry::RealizeCurveInfo::handle_left, blender::geometry::RealizeCurveInfo::handle_right, blender::VArrayCommon< T >::is_empty(), blender::VArrayCommon< T >::materialize(), blender::bke::CurvesGeometry::offsets_for_write(), options, blender::threading::parallel_for(), blender::geometry::CurvesElementStartIndices::point, blender::bke::CurvesGeometry::positions_for_write(), blender::geometry::RealizeCurveInfo::radius, blender::MutableSpan< T >::slice(), blender::geometry::RealizeCurveTask::start_indices, blender::geometry::RealizeCurveTask::transform, blender::math::transform_normals(), and blender::math::transform_points().
Referenced by execute_realize_curve_task().
|
static |
Definition at line 2469 of file realize_instances.cc.
References add_instance_attributes_to_single_geometry(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::geometry::RealizeCurveTask::attribute_fallbacks, blender::bke::CurvesGeometry::attributes_for_write(), blender::BKE_curves_copy_for_eval(), copy_vertex_group_names(), blender::geometry::AllCurvesInfo::create_fill_id_attribute, blender::geometry::AllCurvesInfo::create_id_attribute, blender::bke::Curve, blender::geometry::RealizeCurveTask::curve_info, blender::geometry::RealizeCurveInfo::curves, blender::bke::curves_copy_parameters(), blender::bke::curves_new_nomain(), blender::geometry::GatherOffsets::curves_offsets, blender::Default, blender::geometry::RealizeInstancesResult::errors, execute_realize_curve_tasks(), blender::Span< T >::first(), blender::geometry::RealizeInstancesResult::geometry, blender::geometry::OrderedAttributes::index_range(), blender::Span< T >::is_empty(), blender::geometry::OrderedAttributes::kinds, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::geometry::OrderedAttributes::names, blender::bke::CurvesGeometry::nurbs_custom_knots_resize(), blender::bke::CurvesGeometry::offsets_for_write(), options, blender::geometry::AllCurvesInfo::order, blender::bke::Point, PRF_scope, blender::bke::GeometrySet::replace_curves(), RPT_, blender::Span< T >::size(), skip_transform(), blender::geometry::RealizeCurveTask::transform, try_join_single_value_attribute(), and valid_int_num().
Referenced by execute_realize_curve_tasks(), and realize_instances().
|
static |
Definition at line 2850 of file realize_instances.cc.
References blender::Default, execute_realize_edit_data_tasks(), blender::bke::GeometrySet::get_component_for_write(), blender::Span< T >::is_empty(), and PRF_scope.
Referenced by execute_realize_edit_data_tasks(), and realize_instances().
|
static |
Definition at line 2693 of file realize_instances.cc.
References blender::geometry::RealizeGreasePencilTask::attribute_fallbacks, blender::geometry::GreasePencilRealizeInfo::attributes, blender::bke::CurvesGeometry::attributes_for_write(), blender::BKE_grease_pencil_copy_layer_parameters(), copy_generic_attributes_to_result(), blender::bke::Curve, execute_realize_grease_pencil_task(), blender::bke::SpanAttributeWriter< T >::finish(), blender::geometry::GreasePencilRealizeInfo::grease_pencil, blender::geometry::RealizeGreasePencilTask::grease_pencil_info, blender::Span< T >::index_range(), blender::bke::greasepencil::Layer::local_transform(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::geometry::GreasePencilRealizeInfo::material_index_map, blender::bke::greasepencil::Layer::set_local_transform(), blender::Span< T >::size(), blender::bke::SpanAttributeWriter< T >::span, blender::geometry::RealizeGreasePencilTask::start_index, blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::strokes_for_write(), and blender::geometry::RealizeGreasePencilTask::transform.
Referenced by execute_realize_grease_pencil_task().
|
static |
Definition at line 2756 of file realize_instances.cc.
References add_instance_attributes_to_single_geometry(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::geometry::RealizeGreasePencilTask::attribute_fallbacks, blender::BKE_grease_pencil_copy_for_eval(), blender::BKE_grease_pencil_copy_parameters(), blender::BKE_grease_pencil_new_nomain(), blender::Default, blender::geometry::RealizeInstancesResult::errors, execute_realize_grease_pencil_tasks(), blender::Span< T >::first(), blender::geometry::RealizeInstancesResult::geometry, blender::geometry::GreasePencilRealizeInfo::grease_pencil, blender::geometry::RealizeGreasePencilTask::grease_pencil_info, blender::geometry::GatherOffsets::grease_pencil_layer_offset, blender::geometry::OrderedAttributes::index_range(), blender::Span< T >::is_empty(), blender::geometry::OrderedAttributes::kinds, blender::bke::Layer, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::geometry::AllGreasePencilsInfo::materials, blender::MEM_new_array_zeroed(), blender::geometry::OrderedAttributes::names, PRF_scope, blender::bke::GeometrySet::replace_grease_pencil(), RPT_, blender::Span< T >::size(), skip_transform(), blender::geometry::RealizeGreasePencilTask::transform, transform_grease_pencil_layers(), try_join_single_value_attribute(), blender::uninitialized_copy_n(), and valid_int_num().
Referenced by execute_realize_grease_pencil_tasks(), and realize_instances().
|
static |
Definition at line 1675 of file realize_instances.cc.
References blender::geometry::MeshElementStartIndices::corner, blender::geometry::MeshRealizeInfo::corner_edges, blender::geometry::MeshRealizeInfo::corner_verts, blender::geometry::MeshElementStartIndices::edge, blender::geometry::MeshRealizeInfo::edges, execute_realize_mesh_task(), blender::geometry::MeshElementStartIndices::face, blender::geometry::MeshRealizeInfo::faces, blender::Span< T >::index_range(), blender::geometry::MeshRealizeInfo::mesh, blender::geometry::RealizeMeshTask::mesh_info, options, blender::threading::parallel_for(), blender::geometry::MeshRealizeInfo::positions, blender::offset_indices::OffsetIndices< T >::size(), blender::Span< T >::size(), blender::MutableSpan< T >::slice(), blender::geometry::RealizeMeshTask::start_indices, blender::geometry::RealizeMeshTask::transform, blender::math::transform_points(), and blender::geometry::MeshElementStartIndices::vert.
Referenced by execute_realize_mesh_task().
|
static |
Prepare original index layers for Edit Mode / CrazySpace mapping.
Definition at line 1986 of file realize_instances.cc.
References add_instance_attributes_to_single_geometry(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::geometry::RealizeMeshTask::attribute_fallbacks, blender::BKE_id_material_eval_assign(), blender::BKE_mesh_copy_for_eval(), blender::BKE_mesh_copy_parameters_for_eval(), blender::BKE_mesh_new_nomain(), blender::BLI_assert(), blender::CD_ORIGINDEX, blender::CD_SET_DEFAULT, copy_vertex_group_names(), blender::bke::Corner, blender::bke::mesh::NormalJoinInfo::CornerFan, blender::geometry::AllMeshesInfo::create_id_attribute, blender::geometry::AllMeshesInfo::create_origindex_edge_attribute, blender::geometry::AllMeshesInfo::create_origindex_face_attribute, blender::geometry::AllMeshesInfo::create_origindex_vert_attribute, blender::geometry::AllMeshesInfo::custom_normal_info, blender::CustomData_add_layer(), blender::data, blender::Default, blender::Mesh::edge_data, blender::geometry::RealizeInstancesResult::errors, execute_realize_mesh_tasks(), blender::Mesh::face_data, blender::Mesh::faces_num, blender::Span< T >::first(), blender::bke::Float3, blender::bke::mesh::NormalJoinInfo::Free, blender::geometry::RealizeInstancesResult::geometry, blender::Mesh::id, blender::geometry::OrderedAttributes::index_range(), blender::bke::Int16_2D, blender::Span< T >::is_empty(), blender::math::is_negative(), blender::geometry::OrderedAttributes::kinds, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::geometry::MeshRealizeInfo::mesh, blender::bke::mesh_flip_faces(), blender::geometry::RealizeMeshTask::mesh_info, blender::geometry::GatherOffsets::mesh_offsets, blender::bke::mesh_transform(), blender::geometry::OrderedAttributes::names, blender::bke::mesh::NormalJoinInfo::None, options, blender::geometry::AllMeshesInfo::order, blender::bke::Point, PRF_scope, blender::bke::GeometrySet::replace_mesh(), blender::bke::mesh::NormalJoinInfo::result_domain, blender::bke::mesh::NormalJoinInfo::result_type, RPT_, blender::Span< T >::size(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), skip_transform(), blender::geometry::RealizeMeshTask::transform, try_join_single_value_attribute(), valid_int_num(), blender::Mesh::vert_data, blender::Mesh::vertex_group_active_index, and blender::Mesh::vertex_group_names.
Referenced by execute_realize_mesh_tasks(), and realize_instances().
|
static |
Definition at line 1324 of file realize_instances.cc.
References blender::geometry::RealizePointCloudTask::attribute_fallbacks, blender::geometry::PointCloudRealizeInfo::attributes, copy_generic_attributes_to_result(), create_result_ids(), execute_realize_pointcloud_task(), blender::geometry::RealizePointCloudTask::id, blender::MutableSpan< T >::is_empty(), blender::VArrayCommon< T >::materialize(), options, blender::geometry::PointCloudRealizeInfo::pointcloud, blender::geometry::RealizePointCloudTask::pointcloud_info, blender::geometry::PointCloudRealizeInfo::positions, blender::geometry::PointCloudRealizeInfo::radii, blender::MutableSpan< T >::slice(), blender::geometry::RealizePointCloudTask::start_index, blender::geometry::PointCloudRealizeInfo::stored_ids, blender::PointCloud::totpoint, blender::geometry::RealizePointCloudTask::transform, and blender::math::transform_points().
Referenced by execute_realize_pointcloud_task().
|
static |
Definition at line 1381 of file realize_instances.cc.
References add_instance_attributes_to_single_geometry(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::geometry::RealizePointCloudTask::attribute_fallbacks, blender::BKE_pointcloud_copy_for_eval(), blender::BKE_pointcloud_new_nomain(), blender::geometry::AllPointCloudsInfo::create_id_attribute, blender::geometry::AllPointCloudsInfo::create_radius_attribute, blender::Default, blender::geometry::RealizeInstancesResult::errors, execute_realize_pointcloud_tasks(), blender::Span< T >::first(), blender::geometry::RealizeInstancesResult::geometry, blender::geometry::OrderedAttributes::index_range(), blender::Span< T >::is_empty(), blender::geometry::OrderedAttributes::kinds, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::PointCloud::mat, blender::geometry::OrderedAttributes::names, options, blender::bke::Point, blender::geometry::PointCloudRealizeInfo::pointcloud, blender::geometry::RealizePointCloudTask::pointcloud_info, blender::geometry::GatherOffsets::pointcloud_offset, PRF_scope, blender::bke::GeometrySet::replace_pointcloud(), RPT_, blender::Span< T >::size(), skip_transform(), blender::PointCloud::totcol, blender::geometry::RealizePointCloudTask::transform, blender::math::transform_points(), try_join_single_value_attribute(), blender::PointCloud::type, and valid_int_num().
Referenced by execute_realize_pointcloud_tasks(), and realize_instances().
|
static |
Definition at line 72 of file extend_curves.cc.
References blender::math::abs(), angle(), blender::math::angle_between(), blender::math::ceil(), blender::math::clamp(), blender::math::cross(), extend_curve_curved(), FLT_EPSILON, blender::math::from_rotation(), len(), M_PI, blender::math::max(), blender::math::min(), blender::math::normalize(), blender::math::normalize_and_get_length(), blender::normalize_v3(), blender::math::pow(), rot, sin, blender::offset_indices::OffsetIndices< T >::size(), blender::math::to_quaternion(), and blender::math::transform_point().
Referenced by extend_curve_curved().
|
static |
Definition at line 24 of file extend_curves.cc.
References blender::math::ceil(), extend_curve_straight(), blender::IndexRange::first(), blender::math::floor(), fmodf, blender::math::interpolate(), blender::math::is_zero(), blender::IndexRange::last(), blender::math::length(), and blender::result.
Referenced by extend_curve_straight().
| bke::CurvesGeometry blender::geometry::extend_curves | ( | bke::CurvesGeometry & | src_curves, |
| const IndexMask & | selection, | ||
| const VArray< float > & | start_lengths, | ||
| const VArray< float > & | end_lengths, | ||
| float | overshoot_fac, | ||
| bool | follow_curvature, | ||
| float | point_density, | ||
| float | segment_influence, | ||
| float | max_angle, | ||
| bool | invert_curvature, | ||
| GeometryNodeCurveSampleMode | sample_mode, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 199 of file extend_curves.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), blender::math::ceil(), blender::offset_indices::copy_group_sizes(), blender::bke::curves::copy_only_curve_domain(), blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::ensure_evaluated_lengths(), blender::bke::CurvesGeometry::evaluated_length_total_for_curve(), extend_curves(), blender::MutableSpan< T >::fill(), blender::index_mask::IndexMask::foreach_index(), blender::bke::gather_attributes(), blender::GEO_NODE_CURVE_SAMPLE_FACTOR, blender::MutableSpan< T >::index_range(), blender::index_mask::IndexMask::is_empty(), blender::MutableSpan< T >::last(), blender::index_mask::masked_fill(), blender::bke::CurvesGeometry::offsets_for_write(), blender::threading::parallel_for(), blender::bke::Point, blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::points_num(), blender::bke::CurvesGeometry::positions_for_write(), blender::bke::CurvesGeometry::resize(), blender::MutableSpan< T >::size(), blender::offset_indices::OffsetIndices< T >::size(), and blender::MutableSpan< T >::slice().
Referenced by blender::deform_drawing(), and extend_curves().
| Array< Curves * > blender::geometry::extract_curves | ( | const Curves & | curves, |
| const IndexMask & | mask, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 323 of file extract_elements.cc.
References blender::bke::CurvesGeometry::attributes(), blender::BLI_assert(), blender::bke::curves_copy_parameters(), blender::bke::curves_new_nomain(), blender::element, extract_curves(), blender::bke::gather_attributes(), blender::exec_mode::grain_size(), blender::bke::CurvesGeometry::points_by_curve(), and blender::IndexRange::size().
Referenced by extract_curves(), and blender::nodes::LazyFunctionForForeachGeometryElementZone::try_extract_element_geometries().
| Array< Curves * > blender::geometry::extract_curves_points | ( | const Curves & | curves, |
| const IndexMask & | mask, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 283 of file extract_elements.cc.
References blender::bke::CurvesGeometry::attributes(), blender::BLI_assert(), blender::CURVE_TYPE_POLY, blender::bke::curves_copy_parameters(), blender::bke::curves_new_nomain_single(), blender::element, extract_curves_points(), blender::bke::gather_attributes(), blender::exec_mode::grain_size(), and blender::bke::CurvesGeometry::point_to_curve_map().
Referenced by extract_curves_points(), and blender::nodes::LazyFunctionForForeachGeometryElementZone::try_extract_element_geometries().
| Array< GreasePencil * > blender::geometry::extract_greasepencil_layer_curves | ( | const GreasePencil & | grease_pencil, |
| int | layer_i, | ||
| const IndexMask & | mask, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 497 of file extract_elements.cc.
References blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), blender::BKE_grease_pencil_new_nomain(), blender::element, extract_greasepencil_layer_curves(), blender::bke::gather_attributes(), blender::exec_mode::grain_size(), blender::ActionLayer::name, blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::resize(), blender::IndexRange::size(), blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::strokes_for_write(), and blender::bke::CurvesGeometry::update_curve_types().
Referenced by extract_greasepencil_layer_curves(), and blender::nodes::LazyFunctionForForeachGeometryElementZone::try_extract_element_geometries().
| Array< GreasePencil * > blender::geometry::extract_greasepencil_layer_points | ( | const GreasePencil & | grease_pencil, |
| int | layer_i, | ||
| const IndexMask & | mask, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 440 of file extract_elements.cc.
References blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), blender::BKE_grease_pencil_new_nomain(), blender::element, extract_greasepencil_layer_points(), blender::bke::gather_attributes(), blender::exec_mode::grain_size(), blender::ActionLayer::name, blender::bke::CurvesGeometry::offsets_for_write(), blender::bke::CurvesGeometry::point_to_curve_map(), blender::bke::CurvesGeometry::resize(), blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::strokes_for_write(), and blender::bke::CurvesGeometry::update_curve_types().
Referenced by extract_greasepencil_layer_points(), and blender::nodes::LazyFunctionForForeachGeometryElementZone::try_extract_element_geometries().
| Array< GreasePencil * > blender::geometry::extract_greasepencil_layers | ( | const GreasePencil & | grease_pencil, |
| const IndexMask & | mask, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 400 of file extract_elements.cc.
References blender::BKE_grease_pencil_new_nomain(), blender::BLI_assert(), blender::element, extract_greasepencil_layers(), blender::bke::gather_attributes(), blender::exec_mode::grain_size(), blender::ActionLayer::name, blender::bke::greasepencil::Drawing::strokes(), and blender::bke::greasepencil::Drawing::strokes_for_write().
Referenced by extract_greasepencil_layers(), and blender::nodes::LazyFunctionForForeachGeometryElementZone::try_extract_element_geometries().
| Array< bke::Instances * > blender::geometry::extract_instances | ( | const bke::Instances & | instances, |
| const IndexMask & | mask, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 362 of file extract_elements.cc.
References blender::bke::attribute_filter_with_skip_ref(), blender::bke::Instances::attributes(), blender::BLI_assert(), blender::element, extract_instances(), blender::bke::gather_attributes(), blender::exec_mode::grain_size(), blender::geometry::Instances::Instances(), blender::bke::Instances::instances_num(), blender::bke::Instances::reference_handles(), blender::bke::Instances::references(), and blender::bke::Instances::transforms().
Referenced by extract_instances(), and blender::nodes::LazyFunctionForForeachGeometryElementZone::try_extract_element_geometries().
| Array< Mesh * > blender::geometry::extract_mesh_edges | ( | const Mesh & | mesh, |
| const IndexMask & | mask, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 80 of file extract_elements.cc.
References blender::bke::AttributeAccessor::adapt_domain(), blender::bke::AttributeFilter::allow_skip(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BKE_mesh_copy_parameters_for_eval(), blender::BKE_mesh_new_nomain(), blender::BLI_assert(), blender::bke::AttributeIter::data_type, blender::bke::GAttributeReader::domain, ELEM, blender::element, extract_mesh_edges(), blender::bke::GSpanAttributeWriter::finish(), blender::bke::AttributeAccessor::foreach_attribute(), blender::bke::AttributeIter::get(), blender::exec_mode::grain_size(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::AttributeIter::name, blender::bke::GSpanAttributeWriter::span, and blender::bke::String.
Referenced by extract_mesh_edges(), and blender::nodes::LazyFunctionForForeachGeometryElementZone::try_extract_element_geometries().
| Array< Mesh * > blender::geometry::extract_mesh_faces | ( | const Mesh & | mesh, |
| const IndexMask & | mask, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 156 of file extract_elements.cc.
References blender::bke::AttributeFilter::allow_skip(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BKE_mesh_copy_parameters_for_eval(), blender::BKE_mesh_new_nomain(), blender::BLI_assert(), BLI_assert_unreachable, blender::GMutableSpan::data(), blender::Span< T >::data(), blender::bke::AttributeIter::data_type, blender::bke::GAttributeReader::domain, ELEM, blender::element, extract_mesh_faces(), blender::bke::GSpanAttributeWriter::finish(), blender::bke::AttributeAccessor::foreach_attribute(), blender::bke::AttributeIter::get(), blender::exec_mode::grain_size(), blender::IndexRange::IndexRange(), blender::MutableSpan< T >::last(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::AttributeIter::name, blender::IndexRange::size(), blender::bke::GSpanAttributeWriter::span, and blender::bke::String.
Referenced by extract_mesh_faces(), and blender::nodes::LazyFunctionForForeachGeometryElementZone::try_extract_element_geometries().
| Array< Mesh * > blender::geometry::extract_mesh_vertices | ( | const Mesh & | mesh, |
| const IndexMask & | mask, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 32 of file extract_elements.cc.
References blender::bke::AttributeFilter::allow_skip(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BKE_mesh_copy_parameters_for_eval(), blender::BKE_mesh_new_nomain(), blender::BLI_assert(), blender::bke::AttributeIter::data_type, blender::element, extract_mesh_vertices(), blender::bke::GSpanAttributeWriter::finish(), blender::bke::AttributeAccessor::foreach_attribute(), blender::bke::AttributeIter::get(), blender::exec_mode::grain_size(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::AttributeIter::name, blender::bke::GSpanAttributeWriter::span, and blender::bke::String.
Referenced by extract_mesh_vertices(), and blender::nodes::LazyFunctionForForeachGeometryElementZone::try_extract_element_geometries().
| Array< PointCloud * > blender::geometry::extract_pointcloud_points | ( | const PointCloud & | pointcloud, |
| const IndexMask & | mask, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 255 of file extract_elements.cc.
References blender::BKE_pointcloud_new_nomain(), blender::BLI_assert(), blender::element, extract_pointcloud_points(), blender::bke::gather_attributes(), blender::exec_mode::grain_size(), blender::PointCloud::mat, blender::PointCloud::totcol, blender::PointCloud::totpoint, and blender::PointCloud::type.
Referenced by extract_pointcloud_points(), and blender::nodes::LazyFunctionForForeachGeometryElementZone::try_extract_element_geometries().
|
static |
Definition at line 17 of file foreach_geometry.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bke::Instances::ensure_geometry_instances(), extract_real_geometries_recursive(), blender::bke::InstanceReference::geometry_set(), blender::bke::InstanceReference::GeometrySet, blender::MutableSpan< T >::index_range(), blender::bke::GeometryComponent::Instance, blender::Vector< T, InlineBufferCapacity, Allocator >::pop_last(), blender::bke::Instances::references_for_write(), blender::bke::GeometrySet::remove(), and blender::bke::InstanceReference::type().
Referenced by extract_real_geometries_recursive(), and foreach_real_geometry().
|
static |
Definition at line 467 of file mesh_triangulate.cc.
References blender::BLI_assert(), face_keys_to_face_indices(), blender::Span< T >::index_range(), blender::threading::parallel_for(), blender::MutableSpan< T >::size(), and blender::Span< T >::size().
Referenced by face_keys_to_face_indices(), and mesh_triangulate().
|
static |
If a significant number of Ngons are selected (> 25% of the faces), then use the face normals cache, in case the cache is persistent (or already calculated).
Definition at line 63 of file mesh_triangulate.cc.
References blender::bke::MeshRuntime::face_normals_cache, face_normals_if_worthwhile(), blender::Mesh::faces_num, and blender::Mesh::runtime.
Referenced by face_normals_if_worthwhile(), and mesh_triangulate().
| IndexMask blender::geometry::face_selection_from_edge | ( | OffsetIndices< int > | faces, |
| Span< int > | corner_edges, | ||
| Span< bool > | edge_mask, | ||
| IndexMaskMemory & | memory ) |
A face is selected if all of its edges are selected.
Definition at line 99 of file mesh_selection.cc.
References face_selection_from_edge(), and face_selection_from_mapped_corner().
Referenced by face_selection_from_edge(), and mesh_copy_selection_keep_edges().
|
static |
Definition at line 78 of file mesh_selection.cc.
References blender::Default, face_selection_from_mapped_corner(), blender::IndexMask::from_predicate(), blender::offset_indices::OffsetIndices< T >::index_range(), and PRF_scope.
Referenced by face_selection_from_edge(), face_selection_from_mapped_corner(), and face_selection_from_vert().
| IndexMask blender::geometry::face_selection_from_vert | ( | OffsetIndices< int > | faces, |
| Span< int > | corner_verts, | ||
| Span< bool > | vert_selection, | ||
| IndexMaskMemory & | memory ) |
A face is selected if all of its vertices are selected.
Definition at line 91 of file mesh_selection.cc.
References face_selection_from_mapped_corner(), and face_selection_from_vert().
Referenced by face_selection_from_vert(), and mesh_copy_selection_keep_edges().
|
static |
Definition at line 419 of file mesh_triangulate.cc.
References blender::IndexRangesBuilder< T >::add(), blender::IndexRangesBuilder< T >::add_range(), blender::OffsetSpan< T, BaseT >::base_span(), face_tris_mask(), blender::IndexMask::from_batch_predicate(), blender::unique_sorted_indices::non_empty_as_range(), blender::unique_sorted_indices::non_empty_is_range(), blender::OffsetSpan< T, BaseT >::offset(), blender::IndexRange::one_after_last(), blender::IndexRange::shift(), blender::offset_indices::OffsetIndices< T >::size(), blender::offset_indices::OffsetIndices< T >::slice(), blender::IndexRange::start(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by face_tris_mask(), and mesh_triangulate().
|
static |
Definition at line 186 of file trim_curves.cc.
References blender::BEZIER_HANDLE_FREE, blender::CURVE_TYPE_BEZIER, blender::MutableSpan< T >::fill(), fill_bezier_data(), blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), blender::bke::CurvesGeometry::handle_positions_left_for_write(), blender::bke::CurvesGeometry::handle_positions_right_for_write(), blender::bke::CurvesGeometry::handle_types_left_for_write(), blender::bke::CurvesGeometry::handle_types_right_for_write(), blender::bke::CurvesGeometry::has_curve_with_type(), blender::bke::CurvesGeometry::points_by_curve(), and blender::MutableSpan< T >::slice().
Referenced by fill_bezier_data(), trim_catmull_rom_curves(), trim_evaluated_curves(), and trim_polygonal_curves().
|
static |
Definition at line 42 of file join_geometries.cc.
References blender::bke::attribute_type_to_cpp_type(), blender::CPPType::copy_construct_n(), blender::GSpan::data(), and fill_new_attribute().
Referenced by fill_new_attribute(), and join_attributes().
|
static |
Definition at line 207 of file trim_curves.cc.
References blender::CURVE_TYPE_NURBS, fill_nurbs_data(), blender::bke::curves::fill_points(), blender::bke::CurvesGeometry::has_curve_with_type(), blender::bke::CurvesGeometry::nurbs_weights_for_write(), and blender::bke::CurvesGeometry::points_by_curve().
Referenced by fill_nurbs_data(), trim_bezier_curves(), trim_catmull_rom_curves(), trim_evaluated_curves(), and trim_polygonal_curves().
|
static |
Definition at line 436 of file fillet_curves.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), attribute, blender::bke::attribute_filter_with_skip_ref(), blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), calculate_angles(), blender::bke::CurvesGeometry::calculate_bezier_auto_handles(), calculate_bezier_handles_bezier_mode(), calculate_bezier_handles_poly_mode(), calculate_directions(), calculate_fillet_positions(), calculate_result_offsets(), blender::index_mask::IndexMask::complement(), blender::bke::copy_attributes_group_to_group(), blender::bke::curves::copy_only_curve_domain(), blender::CURVE_TYPE_BEZIER, blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), duplicate_fillet_point_data(), fillet_curves(), blender::index_mask::IndexMask::foreach_segment(), blender::exec_mode::grain_size(), 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::bke::CurvesGeometry::is_empty(), limit_radii(), limit_radius(), blender::VArrayCommon< T >::materialize_compressed(), blender::bke::CurvesGeometry::nurbs_has_custom_knots(), blender::NURBS_KNOT_MODE_NORMAL, blender::bke::CurvesGeometry::offsets(), blender::bke::CurvesGeometry::offsets_for_write(), blender::bke::curves::per_curve_point_offsets_range(), blender::bke::Point, blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::points_num(), blender::bke::CurvesGeometry::positions(), blender::bke::CurvesGeometry::positions_for_write(), blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::bke::CurvesGeometry::resize(), blender::bke::retrieve_attributes_for_transfer(), blender::IndexRange::size(), blender::blender::Span< T >::slice(), blender::MutableSpan< T >::slice(), blender::Span< T >::slice(), blender::bke::curves::nurbs::update_custom_knot_modes(), and zero_degenerate_radii().
Referenced by fillet_curves(), fillet_curves_bezier(), and fillet_curves_poly().
| bke::CurvesGeometry blender::geometry::fillet_curves_bezier | ( | const bke::CurvesGeometry & | src_curves, |
| const IndexMask & | curve_selection, | ||
| const VArray< float > & | radius, | ||
| bool | limit_radius, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 613 of file fillet_curves.cc.
References fillet_curves(), fillet_curves_bezier(), blender::VArray< T >::from_single(), limit_radius(), and blender::bke::CurvesGeometry::points_num().
Referenced by blender::nodes::node_geo_curve_fillet_cc::fillet_curve(), and fillet_curves_bezier().
| bke::CurvesGeometry blender::geometry::fillet_curves_poly | ( | const bke::CurvesGeometry & | src_curves, |
| const IndexMask & | curve_selection, | ||
| const VArray< float > & | radius, | ||
| const VArray< int > & | counts, | ||
| bool | limit_radius, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 602 of file fillet_curves.cc.
References fillet_curves(), fillet_curves_poly(), and limit_radius().
Referenced by blender::nodes::node_geo_curve_fillet_cc::fillet_curve(), fillet_curves_poly(), and blender::ed::space_node::node_draw_zones_and_frames().
|
static |
Return the type for handle. Keep it aligned if recalculating it from other_handle preserves its position. Otherwise, use a free handle to preserve the circular arc constructed by the fillet.
Definition at line 283 of file fillet_curves.cc.
References blender::BEZIER_HANDLE_ALIGN, blender::BEZIER_HANDLE_FREE, blender::math::dot(), fillet_handle_type(), FLT_EPSILON, blender::math::is_zero(), blender::math::length(), length(), blender::math::normalize(), and position.
Referenced by fillet_handle_type().
|
static |
Definition at line 25 of file mesh_to_curve_convert.cc.
References blender::bke::AttributeAccessor::all_names(), blender::bke::attribute_filter_with_skip_ref(), filter_builtin_attributes(), blender::bke::AttributeAccessor::is_builtin(), and storage.
Referenced by create_curve_from_vert_indices(), filter_builtin_attributes(), and mesh_faces_to_curves_convert().
|
static |
Definition at line 2299 of file uv_pack.cc.
References blender::BLI_heap_free(), blender::BLI_heap_new(), blender::BLI_memarena_clear(), blender::BLI_memarena_free(), blender::BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, and finalize_geometry().
Referenced by finalize_geometry(), and pack_islands().
Find the vertices affected by the merge: the vertices that merge into another vertex, and the vertices they merge into. The topology collapsing code can skip work for everything else.
Definition at line 198 of file mesh_merge_verts.cc.
References find_affected_verts(), blender::Span< T >::index_range(), blender::threading::parallel_for(), and blender::Span< T >::size().
Referenced by create_merged_mesh(), and find_affected_verts().
|
static |
Definition at line 1376 of file uv_pack.cc.
References blender::geometry::PackIsland::build_transformation(), ceilf, DEG2RADF, find_best_fit_for_island(), blender::geometry::PackIsland::get_diagonal_support(), blender::geometry::UVPhi::rotation, scale(), sqrtf, blender::geometry::UVPhi::translation, and blender::geometry::UVPhi::UVPhi().
Referenced by find_best_fit_for_island(), and pack_island_xatlas().
|
static |
Find edges that collapse because both of their vertices merge into the same vertex, and the other edges affected by the merge (the "weld edges").
| r_edge_src_to_target | Filled with ELEM_COLLAPSED for collapsed edges, and the edge index itself for all other edges. |
Definition at line 229 of file mesh_merge_verts.cc.
References ELEM_COLLAPSED, blender::array_utils::fill_index_range(), find_collapsed_and_weld_edges(), blender::IndexMask::from_difference(), blender::IndexMask::from_predicate(), blender::exec_mode::grain_size(), blender::Span< T >::index_range(), and blender::index_mask::masked_fill().
Referenced by find_collapsed_and_weld_edges(), and weld_mesh_context_create().
|
static |
Definition at line 204 of file merge_curves.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::IndexRange::contains(), blender::bke::CurvesGeometry::curves_range(), find_connected_ranges(), blender::Span< T >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::IndexRange::size(), and blender::Span< T >::size().
Referenced by curves_merge_endpoints(), and find_connected_ranges().
|
static |
Definition at line 64 of file add_curves_on_mesh.cc.
References blender::Default, blender::KDTreeNew< T >::Nearest::distance_sq, find_curve_neighbors(), blender::KDTreeNew< T >::find_nearest_n(), blender::KDTreeNew< T >::Nearest::index, blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), blender::IndexRange::IndexRange(), max_neighbors, blender::threading::parallel_for(), PRF_scope, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and blender::Span< T >::size().
Referenced by add_curves_on_mesh(), and find_curve_neighbors().
|
static |
Find weld edges that connect the same two vertices after merging. The edge with the lowest index in each group of duplicates is kept, and the others are mapped to it in r_edge_src_to_target.
Definition at line 264 of file mesh_merge_verts.cc.
References blender::offset_indices::build_groups_from_indices(), find_duplicate_edges(), blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), blender::offset_indices::OffsetIndices< T >::index_range(), blender::index_mask::IndexMask::is_empty(), blender::threading::parallel_reduce(), blender::index_mask::IndexMask::size(), blender::OrderedEdge::v_high, and blender::OrderedEdge::v_low.
Referenced by find_duplicate_edges(), and weld_mesh_context_create().
|
static |
Definition at line 469 of file reorder.cc.
References blender::offset_indices::build_reverse_offsets(), find_points_by_group_index(), and blender::offset_indices::reverse_indices_in_groups().
Referenced by find_points_by_group_index(), and sort_indices_by_weights().
|
static |
Consolidates the data that has been gather for each row so that it is each to look up which triangles are in each cell.
Definition at line 122 of file reverse_uv_sampler.cc.
References finish_rows(), blender::Span< T >::index_range(), and blender::threading::parallel_for().
Referenced by finish_rows(), and blender::geometry::ReverseUVSampler::ReverseUVSampler().
| bke::CurvesGeometry blender::geometry::fit_poly_to_bezier_curves | ( | const bke::CurvesGeometry & | src_curves, |
| const IndexMask & | curve_selection, | ||
| const VArray< float > & | thresholds, | ||
| const VArray< bool > & | corners, | ||
| FitMethod | method, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Fit the selected curves to Bézier curves.
| src_curves | The input curves. |
| curve_selection | A selection of curves to fit. The selected curves will be replaced by the fitted bézier curves and the unselected curves are copied to the output geometry. |
| thresholds | A error threshold (fit distance) for each input curve. The fitted curve should be within this distance. |
| corners | Boolean value for each input point. When this is true, the point is treated as a corner in the curve fitting. The resulting bézier curve will include this point and the handles will be "free", resulting in a sharp corner. |
| method | The fitting algorithm to use. See FitMethod. |
Definition at line 25 of file fit_curves.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::BEZIER_HANDLE_ALIGN, blender::BEZIER_HANDLE_FREE, blender::BKE_defgroup_copy_list(), blender::BLI_assert(), blender::Span< T >::cast(), blender::index_mask::IndexMask::complement(), blender::MutableSpan< T >::copy_from(), blender::offset_indices::copy_group_sizes(), blender::array_utils::copy_group_to_group(), blender::bke::curves::copy_only_curve_domain(), blender::CURVE_TYPE_BEZIER, blender::CURVE_TYPE_POLY, blender::bke::CurvesGeometry::curve_types_for_write(), blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), blender::MutableSpan< T >::fill(), blender::array_utils::fill_index_range(), blender::MutableSpan< T >::fill_indices(), blender::IndexRange::first(), fit_poly_to_bezier_curves(), FLT_MAX, blender::index_mask::IndexMask::foreach_index(), blender::IndexRange::from_begin_end(), blender::exec_mode::grain_size(), 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::IndexRange::index_range(), blender::blender::Span< T >::is_empty(), blender::index_mask::IndexMask::is_empty(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::IndexRange::last(), blender::MutableSpan< T >::MutableSpan(), blender::nullptr, 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(), Refit, blender::bke::CurvesGeometry::resize(), blender::index_mask::IndexMask::size(), blender::IndexRange::size(), blender::Span< T >::size(), blender::VArrayCommon< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::MutableSpan< T >::slice(), blender::Span< T >::slice(), Split, blender::IndexRange::start(), and blender::CurvesGeometry::vertex_group_names.
Referenced by blender::ed::sculpt_paint::greasepencil::convert_stroke_type(), blender::ed::greasepencil::fit_poly_curves(), and fit_poly_to_bezier_curves().
|
static |
Definition at line 308 of file uv_parametrizer.cc.
References DEG2RAD, fix_large_angle(), blender::len_v3v3(), and blender::v2.
Referenced by fix_large_angle(), and p_triangle_angles().
|
static |
Definition at line 25 of file merge_curves.cc.
References blender::IndexRange::contains(), foreach_connected_curve(), blender::Span< T >::index_range(), Inserted, blender::Stack< T, InlineBufferCapacity, Allocator >::is_empty(), OnStack, blender::Stack< T, InlineBufferCapacity, Allocator >::peek(), blender::Stack< T, InlineBufferCapacity, Allocator >::pop(), blender::Stack< T, InlineBufferCapacity, Allocator >::push(), and UNUSED_VARS.
Referenced by foreach_connected_curve(), and toposort_connected_curves().
|
static |
Calls fn for every geometry in the given InstanceReference. Also passes on the transformation that is applied to every instance.
Definition at line 669 of file realize_instances.cc.
References foreach_geometry_in_reference(), and blender::bke::InstanceReference::to_geometry_set().
Referenced by foreach_geometry_in_reference(), and gather_realize_tasks_for_instances().
| void blender::geometry::foreach_real_geometry | ( | bke::GeometrySet & | geometry, |
| FunctionRef< void(bke::GeometrySet &geometry_set)> | fn ) |
Modify every real geometry separately, including those from instances. The input to the callback never contains instances. Newly generated instances will be merged with the previously existing ones.
Definition at line 74 of file foreach_geometry.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear(), extract_real_geometries_recursive(), foreach_real_geometry(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), and blender::threading::parallel_for().
Referenced by foreach_real_geometry(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::nodes::node_geo_viewer_cc::log_viewer_attribute(), blender::nodes::node_geo_attribute_capture_cc::node_geo_exec(), blender::nodes::node_geo_bevel_cc::node_geo_exec(), blender::nodes::node_geo_bounding_box_cc::node_geo_exec(), blender::nodes::node_geo_convex_hull_cc::node_geo_exec(), blender::nodes::node_geo_curve_fill_cc::node_geo_exec(), blender::nodes::node_geo_curve_fillet_cc::node_geo_exec(), blender::nodes::node_geo_curve_resample_cc::node_geo_exec(), blender::nodes::node_geo_curve_reverse_cc::node_geo_exec(), blender::nodes::node_geo_curve_set_handle_type_cc::node_geo_exec(), blender::nodes::node_geo_curve_spline_type_cc::node_geo_exec(), blender::nodes::node_geo_curve_subdivide_cc::node_geo_exec(), blender::nodes::node_geo_curve_to_mesh_cc::node_geo_exec(), blender::nodes::node_geo_curve_to_points_cc::node_geo_exec(), blender::nodes::node_geo_curve_trim_cc::node_geo_exec(), blender::nodes::node_geo_delete_geometry_cc::node_geo_exec(), blender::nodes::node_geo_distribute_points_in_volume_cc::node_geo_exec(), blender::nodes::node_geo_distribute_points_on_faces_cc::node_geo_exec(), blender::nodes::node_geo_dual_mesh_cc::node_geo_exec(), blender::nodes::node_geo_duplicate_elements_cc::node_geo_exec(), blender::nodes::node_geo_edge_paths_to_curves_cc::node_geo_exec(), blender::nodes::node_geo_edge_split_cc::node_geo_exec(), blender::nodes::node_geo_extrude_mesh_cc::node_geo_exec(), blender::nodes::node_geo_flip_faces_cc::node_geo_exec(), blender::nodes::node_geo_grease_pencil_set_depth_mode::node_geo_exec(), blender::nodes::node_geo_instance_on_points_cc::node_geo_exec(), blender::nodes::node_geo_material_replace_cc::node_geo_exec(), blender::nodes::node_geo_merge_by_distance_cc::node_geo_exec(), blender::nodes::node_geo_merge_layers_cc::node_geo_exec(), blender::nodes::node_geo_merge_points_cc::node_geo_exec(), blender::nodes::node_geo_mesh_subdivide_cc::node_geo_exec(), blender::nodes::node_geo_mesh_to_curve_cc::node_geo_exec(), blender::nodes::node_geo_mesh_to_points_cc::node_geo_exec(), blender::nodes::node_geo_mesh_to_volume_cc::node_geo_exec(), blender::nodes::node_geo_points_to_curves_cc::node_geo_exec(), blender::nodes::node_geo_points_to_vertices_cc::node_geo_exec(), blender::nodes::node_geo_points_to_volume_cc::node_geo_exec(), blender::nodes::node_geo_points_type_cc::node_geo_exec(), blender::nodes::node_geo_rename_attribute_cc::node_geo_exec(), blender::nodes::node_geo_scale_elements_cc::node_geo_exec(), blender::nodes::node_geo_separate_geometry_cc::node_geo_exec(), blender::nodes::node_geo_set_curve_handles_cc::node_geo_exec(), blender::nodes::node_geo_set_curve_normal_cc::node_geo_exec(), blender::nodes::node_geo_set_curve_radius_cc::node_geo_exec(), blender::nodes::node_geo_set_curve_tilt_cc::node_geo_exec(), blender::nodes::node_geo_set_grease_pencil_softness_cc::node_geo_exec(), blender::nodes::node_geo_set_material_cc::node_geo_exec(), blender::nodes::node_geo_set_material_index_cc::node_geo_exec(), blender::nodes::node_geo_set_mesh_normal_cc::node_geo_exec(), blender::nodes::node_geo_set_nurbs_order_cc::node_geo_exec(), blender::nodes::node_geo_set_nurbs_weight_cc::node_geo_exec(), blender::nodes::node_geo_set_point_radius_cc::node_geo_exec(), blender::nodes::node_geo_set_shade_smooth_cc::node_geo_exec(), blender::nodes::node_geo_set_spline_cyclic_cc::node_geo_exec(), blender::nodes::node_geo_set_spline_resolution_cc::node_geo_exec(), blender::nodes::node_geo_sort_elements_cc::node_geo_exec(), blender::nodes::node_geo_store_named_attribute_cc::node_geo_exec(), blender::nodes::node_geo_subdivision_surface_cc::node_geo_exec(), blender::nodes::node_geo_tool_set_face_set_cc::node_geo_exec(), blender::nodes::node_geo_tool_set_selection_cc::node_geo_exec(), blender::nodes::node_geo_triangulate_cc::node_geo_exec(), blender::nodes::node_geo_volume_to_mesh_cc::node_geo_exec(), blender::nodes::node_geo_set_grease_pencil_color_cc::set_grease_pencil_color(), and blender::nodes::store_output_attributes().
|
static |
Definition at line 115 of file mesh_merge_verts.cc.
References blender::BLI_assert(), blender::geometry::WeldFace::corner_start, blender::geometry::WeldFace::face_dst, foreach_weld_face_corner(), and OUT_OF_CONTEXT.
Referenced by foreach_weld_face_corner(), and weld_face_find_doubles().
|
static |
Definition at line 33 of file mesh_triangulate.cc.
References gather(), and blender::Span< T >::index_range().
Referenced by gather(), and gather_or_reference().
Definition at line 493 of file realize_instances.cc.
References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), gather_all_fill_ids(), blender::VArrayCommon< T >::get_internal_single(), blender::VArrayCommon< T >::get_internal_span(), blender::VArrayCommon< T >::index_range(), blender::VArrayCommon< T >::is_empty(), blender::VArrayCommon< T >::is_single(), and blender::VArrayCommon< T >::is_span().
Referenced by gather_all_fill_ids(), and preprocess_curves().
|
static |
Definition at line 907 of file realize_instances.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_as(), gather_attribute_propagation_components(), options, blender::bke::Instances::references(), and blender::bke::InstanceReference::to_geometry_set().
Referenced by gather_attribute_propagation_components(), gather_attribute_propagation_components_with_custom_depths(), and gather_attributes_to_propagate().
|
static |
Definition at line 944 of file realize_instances.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_as(), blender::geometry::VariedDepthOptions::depths, blender::index_mask::IndexMask::foreach_index(), gather_attribute_propagation_components(), gather_attribute_propagation_components_with_custom_depths(), blender::geometry::VariedDepthOptions::MAX_DEPTH, options, blender::bke::Instances::reference_handles(), blender::bke::Instances::references(), blender::geometry::VariedDepthOptions::selection, blender::Span< T >::size(), and blender::bke::InstanceReference::to_geometry_set().
Referenced by gather_attribute_propagation_components_with_custom_depths(), and gather_attributes_to_propagate().
|
static |
Definition at line 1008 of file realize_instances.cc.
References blender::bke::GeometrySet::GatheredAttributes::add(), blender::bke::AttributeFilter::allow_skip(), blender::bke::GeometryComponent::attribute_domain_size(), blender::bke::attribute_is_builtin_on_component_type(), blender::bke::GeometryComponent::Curve, blender::bke::AttributeIter::data_type, blender::geometry::VariedDepthOptions::depths, blender::bke::AttributeIter::domain, ELEM, blender::bke::AttributeAccessor::foreach_attribute(), gather_attribute_propagation_components(), gather_attribute_propagation_components_with_custom_depths(), gather_attributes_to_propagate(), blender::VArrayCommon< T >::get_if_single(), blender::bke::GeometryComponent::GreasePencil, blender::bke::GeometryComponent::Instance, blender::bke::AttributeIter::is_builtin, blender::geometry::VariedDepthOptions::MAX_DEPTH, blender::bke::AttributeIter::name, options, blender::geometry::VariedDepthOptions::selection, blender::index_mask::IndexMask::size(), and blender::bke::String.
Referenced by gather_attributes_to_propagate(), gather_generic_curve_attributes_to_propagate(), gather_generic_grease_pencil_attributes_to_propagate(), gather_generic_instance_attributes_to_propagate(), gather_generic_mesh_attributes_to_propagate(), and gather_generic_pointcloud_attributes_to_propagate().
|
static |
Gather a set of all generic attribute IDs to copy to the result curves.
Definition at line 360 of file interpolate_curves.cc.
References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::bke::attribute_name_is_anonymous(), blender::bke::CurvesGeometry::attributes(), blender::bke::Curve, blender::bke::AttributeAccessor::foreach_attribute(), gather_curve_attributes_to_interpolate(), retrieve_attribute_spans(), and blender::bke::String.
Referenced by gather_curve_attributes_to_interpolate(), and interpolate_curves_with_samples().
|
static |
Definition at line 2223 of file realize_instances.cc.
References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), gather_curves_to_realize(), blender::bke::GeometrySet::get_curves(), and blender::bke::GeometrySet::get_instances().
Referenced by gather_curves_to_realize(), and preprocess_curves().
|
static |
Definition at line 2189 of file realize_instances.cc.
References blender::bke::GeometryComponent::Curve, ELEM, gather_attributes_to_propagate(), gather_generic_curve_attributes_to_propagate(), blender::bke::GeometrySet::GatheredAttributes::kinds, blender::geometry::OrderedAttributes::kinds, blender::bke::GeometrySet::GatheredAttributes::names, blender::geometry::OrderedAttributes::names, and options.
Referenced by gather_generic_curve_attributes_to_propagate(), and preprocess_curves().
|
static |
Definition at line 2625 of file realize_instances.cc.
References gather_attributes_to_propagate(), gather_generic_grease_pencil_attributes_to_propagate(), blender::bke::GeometryComponent::GreasePencil, blender::bke::GeometrySet::GatheredAttributes::kinds, blender::geometry::OrderedAttributes::kinds, blender::bke::GeometrySet::GatheredAttributes::names, blender::geometry::OrderedAttributes::names, and options.
Referenced by gather_generic_grease_pencil_attributes_to_propagate(), and preprocess_grease_pencils().
|
static |
Definition at line 1096 of file realize_instances.cc.
References blender::Default, gather_attributes_to_propagate(), gather_generic_instance_attributes_to_propagate(), blender::bke::GeometryComponent::Instance, blender::bke::GeometrySet::GatheredAttributes::kinds, blender::geometry::OrderedAttributes::kinds, blender::bke::GeometrySet::GatheredAttributes::names, blender::geometry::OrderedAttributes::names, options, and PRF_scope.
Referenced by gather_generic_instance_attributes_to_propagate(), and realize_instances().
|
static |
Definition at line 1488 of file realize_instances.cc.
References ELEM, gather_attributes_to_propagate(), gather_generic_mesh_attributes_to_propagate(), blender::bke::GeometrySet::GatheredAttributes::kinds, blender::geometry::OrderedAttributes::kinds, blender::bke::GeometryComponent::Mesh, blender::bke::GeometrySet::GatheredAttributes::names, blender::geometry::OrderedAttributes::names, and options.
Referenced by gather_generic_mesh_attributes_to_propagate(), and preprocess_meshes().
|
static |
Definition at line 1233 of file realize_instances.cc.
References gather_attributes_to_propagate(), gather_generic_pointcloud_attributes_to_propagate(), blender::bke::GeometrySet::GatheredAttributes::kinds, blender::geometry::OrderedAttributes::kinds, blender::bke::GeometrySet::GatheredAttributes::names, blender::geometry::OrderedAttributes::names, options, and blender::bke::GeometryComponent::PointCloud.
Referenced by gather_generic_pointcloud_attributes_to_propagate(), and preprocess_pointclouds().
|
static |
Definition at line 2640 of file realize_instances.cc.
References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), gather_grease_pencils_to_realize(), blender::bke::GeometrySet::get_grease_pencil(), and blender::bke::GeometrySet::get_instances().
Referenced by gather_grease_pencils_to_realize(), and preprocess_grease_pencils().
|
static |
Definition at line 1522 of file realize_instances.cc.
References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), gather_meshes_to_realize(), blender::bke::GeometrySet::get_instances(), and blender::bke::GeometrySet::get_mesh().
Referenced by gather_meshes_to_realize(), and preprocess_meshes().
|
static |
Definition at line 52 of file mesh_triangulate.cc.
References blender::Span< T >::drop_front(), and gather_or_reference().
|
static |
Definition at line 40 of file mesh_triangulate.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), gather(), gather_or_reference(), blender::unique_sorted_indices::non_empty_is_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::Span< T >::size(), and blender::Span< T >::slice().
Referenced by blender::geometry::quad::calc_corner_tris(), gather_or_reference(), and gather_or_reference().
|
static |
Gather a set of all generic attribute IDs to copy to the result curves.
Definition at line 324 of file interpolate_curves.cc.
References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::curve_type_counts(), blender::bke::AttributeAccessor::foreach_attribute(), gather_point_attributes_to_interpolate(), interpolate_attribute_to_curves(), interpolate_attribute_to_poly_curve(), blender::bke::Point, retrieve_attribute_spans(), and blender::bke::String.
Referenced by gather_point_attributes_to_interpolate(), gather_point_attributes_to_interpolate(), interpolate_curves_with_samples(), resample_to_evaluated(), and resample_to_uniform().
|
static |
Gather a set of all generic attribute IDs to copy to the result curves.
Definition at line 152 of file resample_curves.cc.
References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), blender::bke::CurvesGeometry::curve_type_counts(), blender::bke::AttributeIter::data_type, blender::bke::AttributeIter::domain, blender::bke::CurvesGeometry::evaluated_normals(), blender::bke::CurvesGeometry::evaluated_tangents(), blender::bke::Float3, blender::bke::AttributeAccessor::foreach_attribute(), gather_point_attributes_to_interpolate(), interpolate_attribute_to_curves(), interpolate_attribute_to_poly_curve(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::AttributeIter::name, blender::geometry::ResampleCurvesOutputAttributeIDs::normal_id, blender::bke::Point, blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_contained(), blender::result, retrieve_attribute_spans(), blender::bke::GSpanAttributeWriter::span, blender::bke::String, blender::geometry::ResampleCurvesOutputAttributeIDs::tangent_id, and blender::GMutableSpan::typed().
|
static |
Definition at line 1261 of file realize_instances.cc.
References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), gather_pointclouds_to_realize(), blender::bke::GeometrySet::get_instances(), and blender::bke::GeometrySet::get_pointcloud().
Referenced by gather_pointclouds_to_realize(), and preprocess_pointclouds().
|
static |
Definition at line 681 of file realize_instances.cc.
References blender::geometry::AttributeFallbacksArray::array, blender::bke::Instances::attributes(), blender::geometry::AllCurvesInfo::attributes, blender::geometry::AllGreasePencilsInfo::attributes, blender::geometry::AllMeshesInfo::attributes, blender::geometry::AllPointCloudsInfo::attributes, blender::geometry::GatherTasksInfo::create_id_attribute_on_any_component, blender::geometry::GatherTasksInfo::curves, blender::geometry::InstanceContext::curves, blender::geometry::GatherTasksInfo::depths, blender::bke::GAttributeReader::domain, foreach_geometry_in_reference(), blender::index_mask::IndexMask::foreach_index(), gather_realize_tasks_for_instances(), gather_realize_tasks_recursive(), blender::geometry::GatherTasksInfo::grease_pencils, blender::geometry::InstanceContext::grease_pencils, blender::noise::hash(), blender::geometry::InstanceContext::id, blender::bke::Instance, instance_id, blender::geometry::InstanceContext::instances, blender::geometry::GatherTasksInfo::instances_attriubutes, blender::bke::Instances::instances_num(), blender::CPPType::is(), blender::VArrayCommon< T >::is_empty(), blender::bke::AttributeAccessor::lookup(), blender::geometry::GatherTasksInfo::meshes, blender::geometry::InstanceContext::meshes, blender::geometry::GatherTasksInfo::pointclouds, blender::geometry::InstanceContext::pointclouds, prepare_attribute_fallbacks(), blender::bke::Instances::reference_handles(), blender::bke::Instances::references(), blender::geometry::GatherTasksInfo::selection, blender::bke::Instances::transforms(), blender::GVArrayCommon::type(), blender::GVArray::typed(), and blender::bke::GAttributeReader::varray.
Referenced by gather_realize_tasks_for_instances(), and gather_realize_tasks_recursive().
|
static |
Gather tasks for all geometries in the #geometry_set.
Definition at line 775 of file realize_instances.cc.
References blender::blender::ImplicitSharingInfo::add_user(), blender::geometry::AllInstancesInfo::attribute_fallback, blender::bke::GeometrySet::bundle(), blender::geometry::GatherTasks::bundles, blender::bke::GeometryComponent::Curve, blender::geometry::GatherTasks::curve_tasks, blender::geometry::GatherTasksInfo::curves, blender::geometry::InstanceContext::curves, blender::geometry::GatherOffsets::curves_offsets, blender::bke::GeometryComponent::Edit, blender::geometry::GatherTasks::edit_data_tasks, blender::geometry::GatherTasks::first_volume, gather_realize_tasks_for_instances(), gather_realize_tasks_recursive(), blender::bke::GeometrySet::get_components(), blender::geometry::GatherOffsets::grease_pencil_layer_offset, blender::geometry::GatherTasks::grease_pencil_tasks, blender::geometry::GatherTasksInfo::grease_pencils, blender::geometry::InstanceContext::grease_pencils, blender::bke::GeometryComponent::GreasePencil, blender::bke::GeometrySet::has_bundle(), blender::geometry::InstanceContext::id, blender::geometry::RealizeCurveInfo::index_by_fill_id, blender::bke::GeometryComponent::Instance, blender::geometry::GatherTasksInfo::instances, blender::geometry::InstanceContext::instances, blender::geometry::AllInstancesInfo::instances_components_to_merge, blender::geometry::AllInstancesInfo::instances_components_transforms, blender::bke::Instances::instances_num(), blender::bke::GeometryComponent::Mesh, blender::geometry::GatherOffsets::mesh_offsets, blender::geometry::GatherTasks::mesh_tasks, blender::geometry::GatherTasksInfo::meshes, blender::geometry::InstanceContext::meshes, blender::geometry::AllCurvesInfo::order, blender::geometry::AllGreasePencilsInfo::order, blender::geometry::AllMeshesInfo::order, blender::geometry::AllPointCloudsInfo::order, blender::bke::GeometryComponent::PointCloud, blender::geometry::GatherOffsets::pointcloud_offset, blender::geometry::GatherTasks::pointcloud_tasks, blender::geometry::GatherTasksInfo::pointclouds, blender::geometry::InstanceContext::pointclouds, blender::geometry::GatherTasksInfo::r_offsets, blender::geometry::GatherTasksInfo::r_tasks, blender::geometry::AllCurvesInfo::realize_info, blender::geometry::AllGreasePencilsInfo::realize_info, blender::geometry::AllMeshesInfo::realize_info, blender::geometry::AllPointCloudsInfo::realize_info, blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), blender::PointCloud::totpoint, and blender::bke::GeometryComponent::Volume.
Referenced by gather_realize_tasks_for_instances(), gather_realize_tasks_recursive(), and realize_instances().
|
static |
Definition at line 217 of file mesh_triangulate.cc.
References gather_selected_offsets(), blender::OffsetSpan< T, BaseT >::index_range(), blender::MutableSpan< T >::last(), and blender::offset_indices::OffsetIndices< T >::size().
Referenced by blender::geometry::ngon::calc_corner_tris(), and gather_selected_offsets().
|
static |
Gather vertex group data and array attributes in separate loops.
Definition at line 106 of file mesh_copy_selection.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::bke::attribute_filter_with_skip_ref(), blender::bke::gather_attributes(), blender::bke::gather_deform_verts(), gather_vert_attributes(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), blender::Span< T >::is_empty(), blender::bDeformGroup::name, blender::bke::Point, and blender::Mesh::vertex_group_names.
Referenced by gather_vert_attributes().
| void blender::geometry::gaussian_blur_1D | ( | const GSpan | src, |
| int | iterations, | ||
| const VArray< float > & | influence_by_point, | ||
| const bool | smooth_ends, | ||
| const bool | keep_shape, | ||
| const bool | is_cyclic, | ||
| GMutableSpan | dst ) |
1D Gaussian-like smoothing function.
| iterations | Number of times to repeat the smoothing. |
| influence_by_point | Influence factor for each point. |
| smooth_ends | Smooth the first and last value. |
| keep_shape | Changes the gaussian kernel to avoid severe deformations. |
| is_cyclic | Propagate smoothing across the ends of the input as if they were connected. |
Definition at line 154 of file smooth_curves.cc.
References gaussian_blur_1D(), T, blender::bke::attribute_math::to_static_type(), and blender::GSpan::type().
Referenced by blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::active_smoothing(), gaussian_blur_1D(), gaussian_blur_1D(), smooth_curve_attribute(), and smooth_curve_positions().
|
static |
1D Gaussian-like smoothing function.
NOTE: This is the algorithm used by #BKE_gpencil_stroke_smooth_point (legacy), but generalized and written in C++.
This function uses a binomial kernel, which is the discrete version of gaussian blur. The weight for a value at the relative index is: w = nCr(n, j + n/2) / 2^n = (n/1 * (n-1)/2 * ... * (n-j-n/2)/(j+n/2)) / 2^n. All weights together sum up to 1. This is equivalent to doing multiple iterations of averaging neighbors, where: n = iterations * 2 and -n/2 <= j <= n/2.
Now the problem is that nCr(n, j + n/2) is very hard to compute for n > 500, since even double precision isn't sufficient. A very good robust approximation for n > 20 is: nCr(n, j + n/2) / 2^n = sqrt(2/(pi*n)) * exp(-2*j*j/n).
keep_shape is a new option to stop the points from severely deforming. It uses different partially negative weights. w = 2 * (nCr(n, j + n/2) / 2^n) - (nCr(3*n, j + n) / 2^(3*n)) ~ 2 * sqrt(2/(pi*n)) * exp(-2*j*j/n) - sqrt(2/(pi*3*n)) * exp(-2*j*j/(3*n)) All weights still sum up to 1. Note that these weights only work because the averaging is done in relative coordinates.
Definition at line 25 of file smooth_curves.cc.
References blender::BLI_assert(), ELEM, exp, gaussian_blur_1D(), blender::MutableSpan< T >::index_range(), blender::Span< T >::is_empty(), M_SQRT3, blender::threading::parallel_for(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), and w().
|
static |
Definition at line 102 of file uv_pack.cc.
References blender::BLI_rctf_size_x(), blender::BLI_rctf_size_y(), get_aspect_scaled_area(), and blender::geometry::UVPackIsland_Params::target_aspect_y.
Referenced by get_aspect_scaled_area(), and is_larger().
|
static |
Definition at line 92 of file uv_pack.cc.
References blender::BLI_rctf_size_x(), blender::BLI_rctf_size_y(), get_aspect_scaled_extent(), and blender::geometry::UVPackIsland_Params::target_aspect_y.
Referenced by get_aspect_scaled_extent(), is_larger(), rotate_inside_square(), and blender::geometry::UVMinimumEnclosingSquareFinder::update().
|
static |
Definition at line 513 of file interpolate_curves.cc.
References get_catmull_rom_indices().
Referenced by get_catmull_rom_indices(), and sample_catmull_rom_curve_positions_handles().
|
static |
Definition at line 38 of file resample_curves.cc.
References get_count_from_length().
Referenced by get_count_from_length(), get_count_input_from_length(), and resample_to_length().
|
static |
Definition at line 51 of file resample_curves.cc.
References blender::fn::FieldOperation::from(), blender::fn::Field< T >::from_input(), get_count_from_length(), and get_count_input_from_length().
Referenced by get_count_input_from_length(), and resample_to_length().
|
static |
Definition at line 31 of file resample_curves.cc.
References blender::fn::FieldOperation::from(), get_count_input_max_one(), and blender::fn::multi_function::registry::lookup().
Referenced by get_count_input_max_one(), and resample_to_count().
|
static |
Definition at line 22 of file join_geometries.cc.
References blender::geometry::GeometrySet::GatheredAttributes::add(), blender::Span< T >::contains(), blender::bke::AttributeIter::data_type, get_final_attribute_info(), blender::bke::AttributeIter::name, and blender::bke::String.
Referenced by get_final_attribute_info(), and join_attributes().
|
static |
Definition at line 390 of file realize_instances.cc.
References blender::geometry::RealizeCurveTask::curve_info, blender::geometry::GatherTasks::curve_tasks, blender::geometry::RealizeCurveInfo::curves, get_final_points_num(), blender::geometry::MeshRealizeInfo::mesh, blender::geometry::RealizeMeshTask::mesh_info, blender::geometry::GatherTasks::mesh_tasks, blender::geometry::CurvesElementStartIndices::point, blender::geometry::PointCloudRealizeInfo::pointcloud, blender::geometry::RealizePointCloudTask::pointcloud_info, blender::geometry::GatherTasks::pointcloud_tasks, blender::geometry::RealizePointCloudTask::start_index, blender::geometry::RealizeCurveTask::start_indices, blender::geometry::RealizeMeshTask::start_indices, blender::PointCloud::totpoint, blender::geometry::MeshElementStartIndices::vert, and blender::Mesh::verts_num.
Referenced by get_final_points_num(), and realize_instances().
|
static |
Definition at line 1860 of file realize_instances.cc.
References blender::IndexRange::contains(), blender::Array< T, InlineBufferCapacity, Allocator >::first(), get_mapped_material_index(), blender::geometry::MeshRealizeInfo::material_index_map, blender::geometry::MeshRealizeInfo::mesh, and blender::Mesh::totcol.
Referenced by calc_material_index_max_hint(), calc_single_value_material_index(), and get_mapped_material_index().
|
static |
Definition at line 29 of file randomize.cc.
References blender::data, get_permutation(), blender::IndexRange::IndexRange(), and length().
Referenced by debug_randomize_curve_order(), debug_randomize_edge_order(), debug_randomize_face_order(), debug_randomize_instance_order(), debug_randomize_point_order(), debug_randomize_vert_order(), and get_permutation().
Definition at line 939 of file mesh_merge_verts.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), get_vertex_group_names(), and blender::bDeformGroup::name.
Referenced by create_merged_mesh(), and get_vertex_group_names().
| bke::CurvesGeometry blender::geometry::grease_pencil_remove_points_and_split | ( | const bke::CurvesGeometry & | curves, |
| const IndexMask & | mask ) |
Same as above, but will also handle splitting Grease Pencil fills.
Definition at line 125 of file curves_remove_and_split.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_n_times(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::bke::CurvesGeometry::attributes_for_write(), blender::array_utils::fill_index_range(), blender::array_utils::find_all_ranges(), blender::Array< T, InlineBufferCapacity, Allocator >::first(), blender::Vector< T, InlineBufferCapacity, Allocator >::first(), blender::IndexMask::from_predicate(), blender::bke::greasepencil::gather_next_available_fill_ids(), grease_pencil_remove_points_and_split(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::bke::MutableAttributeAccessor::lookup_for_write_span(), remove_points_and_split(), blender::IndexRange::size(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::ed::greasepencil::grease_pencil_copy_strokes_exec(), blender::ed::greasepencil::grease_pencil_delete_exec(), grease_pencil_remove_points_and_split(), blender::ed::greasepencil::grease_pencil_separate_selected(), blender::ed::sculpt_paint::remove_points_and_split_from_drawings(), and blender::ed::sculpt_paint::greasepencil::remove_points_with_low_opacity().
|
static |
Definition at line 448 of file reorder.cc.
References grouped_sort(), blender::offset_indices::OffsetIndices< T >::index_range(), and blender::threading::parallel_for().
Referenced by grouped_sort(), and sort_indices_by_weights().
|
static |
Definition at line 1446 of file uv_pack.cc.
References guess_initial_scale(), blender::geometry::PackIsland::half_diagonal_, scale(), and sqrtf.
Referenced by guess_initial_scale(), and pack_island_xatlas().
|
static |
Definition at line 477 of file reorder.cc.
References blender::array_utils::fill_index_range(), identifiers_to_indices(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of(), invert_permutation(), blender::parallel_sort(), parallel_transform(), and blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size().
Referenced by identifiers_to_indices(), and sort_indices_by_weights().
|
static |
Definition at line 2308 of file realize_instances.cc.
References blender::geometry::AttributeFallbacksArray::array, blender::bke::CurvesGeometry::attributes(), blender::geometry::AllCurvesInfo::attributes, blender::geometry::InstanceContext::curves, blender::GPointer::get(), blender::bke::AttributeAccessor::get_builtin_default(), blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), initialize_curves_builtin_attribute_defaults(), blender::bke::AttributeAccessor::is_builtin(), blender::geometry::OrderedAttributes::names, and blender::geometry::AllCurvesInfo::order.
Referenced by initialize_curves_builtin_attribute_defaults(), and realize_instances().
|
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 238 of file interpolate_curves.cc.
References blender::bke::attribute_name_is_anonymous(), blender::CURVE_TYPE_NURBS, ELEM, and interpolate_attribute_to_curves().
Referenced by gather_point_attributes_to_interpolate(), gather_point_attributes_to_interpolate(), and interpolate_attribute_to_curves().
|
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 72 of file resample_curves.cc.
References blender::bke::attribute_name_is_anonymous(), blender::CURVE_TYPE_BEZIER, blender::CURVE_TYPE_NURBS, ELEM, and interpolate_attribute_to_curves().
|
static |
Return true if the attribute should be copied to poly curves.
Definition at line 257 of file interpolate_curves.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), and interpolate_attribute_to_poly_curve().
Referenced by gather_point_attributes_to_interpolate(), gather_point_attributes_to_interpolate(), and interpolate_attribute_to_poly_curve().
|
static |
Return true if the attribute should be copied to poly curves.
Definition at line 90 of file resample_curves.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), and interpolate_attribute_to_poly_curve().
|
static |
Definition at line 248 of file trim_curves.cc.
References blender::BLI_assert(), blender::bke::curves::CurveSegment::index, blender::bke::curves::catmull_rom::interpolate(), interpolate_catmull_rom(), blender::bke::curves::CurveSegment::next_index, blender::bke::curves::CurvePoint::parameter, blender::Span< T >::size(), and T.
Referenced by interpolate_catmull_rom(), and sample_interval_catmull_rom().
| void blender::geometry::interpolate_curves | ( | const bke::CurvesGeometry & | from_curves, |
| const bke::CurvesGeometry & | to_curves, | ||
| Span< int > | from_curve_indices, | ||
| Span< int > | to_curve_indices, | ||
| const IndexMask & | dst_curve_mask, | ||
| Span< bool > | dst_curve_flip_direction, | ||
| float | mix_factor, | ||
| bke::CurvesGeometry & | dst_curves, | ||
| IndexMaskMemory & | memory ) |
Create new curves that are interpolated between "from" and "to" curves.
| dst_curve_mask | Set of curves in dst_curves that are being filled. |
Definition at line 1297 of file interpolate_curves.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::bke::CurvesGeometry::cyclic(), blender::bke::CurvesGeometry::ensure_evaluated_lengths(), blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), interpolate_curves(), interpolate_curves_with_samples(), blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::points_num(), and sample_curve_uniform().
Referenced by interpolate_curves().
| void blender::geometry::interpolate_curves_with_samples | ( | const bke::CurvesGeometry & | from_curves, |
| const bke::CurvesGeometry & | to_curves, | ||
| Span< int > | from_curve_indices, | ||
| Span< int > | to_curve_indices, | ||
| Span< int > | from_sample_indices, | ||
| Span< int > | to_sample_indices, | ||
| Span< float > | from_sample_factors, | ||
| Span< float > | to_sample_factors, | ||
| const IndexMask & | dst_curve_mask, | ||
| float | mix_factor, | ||
| bke::CurvesGeometry & | dst_curves, | ||
| IndexMaskMemory & | memory ) |
Definition at line 1010 of file interpolate_curves.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), attribute, blender::BLI_assert(), blender::bke::CurvesGeometry::calculate_bezier_auto_handles(), blender::array_utils::copy(), blender::bke::cpp_type_to_attribute_type(), blender::bke::CurvesGeometry::curve_types(), blender::bke::CurvesGeometry::curve_types_for_write(), blender::bke::CurvesGeometry::curves_num(), blender::geometry::AttributesForInterpolation::dst, ELEM, blender::bke::CurvesGeometry::ensure_can_interpolate_to_evaluated(), blender::bke::Float, blender::bke::Float2, blender::bke::Float3, blender::bke::Float4, blender::index_mask::IndexMask::foreach_index(), blender::IndexMask::from_bools(), blender::GVArray::from_span(), gather_curve_attributes_to_interpolate(), gather_point_attributes_to_interpolate(), blender::exec_mode::grain_size(), blender::bke::CurvesGeometry::handle_positions_left_for_write(), blender::bke::CurvesGeometry::handle_positions_right_for_write(), blender::bke::CurvesGeometry::handle_types_left_for_write(), blender::bke::CurvesGeometry::handle_types_right_for_write(), interpolate_curves_with_samples(), blender::bke::CurvesGeometry::is_empty(), blender::GSpan::is_empty(), mix_arrays(), mix_curve_type(), mix_handle_type_arrays(), blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::points_num(), blender::bke::CurvesGeometry::positions_for_write(), sample_curve_attribute(), sample_curve_positions_and_handles(), blender::GMutableSpan::size(), blender::index_mask::IndexMask::size(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::geometry::AttributesForInterpolation::src_from, blender::geometry::AttributesForInterpolation::src_to, blender::bke::CurvesGeometry::tag_topology_changed(), blender::GMutableSpan::type(), and blender::bke::CurvesGeometry::update_curve_types().
Referenced by blender::ed::sculpt_paint::greasepencil::interpolate_between_curves(), interpolate_curves(), and interpolate_curves_with_samples().
|
static |
Equivalent to #PackIsland::build_inverse_transformation.
Definition at line 251 of file uv_pack.cc.
References inverse_transformation_from_sincos(), and sincos().
Referenced by inverse_transformation_from_sincos(), and blender::geometry::PackIsland::place_().
Definition at line 39 of file randomize.cc.
References blender::data, blender::Span< T >::index_range(), invert_permutation(), and blender::Span< T >::size().
Referenced by copy_and_reorder_mesh_edges(), copy_and_reorder_mesh_verts(), debug_randomize_curve_order(), debug_randomize_edge_order(), debug_randomize_face_order(), debug_randomize_point_order(), debug_randomize_vert_order(), identifiers_to_indices(), and invert_permutation().
Definition at line 101 of file reorder.cc.
References blender::data, blender::Span< T >::index_range(), invert_permutation(), blender::threading::parallel_for(), and blender::Span< T >::size().
|
static |
Definition at line 112 of file uv_pack.cc.
References b, blender::compare_ff_relative(), FLT_EPSILON, get_aspect_scaled_area(), get_aspect_scaled_extent(), and is_larger().
Referenced by is_larger(), pack_island_box_pack_2d(), pack_island_xatlas(), pack_islands_optimal_pack(), and pack_islands_optimal_pack_table().
|
static |
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 28 of file set_curve_type.cc.
References ELEM, is_nurbs_to_bezier_one_to_one(), blender::NURBS_KNOT_MODE_ENDPOINT, and blender::NURBS_KNOT_MODE_NORMAL.
Referenced by convert_curves_to_bezier(), create_nurbs_to_bezier_handles(), create_nurbs_to_bezier_positions(), is_nurbs_to_bezier_one_to_one(), and to_bezier_size().
|
static |
Definition at line 113 of file join_geometries.cc.
References blender::bke::AttributeDomainAndType::data_type, blender::bke::AttributeDomainAndType::domain, fill_new_attribute(), blender::bke::GSpanAttributeWriter::finish(), get_final_attribute_info(), join_attributes(), blender::geometry::GeometrySet::GatheredAttributes::kinds, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::geometry::GeometrySet::GatheredAttributes::names, blender::result, blender::bke::GSpanAttributeWriter::span, and try_join_single_value_attribute().
Referenced by join_attributes(), and join_instances().
|
static |
Definition at line 194 of file join_geometries.cc.
References blender::bke::GeometrySet::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::first(), blender::geometry::GeometrySet::from_instances(), blender::geometry::RealizeInstancesResult::geometry, blender::bke::GeometrySet::get_component_for_write(), blender::MatBase< float, 4, 4 >::identity(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::bke::GeometryComponent::is_empty(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), join_component_type(), join_instances(), join_volumes(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_cb(), options, realize_instances(), blender::result, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by join_component_type(), and join_geometries().
|
static |
Definition at line 21 of file merge_layers.cc.
References blender::BLI_assert(), blender::bke::curves_new_nomain(), blender::bke::GeometrySet::get_curves(), blender::bke::GeometrySet::has_curves(), blender::Span< T >::index_range(), blender::bke::CurvesGeometry::is_empty(), join_curves(), join_geometries(), blender::Span< T >::size(), and blender::bke::CurvesGeometry::transform().
Referenced by join_curves(), and merge_layers().
|
static |
Definition at line 259 of file merge_curves.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::bke::attribute_filter_from_skip_ref(), blender::bke::CurvesGeometry::attributes(), blender::CurvesGeometry::attributes_active_index, blender::bke::CurvesGeometry::attributes_for_write(), blender::BKE_defgroup_copy_list(), blender::bke::copy_attributes(), blender::bke::Curve, blender::offset_indices::OffsetIndices< T >::data(), blender::IndexRange::drop_back(), blender::MutableSpan< T >::fill(), blender::bke::gather_attributes(), blender::MutableSpan< T >::index_range(), join_curves_ranges(), blender::bke::CurvesGeometry::offsets_for_write(), blender::bke::Point, blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::points_num(), blender::offset_indices::OffsetIndices< T >::size(), blender::offset_indices::sum_group_sizes(), blender::bke::CurvesGeometry::tag_topology_changed(), and blender::CurvesGeometry::vertex_group_names.
Referenced by curves_merge_endpoints(), and join_curves_ranges().
| GeometrySet blender::geometry::join_geometries | ( | const Span< GeometrySet > | geometries, |
| const bke::AttributeFilter & | attribute_filter, | ||
| const std::optional< Span< GeometryComponent::Type > > & | component_types_to_join, | ||
| const bool | allow_merging_instance_references ) |
Definition at line 249 of file join_geometries.cc.
References blender::Span< T >::is_empty(), join_component_type(), join_geometries(), and blender::result.
| bke::GeometrySet blender::geometry::join_geometries | ( | Span< bke::GeometrySet > | geometries, |
| const bke::AttributeFilter & | attribute_filter, | ||
| const std::optional< Span< bke::GeometryComponent::Type > > & | component_types_to_join = std::nullopt, | ||
| bool | allow_merging_instance_references = true ) |
| allow_merging_instance_references | If true, instance references from multiple instances components may be merged when they are the same. This is typically good because it reduces the amount of processing for later nodes. However, this may be undesirable in some cases if the instance references are modified afterwards and the calling code assumes that the instances references are just concatenated. |
References join_geometries().
Referenced by blender::ed::sculpt_paint::greasepencil::add_strokes_to_drawing(), blender::ed::curves::append_primitive_curve(), blender::ed::sculpt_paint::trim::apply_join_operation(), blender::ed::object::convert_grease_pencil_component_to_curves(), blender::ed::object::convert_grease_pencil_to_mesh(), blender::nodes::node_geo_curve_fill_cc::curve_fill_calculate(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::greasepencil::grease_pencil_join_fills_exec(), blender::ed::greasepencil::grease_pencil_move_to_layer_exec(), blender::ed::greasepencil::grease_pencil_outline_exec(), blender::nodes::node_geo_curve_to_mesh_cc::grease_pencil_to_mesh(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::ed::greasepencil::join_curves(), join_curves(), join_geometries(), join_geometries(), blender::nodes::node_geo_curve_to_points_cc::layer_pointclouds_to_instances(), blender::make_prim_finish_sculpt(), blender::MOD_lineart_gpencil_generate_v3(), blender::modify_drawing(), blender::nodes::node_geo_boolean_cc::node_geo_exec(), blender::nodes::node_geo_instance_on_points_cc::node_geo_exec(), blender::nodes::node_geo_join_geometry_cc::node_geo_exec(), blender::ed::greasepencil::paste_all_strokes_from_clipboard(), and reinsert_modified_geometry_recursive().
|
static |
Definition at line 142 of file join_geometries.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::array_utils::gather(), blender::Span< T >::index_range(), join_attributes(), join_instances(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_cb(), blender::bke::Instances::reference_handles(), blender::bke::Instances::references(), blender::result, blender::Span< T >::size(), blender::MutableSpan< T >::slice(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by join_component_type(), and join_instances().
|
static |
Definition at line 1927 of file realize_instances.cc.
References blender::bke::MutableAttributeAccessor::add(), calc_material_index_max_hint(), calc_single_value_material_index(), blender::data, blender::SharedCache< T >::ensure(), blender::bke::Face, blender::Span< T >::index_range(), join_mesh_material_indices(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::geometry::AllMeshesInfo::materials, max, blender::bke::MeshRuntime::max_material_index, blender::threading::parallel_for(), blender::geometry::AllMeshesInfo::realize_info, and blender::Mesh::runtime.
Referenced by join_mesh_material_indices().
|
static |
Definition at line 187 of file join_geometries.cc.
References join_volumes().
Referenced by join_component_type(), and join_volumes().
|
static |
Definition at line 271 of file trim_curves.cc.
References blender::BLI_assert(), blender::bke::curves::CurveSegment::index, blender::bke::curves::bezier::insert(), knot_insert_bezier(), blender::bke::curves::CurveSegment::next_index, and blender::bke::curves::CurvePoint::parameter.
Referenced by knot_insert_bezier(), and sample_interval_bezier().
|
static |
Definition at line 160 of file fillet_curves.cc.
References blender::IndexRange::drop_back(), blender::IndexRange::drop_front(), blender::MutableSpan< T >::first(), blender::Span< T >::first(), blender::Span< T >::index_range(), blender::IndexRange::last(), blender::MutableSpan< T >::last(), blender::Span< T >::last(), limit_radii(), and limit_radius().
Referenced by fillet_curves(), and limit_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 133 of file fillet_curves.cc.
References angle(), blender::math::distance(), limit_radius(), position, and blender::math::safe_divide().
Referenced by fillet_curves(), fillet_curves_bezier(), fillet_curves_poly(), limit_radii(), and limit_radius().
|
inlinestatic |
Definition at line 64 of file subdivide_curves.cc.
References b, blender::IndexRange::drop_front(), blender::MutableSpan< T >::first(), blender::MutableSpan< T >::index_range(), linear_interpolation(), blender::bke::attribute_math::mix2(), blender::MutableSpan< T >::size(), step, and T.
Referenced by linear_interpolation(), subdivide_attribute_linear(), and subdivide_bezier_segment().
|
static |
Definition at line 142 of file trim_curves.cc.
References blender::BLI_assert(), blender::CURVE_TYPE_BEZIER, blender::CURVE_TYPE_CATMULL_ROM, blender::CURVE_TYPE_POLY, lookup_curve_point(), lookup_point_bezier(), lookup_point_polygonal(), and lookup_point_uniform_spacing().
Referenced by compute_curve_trim_parameters(), and lookup_curve_point().
|
static |
Definition at line 121 of file trim_curves.cc.
References blender::bke::CurvesGeometry::bezier_evaluated_offsets_for_curve(), blender::bke::curves::bezier::has_vector_handles(), lookup_point_bezier(), and lookup_point_uniform_spacing().
|
static |
Find the point on a Bezier curve using the 'bezier_offsets' cache.
Definition at line 90 of file trim_curves.cc.
References blender::Span< T >::begin(), blender::Span< T >::end(), blender::Span< T >::last(), lookup_point_bezier(), and blender::length_parameterize::sample_at_length().
Referenced by lookup_curve_point(), lookup_point_bezier(), and lookup_point_bezier().
|
static |
Find the point on the 'evaluated' polygonal curve.
Definition at line 65 of file trim_curves.cc.
References blender::Span< T >::last(), lookup_point_polygonal(), and blender::length_parameterize::sample_at_length().
Referenced by lookup_curve_point(), and lookup_point_polygonal().
|
static |
Find the point on the curve defined by the distance along the curve. Assumes curve resolution is constant for all curve segments and evaluated curve points are uniformly spaced between the segment endpoints in relation to the curve parameter.
| lengths | Accumulated length for the evaluated curve. |
| sample_length | Distance along the curve to determine the #CurvePoint for. |
| cyclic | If curve is cyclic. |
| resolution | Curve resolution (number of evaluated points per segment). |
| num_curve_points | Total number of control points in the curve. |
Definition at line 36 of file trim_curves.cc.
References blender::BLI_assert(), blender::Span< T >::last(), lookup_point_uniform_spacing(), blender::length_parameterize::sample_at_length(), and blender::Span< T >::size().
Referenced by lookup_curve_point(), lookup_point_bezier(), and lookup_point_uniform_spacing().
|
static |
Definition at line 216 of file reverse_uv_sampler.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), lookup_tris_in_cell(), blender::geometry::Row::offsets, blender::geometry::ReverseUVSampler::LookupGrid::rows, blender::geometry::Row::tri_indices, blender::geometry::Row::x_max, blender::geometry::Row::x_min, and blender::geometry::ReverseUVSampler::LookupGrid::y_min.
Referenced by lookup_tris_in_cell(), and blender::geometry::ReverseUVSampler::sample().
|
static |
Definition at line 158 of file randomize.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::offset_indices::gather_group_sizes(), make_new_offset_indices(), and blender::offset_indices::OffsetIndices< T >::size().
Referenced by debug_randomize_curve_order(), debug_randomize_face_order(), and make_new_offset_indices().
|
static |
Definition at line 33 of file mesh_selection.cc.
References array< T, alignment >::array(), blender::Default, blender::index_mask::IndexMask::foreach_index(), blender::IndexMask::from_bools(), blender::exec_mode::grain_size(), mapped_corner_selection_from_face(), PRF_scope, and blender::Span< T >::slice().
Referenced by edge_selection_from_face(), mapped_corner_selection_from_face(), and vert_selection_from_face().
| GreasePencil * blender::geometry::merge_layers | ( | const GreasePencil & | src_grease_pencil, |
| GroupedSpan< int > | layers_to_merge, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Creates a new grease pencil geometry that has groups of layers merged into one layer per group.
| layers_to_merge | A list of source layer indices for each new layers. Each new layer must have at least one source layer. |
Definition at line 47 of file merge_layers.cc.
References blender::bke::AttributeFilter::allow_skip(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BKE_grease_pencil_copy_parameters(), blender::BKE_grease_pencil_new_nomain(), blender::BLI_assert(), blender::bke::AttributeIter::data_type, blender::bke::GSpanAttributeWriter::finish(), blender::bke::AttributeIter::get(), blender::GVArraySpan::GVArraySpan(), blender::Span< T >::index_range(), blender::IndexRange::IndexRange(), blender::math::invert(), blender::Span< T >::is_empty(), join_curves(), blender::bke::Layer, layer, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), merge_layers(), blender::bke::attribute_math::mix_groups(), blender::ActionLayer::name, blender::bke::AttributeIter::name, blender::threading::parallel_for(), blender::offset_indices::GroupedSpan< T >::size(), blender::Span< T >::size(), blender::bke::GSpanAttributeWriter::span, blender::bke::greasepencil::Drawing::strokes_for_write(), and blender::bke::GAttributeReader::varray.
Referenced by merge_layers(), blender::nodes::node_geo_merge_layers_cc::merge_layers(), and merge_layers_by_name().
| GreasePencil * blender::geometry::merge_layers_by_name | ( | const GreasePencil & | src_grease_pencil, |
| const VArray< bool > & | selection, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 133 of file merge_layers.cc.
References blender::offset_indices::build_groups_from_indices(), blender::IndexRange::IndexRange(), layer, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_cb(), merge_layers(), and merge_layers_by_name().
Referenced by blender::ed::greasepencil::apply_eval_grease_pencil_data(), blender::nodes::node_geo_merge_layers_cc::merge_by_name(), and merge_layers_by_name().
| PointCloud * blender::geometry::merge_points | ( | const PointCloud & | src_points, |
| const IndexMask & | selection, | ||
| Span< int > | merge_ids, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 25 of file point_merge.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::bke::AttributeFilter::allow_skip(), blender::BKE_pointcloud_new_nomain(), blender::offset_indices::build_groups_from_indices(), blender::GVArrayCommon::common_info(), blender::index_mask::IndexMask::complement(), blender::CommonVArrayInfo::data, blender::bke::AttributeIter::data_type, blender::array_utils::gather(), blender::bke::AttributeIter::get(), blender::GPointer::GPointer(), blender::array_utils::group_ids_to_indices(), blender::IndexMask::IndexMask(), blender::bke::subdiv::init(), blender::bke::Int32, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), merge_points(), blender::bke::attribute_math::mix_groups(), blender::bke::AttributeIter::name, blender::threading::parallel_for(), blender::bke::Point, blender::CommonVArrayInfo::Single, blender::index_mask::IndexMask::size(), blender::bke::GSpanAttributeWriter::span, blender::GMutableSpan::take_front(), blender::PointCloud::totpoint, blender::CommonVArrayInfo::type, blender::GVArrayCommon::type(), blender::PointCloud::type, blender::GMutableSpan::typed(), blender::GSpan::typed(), and blender::bke::GAttributeReader::varray.
Referenced by merge_points(), and blender::nodes::node_geo_merge_points_cc::node_geo_exec().
|
static |
| src_to_target | The target element each element merges into. Elements that are removed entirely (collapsed edges) have negative values. |
| survivors | The elements kept in the result (see merge_survivors). |
| do_mix_data | Build groups for mixing attribute values from all of an element's source elements. Otherwise just the value of the target element is used. |
Definition at line 790 of file mesh_merge_verts.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::offset_indices::build_groups_from_indices(), blender::MutableSpan< T >::copy_from(), blender::Default, blender::MutableSpan< T >::drop_front(), blender::geometry::MergePropagationMap::dst_to_src, blender::MutableSpan< T >::first(), blender::index_mask::IndexMask::foreach_index(), blender::index_mask::IndexMask::foreach_index_optimized(), blender::IndexMask::from_predicate(), blender::array_utils::gather(), blender::exec_mode::grain_size(), blender::Span< T >::index_range(), blender::index_mask::IndexMask::is_empty(), merge_propagation_map(), blender::geometry::MergePropagationMap::mixed, blender::geometry::MergePropagationMap::mixed_indices, blender::geometry::MergePropagationMap::mixed_offsets, PRF_scope, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::index_mask::IndexMask::size(), blender::offset_indices::GroupedSpan< T >::size(), and blender::index_mask::IndexMask::to_indices().
Referenced by create_merged_mesh(), and merge_propagation_map().
|
static |
Build a map from each source element to the element it becomes in the result. Values for elements removed entirely (collapsed edges) are left uninitialized.
Definition at line 851 of file mesh_merge_verts.cc.
References blender::index_mask::build_reverse_map(), blender::Default, blender::Span< T >::index_range(), merge_src_to_dst_map(), blender::threading::parallel_for(), PRF_scope, and blender::Span< T >::size().
Referenced by create_merged_mesh(), and merge_src_to_dst_map().
|
static |
The elements that are kept in the result. In other words, the merge targets and also the "out of context" elements.
Definition at line 762 of file mesh_merge_verts.cc.
References blender::IndexMask::from_predicate(), blender::Span< T >::index_range(), and merge_survivors().
Referenced by create_merged_mesh(), and merge_survivors().
| std::optional< Mesh * > blender::geometry::mesh_bevel | ( | const Mesh & | src_mesh, |
| const IndexMask & | selection, | ||
| const BevelParameters & | params, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 7731 of file mesh_bevel.cc.
References blender::geometry::BevelParameters::affect_type, blender::geometry::construct::bevel_build_edge_polygons(), blender::geometry::construct::bevel_extend_edge_data(), blender::geometry::construct::bevel_rebuild_existing_polygons(), blender::geometry::construct::bevel_vert_construct(), blender::geometry::construct::build_boundary(), blender::geometry::construct::build_output_mesh(), blender::geometry::construct::build_vmesh(), blender::geometry::construct::compute_new_corner_interp_weights(), blender::geometry::BevelParameters::custom_profile_samples, blender::geometry::construct::determine_uv_vert_connectivity(), blender::e, blender::geometry::construct::fill_new_corner_uvs(), blender::IndexRange::last(), blender::geometry::construct::merge_uvs(), mesh_bevel(), blender::geometry::BevelParameters::offsets, blender::geometry::construct::regularize_profile_orientation(), blender::IndexRange::start(), state, blender::v, VertexFace, Vertices, blender::x, and y.
Referenced by mesh_bevel(), and blender::nodes::node_geo_bevel_cc::node_geo_exec().
| std::optional< Mesh * > blender::geometry::mesh_copy_selection | ( | const Mesh & | src_mesh, |
| const VArray< bool > & | selection, | ||
| bke::AttrDomain | selection_domain, | ||
| const bke::AttributeFilter & | attribute_filter = {} ) |
Definition at line 130 of file mesh_copy_selection.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::bke::attribute_filter_with_skip_ref(), blender::BKE_mesh_copy_parameters_for_eval(), BLI_assert_unreachable, blender::bke::Corner, blender::Mesh::corners_num, blender::Default, blender::bke::Edge, blender::Mesh::edges_num, blender::bke::Face, blender::Mesh::faces_num, blender::IndexMask::from_bools(), blender::bke::gather_attributes(), blender::bke::gather_attributes_group_to_group(), blender::offset_indices::gather_selected_offsets(), blender::VArrayCommon< T >::get_if_single(), blender::index_mask::IndexMask::is_empty(), blender::VArrayCommon< T >::is_empty(), blender::threading::EnumerableThreadSpecific< T >::local(), mesh_copy_selection(), blender::bke::mesh_new_no_attributes(), blender::threading::parallel_invoke(), blender::bke::Point, PRF_scope, blender::index_mask::IndexMask::size(), blender::Span< T >::size(), blender::offset_indices::OffsetIndices< T >::total_size(), and blender::Mesh::verts_num.
Referenced by mesh_copy_selection(), and separate_mesh_selection().
| std::optional< Mesh * > blender::geometry::mesh_copy_selection_keep_edges | ( | const Mesh & | mesh, |
| const VArray< bool > & | selection, | ||
| bke::AttrDomain | selection_domain, | ||
| const bke::AttributeFilter & | attribute_filter = {} ) |
Definition at line 407 of file mesh_copy_selection.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::BKE_mesh_copy_parameters_for_eval(), BLI_assert_unreachable, blender::bke::MeshRuntime::bounds_cache, blender::bke::copy_attributes(), copy_loose_vert_hint(), copy_overlapping_hint(), blender::bke::Corner, blender::Mesh::corners_num, blender::bke::Edge, blender::Mesh::edges_num, blender::bke::Face, face_selection_from_edge(), face_selection_from_vert(), blender::Mesh::faces_num, blender::IndexMask::from_bools(), blender::bke::gather_attributes(), blender::bke::gather_attributes_group_to_group(), blender::offset_indices::gather_selected_offsets(), blender::VArrayCommon< T >::is_empty(), mesh_copy_selection_keep_edges(), blender::bke::mesh_new_no_attributes(), blender::bke::Point, blender::Mesh::runtime, blender::index_mask::IndexMask::size(), blender::offset_indices::OffsetIndices< T >::total_size(), and blender::Mesh::verts_num.
Referenced by mesh_copy_selection_keep_edges(), and separate_mesh_selection().
| std::optional< Mesh * > blender::geometry::mesh_copy_selection_keep_verts | ( | const Mesh & | src_mesh, |
| const VArray< bool > & | selection, | ||
| bke::AttrDomain | selection_domain, | ||
| const bke::AttributeFilter & | attribute_filter = {} ) |
Definition at line 288 of file mesh_copy_selection.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::bke::attribute_filter_with_skip_ref(), blender::BKE_mesh_copy_parameters_for_eval(), BLI_assert_unreachable, blender::bke::MeshRuntime::bounds_cache, blender::bke::copy_attributes(), copy_loose_edge_hint(), copy_overlapping_hint(), blender::bke::Corner, blender::Mesh::corners_num, blender::bke::Edge, edge_selection_from_face(), blender::Mesh::edges_num, blender::bke::Face, blender::Mesh::faces_num, blender::IndexMask::from_bools(), blender::bke::gather_attributes(), blender::bke::gather_attributes_group_to_group(), blender::offset_indices::gather_selected_offsets(), blender::VArrayCommon< T >::is_empty(), blender::threading::EnumerableThreadSpecific< T >::local(), mesh_copy_selection_keep_verts(), blender::bke::mesh_new_no_attributes(), blender::threading::parallel_invoke(), blender::bke::Point, remap_edges(), blender::Mesh::runtime, blender::index_mask::IndexMask::size(), blender::Span< T >::size(), blender::offset_indices::OffsetIndices< T >::total_size(), and blender::Mesh::verts_num.
Referenced by mesh_copy_selection_keep_verts(), and separate_mesh_selection().
| bke::CurvesGeometry blender::geometry::mesh_edges_to_curves_convert | ( | const Mesh & | mesh, |
| const IndexMask & | selection, | ||
| const bke::AttributeFilter & | attribute_filter ) |
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 239 of file mesh_to_curve_convert.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Default, edges_to_curves_convert(), blender::array_utils::gather(), mesh_edges_to_curves_convert(), PRF_scope, blender::index_mask::IndexMask::size(), and blender::Span< T >::size().
Referenced by mesh_edges_to_curves_convert(), and blender::nodes::node_geo_mesh_to_curve_cc::node_geo_exec().
| bke::CurvesGeometry blender::geometry::mesh_faces_to_curves_convert | ( | const Mesh & | mesh, |
| const IndexMask & | selection, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Convert each mesh face into a cyclic curve.
Definition at line 294 of file mesh_to_curve_convert.cc.
References blender::bke::Corner, create_curves_for_faces(), create_point_to_vert_map(), blender::bke::Curve, blender::bke::AttributeIter::data_type, blender::Default, blender::bke::AttributeIter::domain, blender::bke::Edge, blender::bke::Face, filter_builtin_attributes(), blender::bke::GSpanAttributeWriter::finish(), blender::bke::AttributeAccessor::foreach_attribute(), blender::bke::attribute_math::gather(), blender::bke::gather_attributes(), blender::bke::gather_attributes_group_to_group(), blender::bke::AttributeIter::get(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), mesh_faces_to_curves_convert(), blender::bke::AttributeIter::name, blender::bke::Point, PRF_scope, blender::bke::GSpanAttributeWriter::span, and blender::bke::String.
Referenced by mesh_faces_to_curves_convert(), and blender::nodes::node_geo_mesh_to_curve_cc::node_geo_exec().
| std::optional< Mesh * > blender::geometry::mesh_merge_by_distance_all | ( | const Mesh & | mesh, |
| const IndexMask & | selection, | ||
| float | merge_distance, | ||
| const bke::AttributeFilter & | attribute_filter = bke::AttributeFilter::default_filter() ) |
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 1285 of file mesh_merge_verts.cc.
References blender::kdtree::calc_duplicates(), blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), mesh_merge_by_distance_all(), OUT_OF_CONTEXT, and blender::threading::parallel_for().
Referenced by blender::calculate_weld(), blender::io::ply::convert_ply_to_mesh(), mesh_merge_by_distance_all(), 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, | ||
| const bke::AttributeFilter & | attribute_filter = bke::AttributeFilter::default_filter() ) |
Merge selected vertices along edges to other selected vertices. Only vertices connected by edges are considered for merging.
Definition at line 1315 of file mesh_merge_verts.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::geometry::WeldVertexCluster::co, blender::copy_v3_v3(), create_merged_mesh(), blender::array_utils::fill_index_range(), blender::Span< T >::index_range(), blender::Span< T >::is_empty(), blender::len_squared_v3(), blender::madd_v3_v3fl(), blender::geometry::WeldVertexCluster::merged_verts, mesh_merge_by_distance_connected(), blender::square_f(), and blender::sub_v3_v3v3().
Referenced by blender::calculate_weld(), mesh_merge_by_distance_connected(), and blender::nodes::node_geo_merge_by_distance_cc::mesh_merge_by_distance_connected().
| std::optional< Mesh * > blender::geometry::mesh_merge_verts | ( | const Mesh & | mesh, |
| const IndexMask & | selection, | ||
| Span< int > | merge_ids, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Merge selected vertices that share the same ID. Each group of vertices merges into the vertex with the lowest index.
Definition at line 1413 of file mesh_merge_verts.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), create_merged_mesh(), blender::array_utils::fill_index_range(), blender::index_mask::IndexMask::foreach_index_optimized(), blender::exec_mode::grain_size(), blender::array_utils::group_ids_to_indices(), mesh_merge_verts(), and blender::index_mask::IndexMask::size().
| Mesh * blender::geometry::mesh_merge_verts | ( | const Mesh & | mesh, |
| Span< int > | vert_src_to_target, | ||
| int | removed_verts_num, | ||
| bool | do_mix_data ) |
Merge vertices into target vertices targets.
| vert_src_to_target | Maps each vertex to the vertex it merges into. Vertices that don't merge into another vertex point at themselves. The array is aligned with mesh.verts_num. |
| removed_verts_num | The number of vertices that merge into a different vertex, in other words the number of vertices removed by the merge (not the size of the array). |
| do_mix_data | If true, each group of merged vertices (the sources with the same target, plus the target vertex) will have their custom data interpolated into the resulting vertex. If false, only the custom data of the target vertex will remain. |
Definition at line 1398 of file mesh_merge_verts.cc.
References blender::BLI_assert(), create_merged_mesh(), blender::bke::AttributeFilter::default_filter(), mesh_merge_verts(), and blender::Span< T >::size().
Referenced by blender::arrayModifier_doArray(), mesh_merge_verts(), mesh_merge_verts(), blender::mesh_remove_doubles_on_axis(), blender::mirror_apply_on_axis(), and blender::nodes::node_geo_merge_points_cc::node_geo_exec().
| std::optional< Mesh * > blender::geometry::mesh_triangulate | ( | const Mesh & | src_mesh, |
| const IndexMask & | selection, | ||
| TriangulateNGonMode | ngon_mode, | ||
| TriangulateQuadMode | quad_mode, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 499 of file mesh_triangulate.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), attribute, blender::bke::attribute_filter_with_skip_ref(), blender::Mesh::attribute_storage, blender::BKE_mesh_copy_parameters_for_eval(), blender::BLI_assert(), blender::bke::MeshRuntime::bounds_cache, blender::geometry::ngon::calc_corner_tris(), blender::geometry::quad::calc_corner_tris(), blender::geometry::ngon::calc_tris_by_ngon(), blender::Span< T >::cast(), blender::CD_CONSTRUCT, blender::CD_MASK_MESH, blender::CD_ORIGINDEX, copy_loose_vert_hint(), blender::bke::Corner, blender::CustomData_add_layer(), blender::CustomData_get_layer(), blender::CustomData_has_layer(), blender::CustomData_merge(), blender::bke::Edge, blender::Mesh::edge_data, blender::Mesh::edges_num, ELEM, blender::CustomData_MeshMasks::emask, blender::index_mask::evaluate_expression(), blender::bke::Face, blender::Mesh::face_data, face_keys_to_face_indices(), face_normals_if_worthwhile(), face_tris_mask(), blender::Mesh::faces_num, blender::offset_indices::fill_constant_group_size(), blender::IndexMask::from_difference(), blender::IndexMask::from_predicate(), blender::array_utils::gather(), blender::bke::attribute_math::gather(), blender::array_utils::gather_group_to_group(), blender::bke::attribute_math::gather_group_to_group(), blender::offset_indices::gather_selected_offsets(), blender::offset_indices::OffsetIndices< T >::index_range(), blender::Span< T >::index_range(), blender::index_mask::IndexMask::is_empty(), blender::bke::mesh_calc_edges(), blender::bke::mesh_is_valid(), blender::bke::mesh_new_no_attributes(), mesh_triangulate(), ngon_indices_of_tris(), blender::bke::Point, quad_indices_of_tris(), blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::bke::retrieve_attributes_for_transfer(), blender::Mesh::runtime, blender::index_mask::IndexMask::size(), blender::IndexRange::size(), blender::offset_indices::OffsetIndices< T >::size(), blender::MutableSpan< T >::slice(), blender::offset_indices::OffsetIndices< T >::slice(), blender::index_mask::ExprBuilder::subtract(), blender::IndexRange::take_back(), blender::MutableSpan< T >::take_back(), blender::IndexRange::take_front(), blender::MutableSpan< T >::take_front(), blender::offset_indices::OffsetIndices< T >::total_size(), tri_to_ordered_tri(), tris_in_set(), blender::Mesh::vert_data, blender::Mesh::verts_num, and blender::CustomData_MeshMasks::vmask.
Referenced by mesh_triangulate(), and blender::nodes::node_geo_triangulate_cc::node_geo_exec().
|
static |
Definition at line 72 of file mix_geometries.cc.
References b, mix(), T, blender::bke::attribute_math::to_static_type(), and blender::GMutableSpan::type().
|
static |
Definition at line 61 of file mix_geometries.cc.
References b, blender::MutableSpan< T >::index_range(), mix(), and blender::threading::parallel_for().
Referenced by mix(), mix(), and mix_socket_values_same_type().
|
static |
Definition at line 912 of file interpolate_curves.cc.
References blender::index_mask::IndexMask::foreach_index(), mix_arrays(), T, blender::bke::attribute_math::to_static_type(), and blender::GMutableSpan::type().
|
static |
Definition at line 883 of file interpolate_curves.cc.
References mix_arrays(), T, blender::bke::attribute_math::to_static_type(), and blender::GMutableSpan::type().
|
static |
Definition at line 865 of file interpolate_curves.cc.
References blender::MutableSpan< T >::copy_from(), blender::MutableSpan< T >::index_range(), blender::math::interpolate(), and mix_arrays().
Referenced by interpolate_curves_with_samples(), mix_arrays(), mix_arrays(), and mix_arrays().
|
static |
Definition at line 81 of file mix_geometries.cc.
References mix_attributes().
Referenced by mix_attributes(), and mix_geometries().
|
static |
Definition at line 242 of file mix_geometries.cc.
References b, mix_bundle_items(), mix_socket_values(), and blender::nodes::BundleItemValue::value.
Referenced by mix_bundle_items(), and mix_bundles().
| void blender::geometry::mix_bundles | ( | nodes::Bundle & | a, |
| const nodes::Bundle & | b, | ||
| float | factor ) |
Definition at line 257 of file mix_geometries.cc.
References b, blender::nodes::Bundle::items(), mix_bundle_items(), and mix_bundles().
Referenced by mix_bundles(), mix_geometries(), and mix_socket_values_same_type().
|
static |
Definition at line 971 of file interpolate_curves.cc.
References blender::CURVE_TYPE_BEZIER, blender::CURVE_TYPE_CATMULL_ROM, blender::CURVE_TYPE_NURBS, blender::CURVE_TYPE_POLY, blender::index_mask::IndexMask::foreach_index(), mix_curve_type(), and to_type().
Referenced by interpolate_curves_with_samples(), and mix_curve_type().
| void blender::geometry::mix_geometries | ( | bke::GeometrySet & | a, |
| const bke::GeometrySet & | b, | ||
| float | factor ) |
Definition at line 268 of file mix_geometries.cc.
References b, blender::bke::GeometrySet::bundle_for_write(), create_id_index_map(), blender::bke::GeometrySet::get_curves_for_write(), blender::bke::GeometrySet::get_instances_for_write(), blender::bke::GeometrySet::get_mesh_for_write(), blender::bke::GeometrySet::get_pointcloud_for_write(), blender::bke::GeometrySet::has_bundle(), blender::bke::Instance, mix_attributes(), mix_bundles(), mix_geometries(), and blender::bke::Point.
Referenced by mix_geometries(), and mix_socket_values_same_type().
Definition at line 935 of file interpolate_curves.cc.
References blender::BEZIER_HANDLE_ALIGN, blender::BEZIER_HANDLE_AUTO, blender::BEZIER_HANDLE_FREE, blender::BEZIER_HANDLE_VECTOR, mix_handle_type(), and to_type().
Referenced by mix_handle_type(), and mix_handle_type_arrays().
|
static |
Definition at line 955 of file interpolate_curves.cc.
References blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), mix_handle_type(), and mix_handle_type_arrays().
Referenced by interpolate_curves_with_samples(), and mix_handle_type_arrays().
| void blender::geometry::mix_socket_values | ( | bke::SocketValueVariant & | a, |
| const bke::SocketValueVariant & | b, | ||
| const float | factor ) |
Mixes both geometries if possible (e.g. if corresponding meshes have the same number of vertices), or index mapping is possible via the id attribute. Also mix single values, lists, and bundle item values when types are compatible.
Definition at line 223 of file mix_geometries.cc.
References b, blender::bke::SocketValueVariant::ensure_type(), blender::bke::SocketValueVariant::get(), blender::bke::SocketValueVariant::get_if(), blender::bke::SocketValueVariant::is_list(), blender::GPointer::is_type(), mix_socket_values(), mix_socket_values_same_type(), and blender::GPointer::type().
Referenced by mix_bundle_items(), mix_socket_values(), blender::nodes::node_geo_bake_cc::LazyFunctionForBakeNode::output_mixed_cached_state(), and blender::nodes::node_geo_simulation_cc::sim_output_node::LazyFunctionForSimulationOutputNode::output_mixed_cached_state().
|
static |
Definition at line 166 of file mix_geometries.cc.
References b, blender::BLI_assert(), blender::nodes::GList::cpp_type(), blender::ImplicitSharingPtr< T, IsStrong >::ensure_mutable_inplace(), blender::bke::SocketValueVariant::extract(), blender::bke::SocketValueVariant::from(), blender::GVArray::from_single_ref(), blender::bke::SocketValueVariant::get(), blender::GMutablePointer::get(), blender::GPointer::get(), blender::nodes::GListPtr::get_for_write(), blender::bke::SocketValueVariant::get_if(), blender::bke::SocketValueVariant::is_list(), blender::bke::SocketValueVariant::is_single(), blender::GMutablePointer::is_type(), mix(), mix_bundles(), mix_geometries(), mix_socket_values_same_type(), blender::GVArray::slice(), blender::GMutablePointer::type(), blender::GPointer::type(), and blender::nodes::GList::values_for_write().
Referenced by mix_socket_values(), and mix_socket_values_same_type().
|
static |
Definition at line 920 of file mesh_merge_verts.cc.
References blender::index_mask::IndexMask::complement(), blender::geometry::MergePropagationMap::dst_to_src, blender::bke::gather_deform_verts(), blender::index_mask::IndexMask::index_range(), blender::MutableSpan< T >::index_range(), blender::Span< T >::is_empty(), mix_vertex_groups(), blender::geometry::MergePropagationMap::mixed, blender::geometry::MergePropagationMap::mixed_groups(), and blender::threading::parallel_for().
Referenced by create_merged_mesh(), and mix_vertex_groups().
|
static |
Definition at line 49 of file mix_geometries.cc.
References b, mix_with_indices(), T, blender::bke::attribute_math::to_static_type(), and blender::GMutableSpan::type().
| void blender::geometry::mix_with_indices | ( | MutableSpan< T > | a, |
| const VArray< T > & | b, | ||
| const Span< int > | index_map, | ||
| const float | factor ) |
Definition at line 33 of file mix_geometries.cc.
References b, blender::MutableSpan< T >::index_range(), mix_with_indices(), and blender::threading::parallel_for().
Referenced by mix_with_indices(), and mix_with_indices().
| void blender::geometry::mul_v2_m2_add_v2v2 | ( | float | r[2], |
| const float | mat[2][2], | ||
| const float | a[2], | ||
| const float | b[2] ) |
Compute r = mat * (a + b) with high precision.
Definition at line 46 of file uv_pack.cc.
References b, float, mul_v2_m2_add_v2v2(), blender::x, and y.
Referenced by blender::island_uv_transform(), mul_v2_m2_add_v2v2(), pack_islands(), and uv_parametrizer_pack().
|
static |
Definition at line 3880 of file uv_parametrizer.cc.
References blender::geometry::ParamHandle::arena, blender::BLI_memarena_alloc(), blender::copy_v2_v2(), new_geo_uv_pinindex(), blender::geometry::GeoUVPinIndex::next, PARAM_KEY_MAX, blender::geometry::GeoUVPinIndex::reindex, blender::geometry::ParamHandle::unique_pin_count, and blender::geometry::GeoUVPinIndex::uv.
Referenced by new_geo_uv_pinindex(), and uv_prepare_pin_index().
|
static |
Definition at line 488 of file mesh_triangulate.cc.
References blender::BLI_assert(), blender::MutableSpan< T >::fill(), blender::index_mask::IndexMask::foreach_index_optimized(), blender::exec_mode::grain_size(), ngon_indices_of_tris(), blender::index_mask::IndexMask::size(), blender::MutableSpan< T >::size(), blender::offset_indices::OffsetIndices< T >::size(), blender::MutableSpan< T >::slice(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by mesh_triangulate(), and ngon_indices_of_tris().
|
static |
Definition at line 256 of file resample_curves.cc.
References blender::data, normalize_curve_point_data(), and normalize_span().
Referenced by normalize_curve_point_data(), resample_to_evaluated(), and resample_to_uniform().
|
static |
Definition at line 249 of file resample_curves.cc.
References blender::data, blender::math::normalize(), and normalize_span().
Referenced by normalize_curve_point_data(), and normalize_span().
|
static |
Transform the OffsetIndices storage of new elements per source element into a more standard index map which can be used with existing utilities to copy attributes.
Definition at line 531 of file mesh_split_edges.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::exec_mode::grain_size(), offsets_to_map(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by offsets_to_map(), and split_edges().
|
static |
Definition at line 2170 of file uv_pack.cc.
References overlap_aabb().
Referenced by blender::geometry::OverlapMerger::overlap(), and overlap_aabb().
|
static |
Definition at line 2583 of file uv_parametrizer.cc.
References blender::geometry::PAbfSystem::alpha, blender::geometry::PAbfSystem::bAlpha, blender::clamp_f(), M_PI, p_abf_adjust_alpha(), and blender::geometry::PAbfSystem::weight.
Referenced by p_abf_adjust_alpha(), and p_abf_matrix_invert().
|
static |
Definition at line 2510 of file uv_parametrizer.cc.
References blender::geometry::PAbfSystem::alpha, blender::geometry::PAbfSystem::beta, blender::e, blender::geometry::PFace::PFaceUnion::id, blender::geometry::PAbfSystem::lambdaLength, blender::geometry::PAbfSystem::lambdaPlanar, blender::geometry::PAbfSystem::lambdaTriangle, p_abf_compute_grad_alpha(), p_abf_compute_sin_product(), PVERT_INTERIOR, blender::geometry::PFace::u, blender::v, blender::v2, and blender::geometry::PAbfSystem::weight.
Referenced by p_abf_compute_grad_alpha(), and p_abf_compute_gradient().
|
static |
Definition at line 2535 of file uv_parametrizer.cc.
References blender::geometry::PAbfSystem::alpha, blender::geometry::PAbfSystem::bAlpha, blender::geometry::PAbfSystem::bInterior, blender::geometry::PAbfSystem::bTriangle, blender::e, blender::geometry::PFace::edge, blender::geometry::PChart::faces, float, blender::geometry::PEdge::PEdgeUnion::id, blender::geometry::PFace::PFaceUnion::id, M_PI, blender::geometry::PEdge::next, blender::geometry::PFace::nextlink, blender::geometry::PAbfSystem::ninterior, norm(), p_abf_compute_grad_alpha(), p_abf_compute_gradient(), p_abf_compute_sin_product(), PVERT_INTERIOR, blender::geometry::PEdge::u, blender::geometry::PFace::u, blender::v, and blender::geometry::PChart::verts.
Referenced by p_abf_compute_gradient(), and p_chart_abf_solve().
|
static |
Definition at line 2473 of file uv_parametrizer.cc.
References blender::geometry::PAbfSystem::cosine, blender::e, blender::geometry::PEdge::PEdgeUnion::id, p_abf_compute_sin_product(), blender::geometry::PAbfSystem::sine, blender::geometry::PEdge::u, and blender::v.
Referenced by p_abf_compute_grad_alpha(), p_abf_compute_gradient(), p_abf_compute_sin_product(), and p_abf_matrix_invert().
|
static |
Definition at line 2464 of file uv_parametrizer.cc.
References blender::geometry::PAbfSystem::alpha, angle(), cos, blender::geometry::PAbfSystem::cosine, blender::geometry::PAbfSystem::nangles, p_abf_compute_sines(), sin, and blender::geometry::PAbfSystem::sine.
Referenced by p_abf_compute_sines(), and p_chart_abf_solve().
|
static |
Definition at line 2594 of file uv_parametrizer.cc.
References b, blender::geometry::PAbfSystem::bAlpha, beta(), blender::geometry::PAbfSystem::bInterior, blender::geometry::PAbfSystem::bstar, blender::geometry::PAbfSystem::bTriangle, blender::geometry::PAbfSystem::dstar, EIG_linear_solver_delete(), EIG_linear_solver_matrix_add(), EIG_linear_solver_new(), EIG_linear_solver_right_hand_side_add(), EIG_linear_solver_solve(), EIG_linear_solver_variable_get(), blender::geometry::PChart::faces, blender::geometry::PVert::flag, float, blender::geometry::PEdge::PEdgeUnion::id, blender::geometry::PVert::PVertUnion::id, blender::geometry::PAbfSystem::J2dt, blender::geometry::PAbfSystem::lambdaLength, blender::geometry::PAbfSystem::lambdaPlanar, blender::geometry::PAbfSystem::lambdaTriangle, blender::geometry::PEdge::next, blender::geometry::PFace::nextlink, blender::geometry::PAbfSystem::ninterior, p_abf_adjust_alpha(), p_abf_compute_sin_product(), p_abf_matrix_invert(), PVERT_INTERIOR, blender::geometry::PEdge::u, blender::geometry::PVert::u, blender::v2, blender::geometry::PEdge::vert, W, blender::geometry::PAbfSystem::weight, and blender::x.
Referenced by p_abf_matrix_invert(), and p_chart_abf_solve().
|
static |
Definition at line 2440 of file uv_parametrizer.cc.
References blender::geometry::PAbfSystem::alpha, blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::geometry::PAbfSystem::bAlpha, blender::geometry::PAbfSystem::beta, blender::geometry::PAbfSystem::bInterior, blender::geometry::PAbfSystem::bstar, blender::geometry::PAbfSystem::bTriangle, blender::geometry::PAbfSystem::cosine, blender::geometry::PAbfSystem::dstar, blender::geometry::PAbfSystem::J2dt, blender::geometry::PAbfSystem::lambdaLength, blender::geometry::PAbfSystem::lambdaPlanar, blender::geometry::PAbfSystem::lambdaTriangle, blender::geometry::PAbfSystem::nangles, blender::geometry::PAbfSystem::nfaces, blender::geometry::PAbfSystem::ninterior, p_abf_setup_system(), blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::geometry::PAbfSystem::sine, and blender::geometry::PAbfSystem::weight.
Referenced by p_abf_setup_system(), and p_chart_abf_solve().
|
static |
Definition at line 3916 of file uv_parametrizer.cc.
References blender::BLI_memarena_clear(), p_add_ngon(), p_polygon_calc_tris(), blender::geometry::ParamHandle::polyfill_arena, uv_parametrizer_face_add(), and blender::v2.
Referenced by p_add_ngon(), and uv_parametrizer_face_add().
|
static |
Definition at line 414 of file uv_parametrizer.cc.
References p_area_signed(), and blender::v2.
Referenced by p_area_signed(), and p_chart_convex_hull().
Definition at line 572 of file uv_parametrizer.cc.
References blender::e, and p_boundary_edge_next().
Referenced by p_boundary_edge_next(), p_chart_convex_hull(), p_chart_fill_boundary(), and p_chart_symmetry_pins().
Definition at line 577 of file uv_parametrizer.cc.
References blender::e, p_boundary_edge_prev(), and p_wheel_edge_next().
Referenced by p_boundary_edge_prev(), p_chart_fill_boundary(), and p_chart_symmetry_pins().
|
static |
Definition at line 2802 of file uv_parametrizer.cc.
References blender::geometry::PChart::abf_alpha, ABF_MAX_ITER, blender::geometry::PAbfSystem::alpha, blender::geometry::PAbfSystem::beta, blender::MutableSpan< T >::copy_from(), blender::e, blender::geometry::PFace::edge, blender::geometry::PChart::faces, float, blender::geometry::PEdge::PEdgeUnion::id, blender::geometry::PFace::PFaceUnion::id, M_PI, blender::MEM_new_array_uninitialized(), blender::geometry::PAbfSystem::nangles, blender::geometry::PEdge::next, blender::geometry::PFace::nextlink, blender::geometry::PAbfSystem::nfaces, blender::geometry::PChart::nfaces, blender::geometry::PAbfSystem::ninterior, norm(), p_abf_compute_gradient(), p_abf_compute_sines(), p_abf_matrix_invert(), p_abf_setup_system(), p_chart_abf_solve(), p_face_angles(), p_vert_interior(), param_warning, PVERT_INTERIOR, scale(), blender::Array< T, InlineBufferCapacity, Allocator >::size(), blender::geometry::PEdge::u, blender::geometry::PFace::u, blender::v, blender::geometry::PChart::verts, and blender::geometry::PAbfSystem::weight.
Referenced by p_chart_abf_solve(), and p_chart_lscm_begin().
Definition at line 1226 of file uv_parametrizer.cc.
References blender::e, blender::geometry::PVert::edge, blender::geometry::PChart::edges, blender::geometry::PEdge::flag, len(), blender::geometry::PChart::nboundaries, blender::geometry::PEdge::next, p_chart_boundaries(), p_edge_length(), PEDGE_DONE, and blender::geometry::PEdge::vert.
Referenced by p_chart_boundaries(), p_chart_convex_hull(), p_chart_lscm_begin(), and uv_parametrizer_construct_end().
|
static |
Definition at line 4507 of file uv_parametrizer.cc.
References blender::e, p_chart_collapse_doubles(), p_chart_simplify_compute(), p_collapse_doubles_allowed(), p_collapse_doubles_cost(), and UNUSED_FUNCTION.
Referenced by p_chart_collapse_doubles().
|
static |
Definition at line 3549 of file uv_parametrizer.cc.
References blender::e, L, blender::MEM_new_array_uninitialized(), p_area_signed(), p_boundary_edge_next(), p_chart_boundaries(), p_chart_convex_hull(), p_compare_geometric_uv(), and blender::U.
Referenced by p_chart_convex_hull(), and p_chart_minimum_area_angle().
|
static |
Definition at line 4697 of file uv_parametrizer.cc.
References blender::add_v3_v3(), angle(), blender::ARRAY_SIZE(), blender::BMVert::co, blender::copy_v3_v3(), CORR_ZERO_AREA_EPS, cos, blender::e, blender::geometry::PFace::edge, blender::geometry::PFace::flag, float, M, M_PI, blender::mul_m3_v3(), blender::mul_v3_fl(), p_chart_correct_degenerate_triangle_point(), p_edge_matrix(), p_validate_corrected_coords_point(), PFACE_DONE, and sin.
Referenced by p_chart_correct_degenerate_triangle_point(), and p_chart_correct_degenerate_triangles2().
|
static |
Definition at line 4932 of file uv_parametrizer.cc.
References blender::BLI_assert(), CORR_ZERO_AREA_EPS, blender::geometry::PVert::edge, blender::geometry::PEdge::next, blender::geometry::PFace::nextlink, p_chart_correct_degenerate_triangles(), p_chart_correct_degenerate_triangles2(), p_face_area(), p_validate_triangle_angles(), PFACE_DONE, blender::ret, UNUSED_FUNCTION_NO_SLIM, and blender::geometry::PEdge::vert.
Referenced by p_chart_correct_degenerate_triangles().
|
static |
Definition at line 4782 of file uv_parametrizer.cc.
References blender::add_v3_v3(), angle(), blender::BLI_assert(), blender::geometry::PVert::co, blender::copy_v3_v3(), CORR_ZERO_AREA_EPS, cos, blender::e, eps, blender::geometry::PChart::faces, blender::geometry::PVert::flag, float, len(), M, M_PI, blender::mul_m3_v3(), blender::mul_v3_fl(), blender::geometry::PEdge::next, blender::geometry::PFace::nextlink, p_chart_correct_degenerate_triangle_point(), p_chart_correct_degenerate_triangles2(), p_edge_length(), p_edge_matrix(), p_face_area(), p_validate_corrected_coords(), p_vec_cos(), PFACE_DONE, sin, and blender::geometry::PEdge::vert.
Referenced by p_chart_correct_degenerate_triangles(), and p_chart_correct_degenerate_triangles2().
|
static |
Definition at line 3071 of file uv_parametrizer.cc.
References blender::BMVert::co, p_chart_extrema_verts(), p_chart_pin_positions(), blender::v, and blender::geometry::PChart::verts.
Referenced by p_chart_extrema_verts(), and p_chart_lscm_begin().
|
static |
Definition at line 1381 of file uv_parametrizer.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::geometry::PVert::co, blender::Array< T, InlineBufferCapacity, Allocator >::data(), blender::e, blender::geometry::PVert::edge, blender::geometry::PChart::edges, blender::geometry::PEdge::flag, blender::geometry::PVert::PVertUnion::id, blender::geometry::PVert::PVertUnion::key, blender::geometry::PEdge::next, p_chart_fill_boundaries(), p_chart_fill_boundary(), blender::geometry::PEdge::pair, PEDGE_FILLED, blender::geometry::PVert::u, and blender::geometry::PEdge::vert.
Referenced by p_chart_fill_boundaries(), and uv_parametrizer_construct_end().
|
static |
Definition at line 1306 of file uv_parametrizer.cc.
References blender::BLI_memarena_clear(), blender::geometry::PFace::edge, blender::geometry::PVert::edge, blender::geometry::PEdge::flag, blender::geometry::PFace::flag, blender::geometry::PVert::PVertUnion::id, blender::geometry::PEdge::next, p_boundary_edge_next(), p_boundary_edge_prev(), p_chart_fill_boundary(), p_face_add_fill(), p_polygon_calc_tris(), blender::geometry::PEdge::pair, PEDGE_FILLED, PFACE_FILLED, blender::geometry::ParamHandle::polyfill_arena, SHIFT3, blender::MutableSpan< T >::size(), blender::geometry::PVert::u, and blender::geometry::PEdge::vert.
Referenced by p_chart_fill_boundaries(), and p_chart_fill_boundary().
|
static |
Definition at line 4516 of file uv_parametrizer.cc.
References blender::geometry::PChart::collapsed_edges, blender::e, blender::geometry::PEdge::flag, blender::geometry::PVert::flag, p_chart_flush_collapsed_uvs(), p_collapsing_verts(), PEDGE_COLLAPSE_EDGE, PEDGE_COLLAPSE_PAIR, PVERT_PIN, and blender::geometry::PVert::uv.
Referenced by p_chart_flush_collapsed_uvs(), and p_flush_uvs().
|
static |
Definition at line 3125 of file uv_parametrizer.cc.
References blender::geometry::PChart::area_uv, blender::BLI_assert(), blender::geometry::PChart::context, EIG_linear_least_squares_solver_new(), blender::geometry::PChart::nfaces, blender::geometry::PChart::nverts, p_chart_abf_solve(), p_chart_boundaries(), p_chart_extrema_verts(), p_chart_lscm_begin(), p_chart_orig_bounds_init(), p_chart_simplify_compute(), p_chart_symmetry_pins(), p_chart_uv_area(), param_warning, blender::geometry::PChart::pin1, blender::geometry::PChart::pin2, PVERT_PIN, PVERT_SELECT, blender::geometry::PChart::single_pin, blender::geometry::PChart::skip_flush, blender::v, and blender::geometry::PChart::verts.
Referenced by p_chart_lscm_begin(), and uv_parametrizer_lscm_begin().
|
static |
Definition at line 3360 of file uv_parametrizer.cc.
References blender::geometry::PChart::abf_alpha, blender::geometry::PChart::context, EIG_linear_solver_delete(), p_chart_lscm_end(), blender::geometry::PChart::pin1, blender::geometry::PChart::pin2, and blender::geometry::PChart::single_pin.
Referenced by p_chart_lscm_end(), uv_parametrizer_lscm_end(), and uv_parametrizer_lscm_solve().
|
static |
Definition at line 3199 of file uv_parametrizer.cc.
References blender::geometry::PChart::abf_alpha, blender::geometry::PChart::context, blender::copy_v2_v2(), cos, EIG_linear_solver_matrix_add(), EIG_linear_solver_solve(), EIG_linear_solver_variable_get(), EIG_linear_solver_variable_lock(), EIG_linear_solver_variable_set(), blender::geometry::PChart::faces, blender::geometry::PVert::flag, blender::geometry::PVert::PVertUnion::id, blender::geometry::PEdge::next, blender::geometry::PFace::nextlink, blender::geometry::PChart::origin, p_chart_lscm_solve(), p_face_angles(), p_face_uv_area_signed(), p_vert_load_pin_select_uvs(), blender::geometry::PChart::pin1, blender::geometry::PChart::pin2, PVERT_PIN, SHIFT3, sin, blender::geometry::PChart::single_pin, blender::geometry::PVert::u, blender::geometry::PVert::uv, blender::v, blender::v2, blender::geometry::PEdge::vert, and blender::geometry::PChart::verts.
Referenced by p_chart_lscm_solve(), and uv_parametrizer_lscm_solve().
|
static |
Definition at line 3341 of file uv_parametrizer.cc.
References blender::geometry::PChart::area_uv, blender::geometry::PChart::origin, p_chart_lscm_transform_single_pin(), p_chart_uv_area(), p_chart_uv_scale(), p_chart_uv_translate(), scale(), blender::geometry::PChart::single_pin, sqrtf, blender::sub_v2_v2v2(), and blender::geometry::PVert::uv.
Referenced by p_chart_lscm_transform_single_pin(), and uv_parametrizer_lscm_solve().
Definition at line 3643 of file uv_parametrizer.cc.
References blender::angle_v2v2v2(), float, len(), blender::len_v2v2(), M_PI, M_PI_2, M_PI_4, blender::MEM_new_array_uninitialized(), p_chart_convex_hull(), p_chart_minimum_area_angle(), p_rectangle_area(), blender::geometry::PVert::uv, and blender::v.
Referenced by p_chart_minimum_area_angle(), p_chart_orig_bounds_init(), p_chart_rotate_minimum_area(), and uv_parametrizer_original_bounds().
|
static |
Store the chart's current orientation and bounds so the unwrapped result can be fit back into them, see uv_parametrizer_original_bounds.
Definition at line 3118 of file uv_parametrizer.cc.
References blender::geometry::PChartOrigBounds::angle, blender::geometry::PChartOrigBounds::bounds, blender::geometry::PChart::orig_bounds, p_chart_minimum_area_angle(), p_chart_orig_bounds_init(), and p_chart_uv_bbox().
Referenced by p_chart_lscm_begin(), and p_chart_orig_bounds_init().
|
static |
Definition at line 2913 of file uv_parametrizer.cc.
References blender::geometry::PFace::edge, fabsf, blender::geometry::PChart::faces, blender::geometry::PEdge::next, p_chart_pin_positions(), blender::sub_v3_v3v3(), blender::geometry::PVert::uv, and blender::geometry::PEdge::vert.
Referenced by p_chart_extrema_verts(), p_chart_pin_positions(), and p_chart_symmetry_pins().
Definition at line 2164 of file uv_parametrizer.cc.
References blender::geometry::PChart::collapsed_edges, blender::geometry::PChart::collapsed_faces, blender::geometry::PChart::collapsed_verts, blender::e, blender::geometry::PChart::edges, blender::geometry::PChart::faces, blender::geometry::PFace::flag, blender::geometry::PChart::nedges, blender::geometry::PFace::nextlink, blender::geometry::PChart::nfaces, blender::geometry::PChart::nverts, p_chart_post_collapse_flush(), PEDGE_COLLAPSE, PEDGE_COLLAPSE_EDGE, PFACE_COLLAPSE, PVERT_COLLAPSE, blender::v, and blender::geometry::PChart::verts.
Referenced by p_chart_post_collapse_flush(), and p_chart_simplify_compute().
|
static |
Definition at line 3781 of file uv_parametrizer.cc.
References blender::BLI_convexhull_aabb_fit_points_2d_as_sincos(), blender::geometry::PChart::nverts, p_chart_rotate_fit_aabb(), p_chart_uv_to_array(), p_chart_uv_transform(), and sincos().
Referenced by p_chart_rotate_fit_aabb(), and uv_parametrizer_lscm_solve().
|
static |
Definition at line 3767 of file uv_parametrizer.cc.
References angle(), cosf, p_chart_minimum_area_angle(), p_chart_rotate_minimum_area(), sinf, blender::v, and blender::geometry::PChart::verts.
Referenced by p_chart_rotate_minimum_area(), and uv_parametrizer_lscm_solve().
|
static |
Definition at line 2234 of file uv_parametrizer.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BLI_heap_free(), blender::BLI_heap_insert(), blender::BLI_heap_is_empty(), blender::BLI_heap_new(), blender::BLI_heap_pop_min(), blender::BLI_heap_remove(), blender::BLI_heap_top(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::e, blender::geometry::PVert::edge, blender::geometry::PChart::edges, blender::geometry::PEdge::flag, blender::geometry::PVert::PVertUnion::heaplink, INT_MAX, blender::geometry::PEdge::next, blender::geometry::PEdge::PEdgeUnion::nextcollapse, p_chart_post_collapse_flush(), p_chart_simplify_compute(), p_collapse_cost_vertex(), p_collapse_edge(), p_collapsing_verts(), p_wheel_edge_next(), blender::geometry::PEdge::pair, PEDGE_COLLAPSE_EDGE, PEDGE_COLLAPSE_PAIR, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::geometry::PEdge::u, blender::geometry::PVert::u, blender::v, blender::geometry::PEdge::vert, and blender::geometry::PChart::verts.
Referenced by p_chart_collapse_doubles(), p_chart_lscm_begin(), and p_chart_simplify_compute().
Definition at line 3460 of file uv_parametrizer.cc.
References blender::add_v2_v2v2(), blender::BLI_rng_get_float(), blender::copy_v2_v2(), cosf, blender::e, float, M_PI, p_chart_stretch_minimize(), p_edge_uv_length(), p_stretch_compute_vertex(), P_STRETCH_ITER, p_wheel_edge_next(), PVERT_PIN, PVERT_SELECT, sinf, blender::v, and blender::geometry::PChart::verts.
Referenced by p_chart_stretch_minimize(), and uv_parametrizer_stretch_iter().
|
static |
Definition at line 2964 of file uv_parametrizer.cc.
References blender::equals_v3v3(), blender::geometry::PVert::flag, len(), p_boundary_edge_next(), p_boundary_edge_prev(), p_chart_pin_positions(), p_chart_symmetry_pins(), p_edge_length(), PVERT_SPLIT, and blender::geometry::PEdge::vert.
Referenced by p_chart_lscm_begin(), and p_chart_symmetry_pins().
Definition at line 454 of file uv_parametrizer.cc.
References fabsf, blender::geometry::PChart::faces, blender::geometry::PFace::nextlink, p_chart_uv_area(), and p_face_uv_area_signed().
Referenced by p_chart_lscm_begin(), p_chart_lscm_transform_single_pin(), and p_chart_uv_area().
Definition at line 443 of file uv_parametrizer.cc.
References INIT_MINMAX2, blender::minmax_v2v2_v2(), p_chart_uv_bbox(), blender::v, and blender::geometry::PChart::verts.
Referenced by p_chart_orig_bounds_init(), p_chart_uv_bbox(), uv_parametrizer_average(), and uv_parametrizer_original_bounds().
Definition at line 492 of file uv_parametrizer.cc.
References angle(), cosf, blender::geometry::PChart::origin, p_chart_uv_rotate(), sinf, blender::v, blender::geometry::PChart::verts, blender::x, and y.
Referenced by p_chart_uv_rotate(), and uv_parametrizer_original_bounds().
Definition at line 465 of file uv_parametrizer.cc.
References p_chart_uv_scale(), scale(), blender::v, and blender::geometry::PChart::verts.
Referenced by p_chart_lscm_transform_single_pin(), p_chart_uv_scale(), uv_parametrizer_average(), and uv_parametrizer_original_bounds().
|
static |
Definition at line 524 of file uv_parametrizer.cc.
References blender::copy_v2_v2(), p_chart_uv_to_array(), blender::v, and blender::geometry::PChart::verts.
Referenced by p_chart_rotate_fit_aabb(), and p_chart_uv_to_array().
Definition at line 517 of file uv_parametrizer.cc.
References blender::mul_m2_v2(), p_chart_uv_transform(), blender::v, and blender::geometry::PChart::verts.
Referenced by p_chart_rotate_fit_aabb(), p_chart_uv_transform(), and uv_parametrizer_average().
Definition at line 509 of file uv_parametrizer.cc.
References p_chart_uv_translate(), blender::v, and blender::geometry::PChart::verts.
Referenced by p_chart_lscm_transform_single_pin(), p_chart_uv_translate(), uv_parametrizer_average(), uv_parametrizer_original_bounds(), and uv_parametrizer_pack().
Definition at line 1901 of file uv_parametrizer.cc.
References blender::geometry::PEdge::next, p_collapse_allowed_topologic(), p_collapsing_verts(), p_vert_interior(), and blender::geometry::PEdge::pair.
Referenced by p_collapse_allowed_topologic(), and p_collapse_doubles_allowed().
|
static |
Definition at line 2120 of file uv_parametrizer.cc.
References blender::e, p_collapse_cost_vertex(), and p_wheel_edge_next().
Referenced by p_chart_simplify_compute(), and p_collapse_cost_vertex().
|
static |
Definition at line 4481 of file uv_parametrizer.cc.
References blender::geometry::PVert::flag, p_collapse_allowed_topologic(), p_collapse_doubles_allowed(), p_collapsing_verts(), p_edge_length_squared(), and PVERT_PIN.
Referenced by p_chart_collapse_doubles(), and p_collapse_doubles_allowed().
Definition at line 4501 of file uv_parametrizer.cc.
References p_collapse_doubles_cost(), and p_edge_length_squared().
Referenced by p_chart_collapse_doubles(), and p_collapse_doubles_cost().
Definition at line 1755 of file uv_parametrizer.cc.
References blender::e, blender::geometry::PVert::edge, blender::geometry::PEdge::face, blender::geometry::PEdge::flag, blender::geometry::PFace::flag, blender::geometry::PVert::flag, blender::geometry::PEdge::next, p_collapse_edge(), p_collapsing_verts(), p_vert_fix_edge_pointer(), p_wheel_edge_next(), p_wheel_edge_prev(), blender::geometry::PEdge::pair, PEDGE_COLLAPSE, PFACE_COLLAPSE, PVERT_COLLAPSE, and blender::geometry::PEdge::vert.
Referenced by p_chart_simplify_compute(), and p_collapse_edge().
|
static |
Definition at line 1742 of file uv_parametrizer.cc.
References blender::geometry::PEdge::next, p_collapsing_verts(), and blender::geometry::PEdge::vert.
Referenced by p_chart_flush_collapsed_uvs(), p_chart_simplify_compute(), p_collapse_allowed_topologic(), p_collapse_doubles_allowed(), p_collapse_edge(), and p_collapsing_verts().
|
static |
Definition at line 3529 of file uv_parametrizer.cc.
References b, p_compare_geometric_uv(), blender::geometry::PVert::uv, and blender::v2.
Referenced by p_chart_convex_hull(), and p_compare_geometric_uv().
|
static |
Definition at line 958 of file uv_parametrizer.cc.
References blender::geometry::PFace::PFaceUnion::chart, blender::geometry::ParamHandle::construction_chart, blender::e, blender::geometry::PFace::edge, blender::geometry::PVert::edge, blender::geometry::PChart::faces, blender::geometry::PFace::flag, blender::geometry::ParamHandle::hash_faces, blender::MEM_new_array_uninitialized(), blender::geometry::PEdge::next, blender::geometry::PFace::nextlink, p_connect_pairs(), p_edge_connect_pair(), PFACE_CONNECTED, phash_size(), blender::geometry::PFace::u, and blender::geometry::PEdge::vert.
Referenced by p_connect_pairs(), and uv_parametrizer_construct_end().
|
static |
Definition at line 934 of file uv_parametrizer.cc.
References blender::e, blender::geometry::PEdge::face, blender::geometry::PFace::flag, p_edge_connect_pair(), p_edge_has_pair(), p_face_flip(), blender::geometry::PEdge::pair, PFACE_CONNECTED, and blender::geometry::PEdge::vert.
Referenced by p_connect_pairs(), and p_edge_connect_pair().
|
static |
Definition at line 882 of file uv_parametrizer.cc.
References blender::e, blender::geometry::PEdge::flag, blender::geometry::ParamHandle::hash_edges, blender::geometry::PVert::PVertUnion::key, blender::geometry::PEdge::next, p_edge_has_pair(), p_edge_implicit_seam(), PEDGE_SEAM, PHASH_edge, phash_lookup(), phash_next(), blender::geometry::PVert::u, blender::v2, and blender::geometry::PEdge::vert.
Referenced by p_edge_connect_pair(), and p_edge_has_pair().
Definition at line 848 of file uv_parametrizer.cc.
References blender::e, fabsf, blender::geometry::PEdge::flag, blender::geometry::PVert::PVertUnion::key, blender::geometry::PEdge::next, blender::geometry::PEdge::orig_uv, p_edge_implicit_seam(), PEDGE_SEAM, blender::geometry::PVert::u, and blender::geometry::PEdge::vert.
Referenced by p_edge_has_pair(), and p_edge_implicit_seam().
Definition at line 428 of file uv_parametrizer.cc.
References blender::BMVert::co, blender::e, blender::len_v3v3(), and p_edge_length().
Referenced by p_chart_boundaries(), p_chart_correct_degenerate_triangles2(), p_chart_symmetry_pins(), and p_edge_length().
Definition at line 433 of file uv_parametrizer.cc.
References blender::BMVert::co, blender::e, blender::len_squared_v3v3(), and p_edge_length_squared().
Referenced by p_collapse_doubles_allowed(), p_collapse_doubles_cost(), and p_edge_length_squared().
|
static |
Definition at line 803 of file uv_parametrizer.cc.
References blender::e, blender::geometry::ParamHandle::hash_edges, p_edge_lookup(), PHASH_edge, phash_lookup(), and phash_next().
Referenced by p_edge_lookup(), and uv_parametrizer_edge_set_seam().
Definition at line 4638 of file uv_parametrizer.cc.
References blender::copy_v3_v3(), blender::cross_v3_v3v3(), eps, blender::len_v3(), blender::mul_v3_fl(), p_edge_matrix(), and R.
Referenced by p_chart_correct_degenerate_triangle_point(), p_chart_correct_degenerate_triangles2(), p_edge_matrix(), and p_edge_matrix().
Definition at line 4686 of file uv_parametrizer.cc.
References blender::BMVert::co, blender::copy_v3_v3(), blender::e, p_edge_matrix(), R, and blender::sub_v3_v3().
Definition at line 438 of file uv_parametrizer.cc.
References blender::e, blender::len_v2v2(), and p_edge_uv_length().
Referenced by p_chart_stretch_minimize(), p_edge_uv_length(), and p_face_stretch().
|
static |
Definition at line 1102 of file uv_parametrizer.cc.
References blender::geometry::ParamHandle::arena, blender::BLI_memarena_alloc(), blender::BLI_memarena_calloc(), blender::geometry::PFace::edge, blender::geometry::PEdge::face, blender::geometry::PFace::flag, blender::geometry::PEdge::next, and p_face_add().
Referenced by p_face_add(), p_face_add_construct(), and p_face_add_fill().
|
static |
Definition at line 1125 of file uv_parametrizer.cc.
References blender::geometry::PFace::edge, blender::geometry::PEdge::flag, blender::geometry::ParamHandle::hash_edges, blender::geometry::ParamHandle::hash_faces, blender::geometry::PEdge::PEdgeUnion::key, blender::geometry::PFace::PFaceUnion::key, blender::geometry::PEdge::next, blender::geometry::PEdge::orig_uv, p_face_add(), p_face_add_construct(), p_vert_lookup(), PEDGE_PIN, PEDGE_SELECT, PHASH_edge, phash_insert(), blender::geometry::PEdge::u, blender::geometry::PFace::u, and blender::geometry::PEdge::vert.
Referenced by p_face_add_construct(), and uv_parametrizer_face_add().
|
static |
Definition at line 1198 of file uv_parametrizer.cc.
References blender::geometry::PFace::edge, blender::geometry::PChart::edges, blender::geometry::PChart::faces, blender::geometry::PChart::nedges, blender::geometry::PEdge::next, blender::geometry::PEdge::nextlink, blender::geometry::PFace::nextlink, blender::geometry::PChart::nfaces, blender::geometry::PEdge::orig_uv, p_face_add(), p_face_add_fill(), blender::v2, and blender::geometry::PEdge::vert.
Referenced by p_chart_fill_boundary(), and p_face_add_fill().
|
static |
Definition at line 373 of file uv_parametrizer.cc.
References blender::BMVert::co, blender::geometry::PVert::co, blender::geometry::PFace::edge, blender::geometry::PEdge::next, p_face_angles(), p_triangle_angles(), blender::v2, and blender::geometry::PEdge::vert.
Referenced by p_chart_abf_solve(), p_chart_lscm_solve(), and p_face_angles().
Definition at line 406 of file uv_parametrizer.cc.
References blender::area_tri_v3(), blender::BMVert::co, blender::geometry::PVert::co, blender::geometry::PFace::edge, blender::geometry::PEdge::next, p_face_area(), blender::v2, and blender::geometry::PEdge::vert.
Referenced by p_chart_correct_degenerate_triangles(), p_chart_correct_degenerate_triangles2(), p_face_area(), uv_parametrizer_average(), and uv_parametrizer_stretch_begin().
|
static |
Definition at line 707 of file uv_parametrizer.cc.
References blender::geometry::PFace::edge, blender::geometry::PEdge::next, blender::geometry::PEdge::old_uv, blender::geometry::PEdge::orig_uv, and p_face_backup_uvs().
Referenced by p_face_backup_uvs(), uv_parametrizer_lscm_begin(), uv_parametrizer_slim_live_begin(), and uv_parametrizer_stretch_begin().
|
static |
Definition at line 398 of file uv_parametrizer.cc.
References blender::BMVert::co, blender::geometry::PVert::co, blender::geometry::PEdge::next, p_face_cos(), p_triangle_cos(), UNUSED_FUNCTION, blender::v2, and blender::geometry::PEdge::vert.
Referenced by p_face_cos().
|
static |
Definition at line 823 of file uv_parametrizer.cc.
References blender::e, blender::geometry::ParamHandle::hash_edges, p_face_exists(), PHASH_edge, phash_lookup(), and phash_next().
Referenced by p_face_exists(), and uv_parametrizer_face_add().
|
static |
Definition at line 594 of file uv_parametrizer.cc.
References blender::geometry::PFace::edge, blender::geometry::PEdge::flag, blender::geometry::PVert::flag, blender::geometry::PEdge::next, blender::geometry::PEdge::orig_uv, p_face_flip(), PEDGE_VERTEX_FLAGS, blender::v2, and blender::geometry::PEdge::vert.
Referenced by p_edge_connect_pair(), and p_face_flip().
|
static |
Definition at line 725 of file uv_parametrizer.cc.
References blender::geometry::PFace::edge, blender::geometry::PEdge::next, blender::geometry::PEdge::old_uv, blender::geometry::PEdge::orig_uv, and p_face_restore_uvs().
Referenced by p_face_restore_uvs(), and uv_parametrizer_flush_restore().
Definition at line 3390 of file uv_parametrizer.cc.
References blender::add_v3_v3(), blender::BMVert::co, blender::geometry::PVert::co, blender::copy_v3_v3(), blender::dot_v3v3(), blender::geometry::PFace::edge, blender::geometry::PFace::flag, blender::mul_v3_fl(), blender::geometry::PEdge::next, p_edge_uv_length(), p_face_stretch(), p_face_uv_area_signed(), PFACE_FILLED, sqrtf, T, blender::geometry::PVert::uv, blender::v2, blender::geometry::PEdge::vert, and w().
Referenced by p_face_stretch(), and p_stretch_compute_vertex().
Definition at line 419 of file uv_parametrizer.cc.
References blender::geometry::PFace::edge, blender::geometry::PEdge::next, p_face_uv_area_signed(), blender::geometry::PVert::uv, blender::v2, and blender::geometry::PEdge::vert.
Referenced by p_chart_lscm_solve(), p_chart_uv_area(), p_face_stretch(), p_face_uv_area_signed(), and uv_parametrizer_average().
|
static |
Definition at line 683 of file uv_parametrizer.cc.
References blender::geometry::ParamHandle::aspect_y, blender::geometry::ParamHandle::blend, blender::geometry::PChart::collapsed_edges, blender::e, blender::geometry::PChart::edges, p_chart_flush_collapsed_uvs(), and p_flush_uvs().
Referenced by p_flush_uvs(), and uv_parametrizer_flush().
|
static |
Definition at line 534 of file uv_parametrizer.cc.
References p_intersect_line_2d_dir(), and blender::v2.
Referenced by p_intersect_line_2d_dir(), and p_rectangle_area().
|
static |
Allocate memory for polyfill. NOTE: Call BLI_memarena_clear(handle->polyfill_arena) after use.
Definition at line 1263 of file uv_parametrizer.cc.
References blender::add_newell_cross_v3_v3v3(), blender::axis_dominant_v3_to_m3_negate(), blender::BLI_memarena_alloc(), blender::BLI_polyfill_beautify(), blender::BLI_polyfill_calc_arena(), float, blender::mul_v2_m3v3(), blender::normalize_v3(), p_polygon_calc_tris(), blender::geometry::ParamHandle::polyfill_arena, blender::geometry::ParamHandle::polyfill_heap, and blender::zero_v3().
Referenced by p_add_ngon(), p_chart_fill_boundary(), and p_polygon_calc_tris().
|
static |
Definition at line 3618 of file uv_parametrizer.cc.
References blender::len_v2v2(), p_intersect_line_2d_dir(), and p_rectangle_area().
Referenced by p_chart_minimum_area_angle(), and p_rectangle_area().
|
static |
Definition at line 1065 of file uv_parametrizer.cc.
References blender::geometry::PFace::PFaceUnion::chart, blender::geometry::PFace::edge, blender::geometry::PChart::edges, blender::geometry::PChart::faces, blender::MEM_new_array_zeroed(), blender::MEM_new_zeroed(), blender::geometry::PChart::nedges, blender::geometry::PEdge::next, blender::geometry::PEdge::nextlink, blender::geometry::PFace::nextlink, blender::geometry::PChart::nfaces, p_split_charts(), p_split_vert(), and blender::geometry::PFace::u.
Referenced by p_split_charts(), and uv_parametrizer_construct_end().
|
static |
Definition at line 1008 of file uv_parametrizer.cc.
References blender::e, blender::geometry::PEdge::flag, blender::geometry::PChart::has_pins, blender::geometry::PChart::nverts, p_split_vert(), p_vert_copy(), p_wheel_edge_next(), p_wheel_edge_prev(), PEDGE_PIN, PEDGE_VERTEX_SPLIT, PVERT_SPLIT, blender::v, blender::geometry::PEdge::vert, and blender::geometry::PChart::verts.
Referenced by p_split_charts(), and p_split_vert().
Definition at line 3447 of file uv_parametrizer.cc.
References blender::e, p_face_stretch(), p_stretch_compute_vertex(), p_wheel_edge_next(), and blender::v.
Referenced by p_chart_stretch_minimize(), and p_stretch_compute_vertex().
|
static |
Definition at line 3376 of file uv_parametrizer.cc.
References p_stretch_pin_boundary(), PVERT_PIN, blender::v, and blender::geometry::PChart::verts.
Referenced by p_stretch_pin_boundary(), and uv_parametrizer_stretch_begin().
|
static |
Definition at line 351 of file uv_parametrizer.cc.
References blender::angle_v3v3v3(), fix_large_angle(), blender::max_dd(), p_triangle_angles(), and blender::v2.
Referenced by p_face_angles(), and p_triangle_angles().
|
static |
Definition at line 386 of file uv_parametrizer.cc.
References p_triangle_cos(), p_vec_cos(), and blender::v2.
Referenced by p_face_cos(), p_triangle_cos(), p_validate_corrected_coords(), p_validate_corrected_coords_point(), and p_validate_triangle_angles().
|
static |
Definition at line 4599 of file uv_parametrizer.cc.
References blender::area_tri_v3(), blender::geometry::PVert::co, blender::e, blender::geometry::PVert::edge, p_triangle_cos(), p_validate_corrected_coords(), p_wheel_edge_next(), PFACE_DONE, and blender::geometry::PEdge::vert.
Referenced by p_chart_correct_degenerate_triangles2(), and p_validate_corrected_coords().
|
static |
Definition at line 4539 of file uv_parametrizer.cc.
References blender::area_tri_v3(), blender::geometry::PVert::co, blender::e, blender::geometry::PVert::edge, p_triangle_cos(), p_validate_corrected_coords_point(), p_wheel_edge_next(), blender::geometry::PEdge::pair, PFACE_DONE, and blender::geometry::PEdge::vert.
Referenced by p_chart_correct_degenerate_triangle_point(), and p_validate_corrected_coords_point().
|
static |
Definition at line 4913 of file uv_parametrizer.cc.
References blender::geometry::PVert::co, p_triangle_cos(), and p_validate_triangle_angles().
Referenced by p_chart_correct_degenerate_triangles(), and p_validate_triangle_angles().
|
static |
Definition at line 381 of file uv_parametrizer.cc.
References blender::cos_v3v3v3(), p_vec_cos(), and blender::v2.
Referenced by p_chart_correct_degenerate_triangles2(), p_triangle_cos(), and p_vec_cos().
|
static |
Definition at line 745 of file uv_parametrizer.cc.
References blender::geometry::ParamHandle::arena, blender::BLI_memarena_alloc(), blender::BMVert::co, blender::copy_v3_v3(), blender::e, blender::geometry::ParamHandle::hash_verts, p_vert_add(), phash_insert(), and blender::v.
Referenced by p_vert_add(), and p_vert_lookup().
|
static |
Definition at line 785 of file uv_parametrizer.cc.
References blender::geometry::ParamHandle::arena, blender::BLI_memarena_alloc(), blender::BMVert::co, blender::geometry::PVert::co, blender::copy_v3_v3(), blender::geometry::PVert::edge, blender::geometry::PVert::flag, blender::geometry::PVert::PVertUnion::key, blender::geometry::PVert::on_boundary_flag, p_vert_copy(), blender::geometry::PVert::slim_id, blender::geometry::PVert::u, blender::geometry::PVert::uv, blender::v, and blender::geometry::PVert::weight.
Referenced by p_split_vert(), and p_vert_copy().
|
static |
Definition at line 1728 of file uv_parametrizer.cc.
References p_vert_fix_edge_pointer(), p_wheel_edge_prev(), and blender::v.
Referenced by p_collapse_edge(), and p_vert_fix_edge_pointer().
|
static |
Definition at line 589 of file uv_parametrizer.cc.
References p_vert_interior(), and blender::v.
Referenced by p_chart_abf_solve(), p_collapse_allowed_topologic(), and p_vert_interior().
|
static |
Definition at line 639 of file uv_parametrizer.cc.
References blender::geometry::ParamHandle::aspect_y, blender::e, p_vert_load_pin_select_uvs(), p_wheel_edge_next(), PEDGE_PIN, PEDGE_SELECT, PVERT_PIN, PVERT_SELECT, and blender::v.
Referenced by p_chart_lscm_solve(), p_vert_load_pin_select_uvs(), and uv_parametrizer_construct_end().
|
static |
Definition at line 774 of file uv_parametrizer.cc.
References blender::e, blender::geometry::ParamHandle::hash_verts, p_vert_add(), p_vert_lookup(), phash_lookup(), and blender::v.
Referenced by p_face_add_construct(), and p_vert_lookup().
Definition at line 562 of file uv_parametrizer.cc.
References blender::e, and p_wheel_edge_next().
Definition at line 557 of file uv_parametrizer.cc.
References blender::e, and p_wheel_edge_next().
Referenced by p_boundary_edge_prev(), p_chart_simplify_compute(), p_chart_stretch_minimize(), p_collapse_cost_vertex(), p_collapse_edge(), p_split_vert(), p_stretch_compute_vertex(), p_validate_corrected_coords(), p_validate_corrected_coords_point(), p_vert_load_pin_select_uvs(), p_wheel_edge_next(), and p_wheel_edge_next().
Definition at line 567 of file uv_parametrizer.cc.
References blender::e, and p_wheel_edge_prev().
Referenced by p_collapse_edge(), p_split_vert(), p_vert_fix_edge_pointer(), and p_wheel_edge_prev().
|
static |
Frits Göbel, 1979.
Definition at line 717 of file uv_pack.cc.
References cosf, DEG2RADF, pack_gobel(), blender::geometry::UVPhi::rotation, scale(), sqrtf, and blender::geometry::UVPhi::translation.
Referenced by pack_gobel(), and pack_islands_optimal_pack().
|
static |
Definition at line 1116 of file uv_pack.cc.
References blender::BLI_box_pack_2d(), blender::BoxPack::h, is_larger(), blender::MEM_new_array_uninitialized(), pack_island_box_pack_2d(), blender::geometry::UVPhi::rotation, blender::geometry::UVPackIsland_Params::target_aspect_y, blender::geometry::UVPhi::translation, blender::BoxPack::w, blender::BoxPack::x, and blender::BoxPack::y.
Referenced by pack_island_box_pack_2d().
|
static |
Pack irregular islands using the xatlas strategy, and optional D4 transforms.
Loosely based on the 'xatlas' code by Jonathan Young from https://github.com/jpcy/xatlas
A brute force packer (BF-Packer) with accelerators:
Performance of "xatlas" would normally be O(n^4) (or worse!), however, in our implementation, bitmap_radix is a constant, which reduces the time complexity to O(n^3). => if n can ever be large, bitmap_radix will need to vary accordingly.
Definition at line 1642 of file uv_pack.cc.
References blender::geometry::PackIsland::can_rotate_(), blender::geometry::PackIsland::can_scale_(), blender::geometry::PackIsland::can_translate_(), blender::geometry::UVPackIsland_Params::do_update, blender::ED_UVPACK_SHAPE_AABB, find_best_fit_for_island(), blender::G, blender::geometry::PackIsland::get_diagonal_support(), guess_initial_scale(), is_larger(), blender::geometry::UVPhi::is_valid(), blender::geometry::UVPackIsland_Params::isCancelled(), pack_island_xatlas(), blender::geometry::PackIsland::pivot_, blender::geometry::UVPackIsland_Params::progress, rotate_inside_square(), blender::geometry::UVPhi::rotation, scale(), blender::geometry::UVPackIsland_Params::shape_method, blender::MutableSpan< T >::size(), blender::sqrt(), sqrtf, blender::geometry::UVPackIsland_Params::stop, blender::sub_v2_v2(), blender::geometry::UVPackIsland_Params::target_aspect_y, blender::geometry::UVPhi::translation, blender::geometry::UVPackIsland_Params::udim_base_offset, blender::rctf::xmax, and blender::rctf::ymax.
Referenced by pack_island_xatlas().
| float blender::geometry::pack_islands | ( | const Span< PackIsland * > | islands, |
| const UVPackIsland_Params & | params ) |
Definition at line 2312 of file uv_pack.cc.
References blender::BLI_assert(), BLI_assert_unreachable, calc_margin_from_aabb_length_sum(), blender::ED_UVPACK_MARGIN_ADD, blender::ED_UVPACK_MARGIN_FRACTION, blender::ED_UVPACK_MARGIN_SCALED, finalize_geometry(), blender::geometry::UVPackIsland_Params::margin, blender::geometry::UVPackIsland_Params::margin_method, blender::geometry::UVPackIsland_Params::merge_overlap, pack_islands(), pack_islands_margin_fraction(), blender::geometry::OverlapMerger::pack_islands_overlap(), pack_islands_scale_margin(), blender::result, scale(), blender::geometry::UVPackIsland_Params::target_aspect_y, and blender::geometry::UVPackIsland_Params::target_extent.
| float blender::geometry::pack_islands | ( | Span< PackIsland * > | islands, |
| const UVPackIsland_Params & | params ) |
References b, mul_v2_m2_add_v2v2(), and pack_islands().
Referenced by pack_islands(), pack_islands(), blender::geometry::OverlapMerger::pack_islands_overlap(), uv_parametrizer_pack(), and blender::uvedit_pack_islands_multi().
|
static |
Pack AABB islands using the "Alpaca" strategy, with rotation.
Same as pack_islands_alpaca_turbo, with support for rotation in 90 degree increments.
Also adds the concept of a "Hole", which is unused space that can be filled. Tracking the "Hole" has a slight performance cost, while improving packing efficiency.
Definition at line 594 of file uv_pack.cc.
References blender::geometry::UVAABBIsland::aspect_y, DEG2RADF, blender::geometry::UVAABBIsland::index, blender::max_ff(), pack_islands_alpaca_rotate(), blender::geometry::UVPhi::rotation, blender::geometry::UVPhi::translation, update_hole_rotate(), blender::geometry::UVAABBIsland::uv_diagonal, blender::rctf::xmax, and blender::rctf::ymax.
Referenced by pack_islands_alpaca_rotate(), and pack_islands_fast().
|
static |
Pack AABB islands using the "Alpaca" strategy, with no rotation.
Each box is packed into an "L" shaped region, gradually filling up space. "Alpaca" is a pun, as it's pronounced the same as "L-Packer" in English.
In theory, alpaca_turbo should be the fastest non-trivial packer, hence the "turbo" suffix.
Technically, the algorithm here is only O(n), In practice, to get reasonable results, the input must be pre-sorted, which costs an additional O(nlogn) time complexity.
Definition at line 483 of file uv_pack.cc.
References blender::geometry::UVAABBIsland::index, blender::max_ff(), pack_islands_alpaca_turbo(), blender::geometry::UVPhi::rotation, blender::geometry::UVPhi::translation, blender::geometry::UVAABBIsland::uv_diagonal, blender::rctf::xmax, and blender::rctf::ymax.
Referenced by pack_islands_alpaca_turbo(), and pack_islands_fast().
|
static |
Use a fast algorithm to pack the supplied aabbs.
Definition at line 700 of file uv_pack.cc.
References pack_islands_alpaca_rotate(), pack_islands_alpaca_turbo(), pack_islands_fast(), and rotate().
Referenced by pack_islands_fast().
|
static |
Find the optimal scale to pack islands into the unit square. returns largest scale that will pack islands into the unit square.
Definition at line 2036 of file uv_pack.cc.
References blender::BLI_assert(), blender::geometry::PackIsland::can_scale_(), pack_islands_margin_fraction(), pack_islands_scale_margin(), blender::geometry::PackIsland::place_(), scale(), sqrtf, and blender::geometry::UVPackIsland_Params::target_extent.
Referenced by pack_islands(), and pack_islands_margin_fraction().
|
static |
Definition at line 783 of file uv_pack.cc.
References blender::ED_UVPACK_ROTATION_ANY, blender::ED_UVPACK_SHAPE_AABB, floorf, is_larger(), blender::max_ff(), pack_gobel(), pack_islands_optimal_pack(), pack_islands_optimal_pack_table(), blender::geometry::UVPackIsland_Params::rotate_method, blender::geometry::UVPackIsland_Params::shape_method, sqrtf, and blender::geometry::UVPackIsland_Params::target_aspect_y.
Referenced by pack_islands_optimal_pack().
|
static |
Definition at line 753 of file uv_pack.cc.
References is_larger(), pack_islands_optimal_pack_table(), blender::geometry::UVPhi::rotation, and blender::geometry::UVPhi::translation.
Referenced by pack_islands_optimal_pack(), and pack_islands_optimal_pack_table().
|
static |
Pack islands using a mix of other strategies.
| islands | The islands to be packed. |
| scale | Scale islands by scale before packing. |
| margin | Add margin units around islands before packing. |
| params | Additional parameters. Scale and margin information is ignored. |
| r_phis | Island layout information will be written here. |
Definition at line 1839 of file uv_pack.cc.
References blender::geometry::PackIsland::aspect_y, b, blender::Array< T, InlineBufferCapacity, Allocator >::begin(), can_rotate(), blender::geometry::PackIsland::can_scale_(), blender::Array< T, InlineBufferCapacity, Allocator >::end(), blender::geometry::PackIsland::half_diagonal_, blender::if(), pack_islands_scale_margin(), and scale().
Referenced by pack_islands(), pack_islands_margin_fraction(), and pack_islands_scale_margin().
|
static |
Definition at line 440 of file reorder.cc.
References blender::MutableSpan< T >::index_range(), blender::threading::parallel_for(), and parallel_transform().
Referenced by identifiers_to_indices(), parallel_transform(), and sort_indices_by_weights().
| float blender::geometry::perpendicular_distance | ( | const Span< float3 > | positions, |
| const Span< T > | attribute_data, | ||
| const int64_t | first_index, | ||
| const int64_t | last_index, | ||
| const int64_t | index ) |
Computes a "perpendicular distance" value for the generic attribute data based on the positions of the curve.
First, we compute a lambda value that represents a factor from the first point to the last point of the current range. This is the projection of the point of interest onto the vector from the first to the last point.
Then this lambda value is used to compute an interpolated value of the first and last point and finally we compute the distance from the interpolated value to the actual value. This is the "perpendicular distance".
Definition at line 31 of file simplify_curves.cc.
References blender::math::distance(), blender::math::dot(), blender::math::interpolate(), blender::math::is_zero(), perpendicular_distance(), and T.
Referenced by perpendicular_distance(), and ramer_douglas_peucker().
Definition at line 235 of file uv_parametrizer.cc.
References blender::geometry::PHash::buckets, blender::geometry::PHash::cursize, blender::geometry::PHash::cursize_id, hash, blender::geometry::PHashLink::key, blender::geometry::PHash::list, blender::MEM_new_array_zeroed(), blender::geometry::PHashLink::next, PHASH_hash, phash_insert(), PHashSizes, and blender::geometry::PHash::size.
Referenced by p_face_add_construct(), p_vert_add(), and phash_insert().
Definition at line 271 of file uv_parametrizer.cc.
References blender::geometry::PHash::buckets, hash, blender::geometry::PHashLink::key, blender::geometry::PHashLink::next, PHASH_hash, and phash_lookup().
Referenced by p_edge_has_pair(), p_edge_lookup(), p_face_exists(), p_vert_lookup(), and phash_lookup().
Definition at line 203 of file uv_parametrizer.cc.
References blender::geometry::PHash::buckets, blender::geometry::PHash::cursize, blender::geometry::PHash::cursize_id, blender::geometry::PHash::list, blender::MEM_new_array_zeroed(), blender::MEM_new_zeroed(), phash_new(), PHashSizes, and blender::geometry::PHash::size.
Referenced by blender::geometry::ParamHandle::ParamHandle(), and phash_new().
Definition at line 288 of file uv_parametrizer.cc.
References hash, blender::geometry::PHashLink::key, blender::geometry::PHashLink::next, PHASH_hash, and phash_next().
Referenced by p_edge_has_pair(), p_edge_lookup(), p_face_exists(), and phash_next().
|
static |
Definition at line 220 of file uv_parametrizer.cc.
References phash_safe_delete().
Referenced by phash_safe_delete(), uv_parametrizer_construct_end(), and blender::geometry::ParamHandle::~ParamHandle().
|
static |
Definition at line 230 of file uv_parametrizer.cc.
References phash_size(), and blender::geometry::PHash::size.
Referenced by p_connect_pairs(), and phash_size().
| PointCloud * blender::geometry::point_merge_by_distance | ( | const PointCloud & | src_points, |
| const float | merge_distance, | ||
| const IndexMask & | selection, | ||
| const bke::AttributeFilter & | attribute_filter ) |
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 82 of file point_merge.cc.
References blender::kdtree::calc_duplicates(), blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), blender::threading::parallel_for(), point_merge_by_distance(), and blender::PointCloud::totpoint.
Referenced by point_merge_by_distance(), and blender::nodes::node_geo_merge_by_distance_cc::pointcloud_merge_by_distance().
| const CPPType & blender::geometry::points_rasterize_attribute_type | ( | const PointRasterizeType | rasterize_type | ) |
Attribute type required for the given rasterization type.
Definition at line 45 of file points_to_volume.cc.
References BLI_assert_unreachable, blender::CPPType::get(), points_rasterize_attribute_type(), Scalar, and Vector.
Referenced by blender::nodes::node_geo_rasterize_points::node_declare(), blender::nodes::node_geo_rasterize_points::node_geo_exec(), and points_rasterize_attribute_type().
| const CPPType & blender::geometry::points_rasterize_grid_type | ( | const PointRasterizeType | rasterize_type | ) |
Grid type produced by the given rasterization type.
Definition at line 57 of file points_to_volume.cc.
References BLI_assert_unreachable, blender::CPPType::get(), points_rasterize_grid_type(), Scalar, and Vector.
Referenced by blender::nodes::node_geo_rasterize_points::node_declare(), and points_rasterize_grid_type().
|
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 606 of file realize_instances.cc.
References blender::ResourceScope::allocate_owned(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), attribute, blender::bke::attribute_type_to_cpp_type(), blender::bke::Instances::attributes(), blender::ResourceScope::construct(), blender::bke::DataTypeConversions::convert_to_initialized_n(), blender::bke::DataTypeConversions::convert_to_uninitialized(), blender::bke::AttributeIter::data_type, blender::CPPType::default_construct(), blender::bke::AttributeAccessor::foreach_attribute(), blender::bke::AttributeIter::get(), blender::bke::get_implicit_type_conversions(), blender::bke::Instances::instances_num(), blender::bke::DataTypeConversions::is_convertible(), blender::geometry::OrderedAttributes::kinds, blender::bke::AttributeIter::name, blender::geometry::OrderedAttributes::names, prepare_attribute_fallbacks(), blender::geometry::GatherTasksInfo::r_temporary_arrays, to_type(), and blender::GSpan::type().
Referenced by gather_realize_tasks_for_instances(), and prepare_attribute_fallbacks().
|
static |
Definition at line 2238 of file realize_instances.cc.
References attribute, blender::geometry::AllCurvesInfo::attributes, blender::geometry::RealizeCurveInfo::attributes, blender::bke::AttributeAccessor::contains(), blender::geometry::AllCurvesInfo::create_custom_normal_attribute, blender::geometry::AllCurvesInfo::create_fill_id_attribute, blender::geometry::AllCurvesInfo::create_handle_postion_attributes, blender::geometry::AllCurvesInfo::create_id_attribute, blender::geometry::AllCurvesInfo::create_radius_attribute, blender::bke::Curve, blender::geometry::RealizeCurveInfo::curves, blender::geometry::RealizeCurveInfo::custom_normal, blender::Default, blender::bke::GAttributeReader::domain, gather_all_fill_ids(), gather_curves_to_realize(), gather_generic_curve_attributes_to_propagate(), blender::geometry::RealizeCurveInfo::handle_left, blender::geometry::RealizeCurveInfo::handle_right, blender::geometry::RealizeCurveInfo::index_by_fill_id, blender::geometry::OrderedAttributes::index_range(), blender::CPPType::is(), blender::geometry::OrderedAttributes::kinds, blender::bke::AttributeAccessor::lookup(), blender::bke::AttributeAccessor::lookup_or_default(), blender::geometry::OrderedAttributes::names, options, blender::geometry::AllCurvesInfo::order, blender::bke::Point, preprocess_curves(), PRF_scope, blender::geometry::RealizeCurveInfo::radius, blender::geometry::AllCurvesInfo::realize_info, blender::geometry::OrderedAttributes::size(), blender::geometry::RealizeCurveInfo::stored_fill_ids, blender::geometry::RealizeCurveInfo::stored_ids, blender::GVArrayCommon::type(), blender::GVArray::typed(), and blender::bke::GAttributeReader::varray.
Referenced by preprocess_curves(), and realize_instances().
|
static |
Definition at line 2655 of file realize_instances.cc.
References attribute, blender::geometry::AllGreasePencilsInfo::attributes, blender::geometry::GreasePencilRealizeInfo::attributes, blender::bke::AttributeAccessor::contains(), blender::Default, gather_generic_grease_pencil_attributes_to_propagate(), gather_grease_pencils_to_realize(), blender::geometry::GreasePencilRealizeInfo::grease_pencil, blender::geometry::OrderedAttributes::index_range(), blender::geometry::OrderedAttributes::kinds, blender::bke::AttributeAccessor::lookup_or_default(), blender::geometry::GreasePencilRealizeInfo::material_index_map, blender::geometry::AllGreasePencilsInfo::materials, blender::geometry::OrderedAttributes::names, options, blender::geometry::AllGreasePencilsInfo::order, preprocess_grease_pencils(), PRF_scope, blender::geometry::AllGreasePencilsInfo::realize_info, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), and blender::geometry::OrderedAttributes::size().
Referenced by preprocess_grease_pencils(), and realize_instances().
|
static |
Definition at line 1537 of file realize_instances.cc.
References blender::bke::mesh::NormalJoinInfo::add_mesh(), attribute, blender::geometry::AllMeshesInfo::attributes, blender::geometry::MeshRealizeInfo::attributes, BLI_assert_unreachable, blender::CD_ORIGINDEX, blender::bke::AttributeAccessor::contains(), blender::bke::Corner, blender::geometry::MeshRealizeInfo::corner_edges, blender::geometry::MeshRealizeInfo::corner_verts, blender::bke::mesh::NormalJoinInfo::CornerFan, blender::bke::cpp_type_to_attribute_type(), blender::geometry::AllMeshesInfo::create_id_attribute, blender::geometry::AllMeshesInfo::create_material_index_attribute, blender::geometry::AllMeshesInfo::create_origindex_edge_attribute, blender::geometry::AllMeshesInfo::create_origindex_face_attribute, blender::geometry::AllMeshesInfo::create_origindex_vert_attribute, blender::geometry::MeshRealizeInfo::custom_normal, blender::geometry::AllMeshesInfo::custom_normal_info, blender::CustomData_has_layer(), blender::Default, blender::bke::GAttributeReader::domain, blender::geometry::MeshRealizeInfo::edges, blender::bke::Face, blender::geometry::MeshRealizeInfo::faces, blender::Array< T, InlineBufferCapacity, Allocator >::first(), blender::bke::mesh::NormalJoinInfo::Free, blender::VArray< T >::from_span(), gather_generic_mesh_attributes_to_propagate(), gather_meshes_to_realize(), blender::geometry::OrderedAttributes::index_range(), blender::CPPType::is(), blender::bke::mesh::is_corner_fan_normals(), blender::geometry::OrderedAttributes::kinds, blender::bke::AttributeAccessor::lookup(), blender::bke::AttributeAccessor::lookup_or_default(), blender::geometry::MeshRealizeInfo::material_index_map, blender::geometry::MeshRealizeInfo::material_indices, blender::geometry::AllMeshesInfo::materials, blender::geometry::MeshRealizeInfo::mesh, blender::geometry::OrderedAttributes::names, blender::geometry::AllMeshesInfo::no_loose_edges_hint, blender::geometry::AllMeshesInfo::no_loose_verts_hint, blender::geometry::AllMeshesInfo::no_overlapping_hint, blender::bke::mesh::NormalJoinInfo::None, options, blender::geometry::AllMeshesInfo::order, blender::bke::Point, blender::geometry::MeshRealizeInfo::positions, preprocess_meshes(), PRF_scope, blender::geometry::AllMeshesInfo::realize_info, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::bke::mesh::NormalJoinInfo::result_domain, blender::bke::mesh::NormalJoinInfo::result_type, blender::geometry::OrderedAttributes::size(), blender::geometry::MeshRealizeInfo::stored_vert_ids, blender::GVArrayCommon::type(), blender::GSpan::typed(), blender::GVArray::typed(), and blender::bke::GAttributeReader::varray.
Referenced by preprocess_meshes(), and realize_instances().
|
static |
Definition at line 1274 of file realize_instances.cc.
References attribute, blender::geometry::AllPointCloudsInfo::attributes, blender::geometry::PointCloudRealizeInfo::attributes, blender::bke::AttributeAccessor::contains(), blender::geometry::AllPointCloudsInfo::create_id_attribute, blender::geometry::AllPointCloudsInfo::create_radius_attribute, blender::Default, blender::bke::GAttributeReader::domain, gather_generic_pointcloud_attributes_to_propagate(), gather_pointclouds_to_realize(), blender::VArrayCommon< T >::get_internal_span(), blender::geometry::OrderedAttributes::index_range(), blender::CPPType::is(), blender::geometry::OrderedAttributes::kinds, blender::bke::AttributeAccessor::lookup(), blender::bke::AttributeAccessor::lookup_or_default(), blender::geometry::OrderedAttributes::names, options, blender::geometry::AllPointCloudsInfo::order, blender::bke::Point, blender::geometry::PointCloudRealizeInfo::pointcloud, blender::geometry::PointCloudRealizeInfo::positions, preprocess_pointclouds(), PRF_scope, blender::geometry::PointCloudRealizeInfo::radii, blender::geometry::AllPointCloudsInfo::realize_info, blender::geometry::OrderedAttributes::size(), blender::geometry::PointCloudRealizeInfo::stored_ids, blender::GVArrayCommon::type(), blender::GVArray::typed(), and blender::bke::GAttributeReader::varray.
Referenced by preprocess_pointclouds(), and realize_instances().
|
static |
Definition at line 90 of file mesh_split_edges.cc.
References attribute, blender::CD_ORIGINDEX, blender::CustomData_get_layer_for_write(), blender::CustomData_realloc(), blender::bke::AttributeIter::data_type, blender::bke::AttributeIter::domain, blender::bke::Edge, blender::bke::AttributeAccessor::foreach_attribute(), blender::array_utils::gather(), blender::bke::attribute_math::gather(), blender::bke::MutableAttributeAccessor::lookup_for_write_span(), blender::bke::AttributeIter::name, propagate_edge_attributes(), blender::bke::Single, blender::Span< T >::size(), blender::Span< T >::Span(), blender::bke::AttributeIter::storage_type, blender::bke::String, and blender::MutableSpan< T >::take_back().
Referenced by propagate_edge_attributes(), and split_edges().
|
static |
Propagate instances from the old geometry set to the new geometry set if they are not realized.
Definition at line 2903 of file realize_instances.cc.
References blender::index_mask::IndexMask::complement(), blender::bke::GeometrySet::get_component_for_write(), blender::bke::GeometrySet::get_instances(), blender::bke::Instances::instances_num(), blender::index_mask::IndexMask::is_empty(), blender::bke::Owned, propagate_instances_to_keep(), and blender::bke::InstancesComponent::replace().
Referenced by propagate_instances_to_keep(), and realize_instances().
|
static |
Definition at line 30 of file mesh_split_edges.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), attribute, blender::CD_CLOTH_ORCO, blender::CD_ORCO, blender::CD_ORIGINDEX, blender::CD_SHAPEKEY, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::CustomData_free_layers(), blender::CustomData_get_layer_for_write(), blender::CustomData_realloc(), blender::bke::AttributeIter::data_type, blender::bke::AttributeIter::domain, blender::bke::AttributeAccessor::foreach_attribute(), blender::array_utils::gather(), blender::bke::attribute_math::gather(), blender::bke::gather_deform_verts(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), blender::bke::MutableAttributeAccessor::lookup_for_write_span(), blender::bDeformGroup::name, blender::bke::AttributeIter::name, blender::bke::Point, propagate_vert_attributes(), blender::bke::Single, blender::Span< T >::size(), blender::Span< T >::Span(), blender::bke::AttributeIter::storage_type, blender::bke::String, and blender::MutableSpan< T >::take_back().
Referenced by propagate_vert_attributes(), and split_edges().
|
static |
Definition at line 477 of file mesh_triangulate.cc.
References blender::BLI_assert(), blender::index_mask::IndexMask::foreach_index_optimized(), blender::exec_mode::grain_size(), quad_indices_of_tris(), blender::index_mask::IndexMask::size(), and blender::MutableSpan< T >::size().
Referenced by mesh_triangulate(), and quad_indices_of_tris().
|
static |
An implementation of the Ramer-Douglas-Peucker algorithm.
Definition at line 54 of file simplify_curves.cc.
References blender::IndexRange::drop_back(), blender::IndexRange::drop_front(), blender::MutableSpan< T >::fill(), blender::IndexRange::first(), blender::Stack< T, InlineBufferCapacity, Allocator >::is_empty(), blender::IndexRange::last(), perpendicular_distance(), blender::Stack< T, InlineBufferCapacity, Allocator >::pop(), blender::Stack< T, InlineBufferCapacity, Allocator >::push(), ramer_douglas_peucker(), blender::IndexRange::size(), blender::IndexRange::slice(), and blender::MutableSpan< T >::slice().
Referenced by ramer_douglas_peucker().
| RealizeInstancesResult blender::geometry::realize_instances | ( | bke::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 2925 of file realize_instances.cc.
References blender::geometry::VariedDepthOptions::depths, blender::VArray< T >::from_single(), blender::bke::GeometrySet::get_instances(), blender::bke::GeometrySet::has_instances(), blender::bke::Instances::instances_num(), blender::geometry::VariedDepthOptions::MAX_DEPTH, options, realize_instances(), and blender::geometry::VariedDepthOptions::selection.
Referenced by blender::create_array_copies(), blender::create_mirror_copies(), blender::duplicate_strokes(), join_component_type(), blender::ed::curves::join_objects_exec(), blender::ed::pointcloud::join_objects_exec(), blender::nodes::node_geo_grease_pencil_to_curves_cc::node_geo_exec(), blender::nodes::node_geo_realize_instances_cc::node_geo_exec(), realize_instances(), realize_instances(), and blender::geometry::tests::TEST_F().
| RealizeInstancesResult blender::geometry::realize_instances | ( | bke::GeometrySet | geometry_set, |
| const RealizeInstancesOptions & | options, | ||
| const VariedDepthOptions & | varied_depth_option ) |
Same realize_instances but will realize only the instances chosen by varied_depth_option to there chosen depth.
Definition at line 2939 of file realize_instances.cc.
References blender::geometry::AllInstancesInfo::attribute_fallback, blender::geometry::AllCurvesInfo::attributes, blender::geometry::AllGreasePencilsInfo::attributes, blender::geometry::AllMeshesInfo::attributes, blender::geometry::AllPointCloudsInfo::attributes, blender::geometry::GatherTasks::bundles, blender::bke::InstancesComponent::copy(), blender::geometry::AllCurvesInfo::create_id_attribute, blender::geometry::AllMeshesInfo::create_id_attribute, blender::geometry::AllPointCloudsInfo::create_id_attribute, blender::geometry::GatherTasks::curve_tasks, blender::Default, blender::geometry::VariedDepthOptions::depths, blender::geometry::GatherTasks::edit_data_tasks, execute_instances_tasks(), execute_realize_curve_tasks(), execute_realize_edit_data_tasks(), execute_realize_grease_pencil_tasks(), execute_realize_mesh_tasks(), execute_realize_pointcloud_tasks(), blender::geometry::GatherTasks::first_volume, gather_generic_instance_attributes_to_propagate(), gather_realize_tasks_recursive(), blender::bke::GeometrySet::get_component_for_write(), get_final_points_num(), blender::geometry::GatherTasks::grease_pencil_tasks, blender::bke::GeometrySet::has_instances(), blender::MatBase< float, 4, 4 >::identity(), initialize_curves_builtin_attribute_defaults(), blender::geometry::GatherTasksInfo::instances, blender::geometry::GatherTasksInfo::instances_attriubutes, blender::geometry::AllInstancesInfo::instances_components_to_merge, blender::geometry::AllInstancesInfo::instances_components_transforms, blender::geometry::AllMeshesInfo::materials, blender::geometry::VariedDepthOptions::MAX_DEPTH, blender::threading::memory_bandwidth_bound_task(), blender::geometry::GatherTasks::mesh_tasks, options, blender::geometry::GatherTasks::pointcloud_tasks, preprocess_curves(), preprocess_grease_pencils(), preprocess_meshes(), preprocess_pointclouds(), PRF_scope, PRF_scope_with_name, propagate_instances_to_keep(), blender::geometry::GatherTasksInfo::r_offsets, blender::geometry::GatherTasksInfo::r_tasks, realize_instances(), remove_id_attribute_from_instances(), blender::result, blender::geometry::VariedDepthOptions::selection, and blender::geometry::OrderedAttributes::size().
|
static |
Assign the newly created vertex duplicates to the loose edges around this vertex. Every split loose edge is reattached to a newly created vertex. If there are non-split loose edges attached to the vertex, they all reuse the original vertex.
Definition at line 489 of file mesh_split_edges.cc.
References calc_vert_loose_edges(), blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), reassign_loose_edge_verts(), blender::geometry::VertLooseEdges::selected, blender::IndexRange::size(), split_edges(), swap_edge_vert(), and blender::geometry::VertLooseEdges::unselected.
Referenced by reassign_loose_edge_verts(), and split_edges().
|
static |
Definition at line 45 of file foreach_geometry.cc.
References blender::BLI_assert(), blender::Span< T >::drop_front(), blender::Span< T >::first(), blender::bke::InstanceReference::geometry_set(), blender::bke::InstanceReference::GeometrySet, blender::Span< T >::is_empty(), join_geometries(), blender::bke::Instances::references_for_write(), reinsert_modified_geometry_recursive(), blender::MutableSpan< T >::size(), and blender::bke::InstanceReference::type().
Referenced by reinsert_modified_geometry_recursive().
|
static |
Definition at line 61 of file mesh_copy_selection.cc.
References blender::index_mask::build_reverse_map(), blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), blender::IndexRange::index_range(), and remap_edges().
Referenced by mesh_copy_selection_keep_verts(), and remap_edges().
|
static |
Definition at line 25 of file mesh_copy_selection.cc.
References blender::index_mask::build_reverse_map< int >(), blender::exec_mode::grain_size(), blender::threading::parallel_invoke(), remap_verts(), and blender::index_mask::IndexMask::size().
Referenced by remap_verts().
|
static |
Definition at line 2884 of file realize_instances.cc.
References blender::bke::Instances::attributes_for_write(), blender::bke::Instances::ensure_geometry_instances(), blender::bke::InstanceReference::geometry_set(), blender::bke::GeometrySet::get_instances_for_write(), blender::bke::Instances::references_for_write(), blender::bke::MutableAttributeAccessor::remove(), remove_id_attribute_from_instances(), and blender::bke::InstanceReference::type().
Referenced by realize_instances(), and remove_id_attribute_from_instances().
| bke::CurvesGeometry blender::geometry::remove_points_and_split | ( | const bke::CurvesGeometry & | curves, |
| const IndexMask & | mask ) |
Remove the points in the point_mask and split each curve at the points that are removed (if necessary).
Definition at line 21 of file curves_remove_and_split.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::bke::attribute_filter_from_skip_ref(), blender::bke::CurvesGeometry::attributes_for_write(), blender::BKE_defgroup_copy_list(), blender::array_utils::copy(), blender::bke::Curve, blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic_for_write(), blender::MutableSpan< T >::drop_back(), blender::IndexRange::drop_front(), blender::array_utils::find_all_ranges(), blender::IndexRange::first(), blender::Vector< T, InlineBufferCapacity, Allocator >::first(), blender::bke::gather_attributes(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::IndexRange::last(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::NURBS_KNOT_MODE_NORMAL, blender::bke::CurvesGeometry::offsets_for_write(), blender::bke::Point, blender::bke::CurvesGeometry::remove_attributes_based_on_types(), remove_points_and_split(), blender::IndexRange::shift(), blender::IndexRange::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::bke::CurvesGeometry::update_curve_types(), blender::bke::curves::nurbs::update_custom_knot_modes(), and blender::CurvesGeometry::vertex_group_names.
Referenced by grease_pencil_remove_points_and_split(), and remove_points_and_split().
|
static |
Definition at line 127 of file merge_curves.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::GVArrayCommon::common_info(), blender::CommonVArrayInfo::data, blender::bke::AttributeIter::data_type, blender::bke::AttributeIter::domain, blender::bke::AttributeAccessor::foreach_attribute(), blender::bke::AttributeIter::get(), blender::GPointer::GPointer(), blender::Span< T >::index_range(), blender::bke::subdiv::init(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::AttributeIter::name, blender::threading::parallel_for(), reorder_and_flip_attributes_group_to_group(), blender::CommonVArrayInfo::Single, blender::bke::String, blender::CommonVArrayInfo::type, and blender::GVArrayCommon::type().
Referenced by reorder_and_flip_attributes_group_to_group(), and reorder_and_flip_curves().
|
static |
Definition at line 174 of file merge_curves.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::MutableSpan< T >::as_span(), blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), blender::bke::Curve, blender::bke::gather_attributes(), blender::offset_indices::gather_group_sizes(), blender::bke::CurvesGeometry::offsets(), blender::bke::CurvesGeometry::offsets_for_write(), blender::bke::Point, reorder_and_flip_attributes_group_to_group(), reorder_and_flip_curves(), and blender::bke::CurvesGeometry::tag_topology_changed().
Referenced by curves_merge_endpoints(), and reorder_and_flip_curves().
|
static |
Definition at line 89 of file randomize.cc.
References blender::bke::Array, blender::bke::attribute_type_to_cpp_type(), blender::data, blender::bke::Attribute::ArrayData::from_constructed(), blender::bke::attribute_math::gather(), blender::GSpan::GSpan(), reorder_attribute_domain(), blender::bke::Single, blender::CPPType::size, and blender::Span< T >::size().
Referenced by debug_randomize_curve_order(), debug_randomize_edge_order(), debug_randomize_face_order(), debug_randomize_instance_order(), debug_randomize_point_order(), debug_randomize_vert_order(), and reorder_attribute_domain().
|
static |
Definition at line 187 of file randomize.cc.
References blender::bke::Array, blender::bke::attribute_type_to_cpp_type(), blender::BLI_assert(), blender::CPPType::copy_construct_n(), blender::data, blender::bke::Attribute::ArrayData::from_uninitialized(), blender::IndexRange::IndexRange(), blender::threading::parallel_for(), POINTER_OFFSET, reorder_attribute_groups(), blender::bke::Single, blender::CPPType::size, blender::IndexRange::size(), blender::offset_indices::OffsetIndices< T >::size(), blender::Span< T >::size(), blender::IndexRange::start(), storage, and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by debug_randomize_curve_order(), debug_randomize_face_order(), and reorder_attribute_groups().
|
static |
Definition at line 56 of file reorder.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::bke::AttributeFilter::allow_skip(), blender::GVArrayCommon::common_info(), blender::CommonVArrayInfo::data, blender::bke::AttributeIter::data_type, blender::bke::AttributeIter::domain, blender::bke::AttributeAccessor::foreach_attribute(), blender::bke::AttributeIter::get(), blender::Span< T >::index_range(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::AttributeIter::name, blender::threading::parallel_for(), reorder_attributes_group_to_group(), blender::CommonVArrayInfo::Single, blender::bke::String, blender::CommonVArrayInfo::type, and blender::GVArrayCommon::type().
Referenced by copy_and_reorder_curves(), copy_and_reorder_mesh_faces(), and reorder_attributes_group_to_group().
| Curves * blender::geometry::reorder_curves | ( | const Curves & | src_curves, |
| Span< int > | old_by_new_map, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 379 of file reorder.cc.
References blender::bke::curves_new_nomain(), reorder_curves(), and reorder_curves_geometry().
Referenced by reorder_curves(), and reordered_component().
| bke::CurvesGeometry blender::geometry::reorder_curves_geometry | ( | const bke::CurvesGeometry & | src_curves, |
| Span< int > | old_by_new_map, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 368 of file reorder.cc.
References blender::BKE_defgroup_copy_list(), copy_and_reorder_curves(), blender::bke::curves_new_no_attributes(), blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::points_num(), reorder_curves_geometry(), and blender::CurvesGeometry::vertex_group_names.
Referenced by blender::ed::greasepencil::grease_pencil_join_fills_exec(), blender::ed::greasepencil::grease_pencil_stroke_reorder_exec(), blender::ed::curves::reorder_curves(), reorder_curves(), reorder_curves_geometry(), and blender::reorder_strokes().
|
static |
Definition at line 76 of file randomize.cc.
References blender::CD_CONSTRUCT, CD_MASK_ALL, blender::CustomData_copy_data(), blender::CustomData_free(), blender::CustomData_init_layout_from(), blender::data, blender::Span< T >::index_range(), reorder_customdata(), and blender::Span< T >::size().
Referenced by debug_randomize_edge_order(), debug_randomize_face_order(), debug_randomize_vert_order(), and reorder_customdata().
|
static |
Definition at line 167 of file randomize.cc.
References blender::BLI_assert(), blender::CD_CONSTRUCT, CD_MASK_ALL, blender::CustomData_copy_data(), blender::CustomData_free(), blender::CustomData_init_layout_from(), blender::data, blender::IndexRange::IndexRange(), reorder_customdata_groups(), blender::IndexRange::size(), blender::Span< T >::size(), blender::IndexRange::start(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by debug_randomize_curve_order(), debug_randomize_face_order(), and reorder_customdata_groups().
| bke::Instances * blender::geometry::reorder_instaces | ( | const bke::Instances & | src_instances, |
| Span< int > | old_by_new_map, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 390 of file reorder.cc.
References copy_and_reorder_instaces(), and reorder_instaces().
Referenced by blender::nodes::node_geo_sort_elements_cc::node_geo_exec(), reorder_instaces(), and reordered_component().
| Mesh * blender::geometry::reorder_mesh | ( | const Mesh & | src_mesh, |
| Span< int > | old_by_new_map, | ||
| bke::AttrDomain | domain, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 346 of file reorder.cc.
References blender::BKE_mesh_copy_parameters_for_eval(), copy_and_reorder_mesh(), blender::Mesh::corners_num, blender::Mesh::edges_num, blender::Mesh::faces_num, blender::bke::mesh_new_no_attributes(), reorder_mesh(), and blender::Mesh::verts_num.
Referenced by reorder_mesh(), and reordered_component().
| PointCloud * blender::geometry::reorder_points | ( | const PointCloud & | src_pointcloud, |
| Span< int > | old_by_new_map, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 358 of file reorder.cc.
References copy_and_reorder_points(), blender::bke::pointcloud_new_no_attributes(), reorder_points(), blender::PointCloud::totpoint, and blender::PointCloud::type.
Referenced by reorder_points(), and reordered_component().
| bke::GeometryComponentPtr blender::geometry::reordered_component | ( | const bke::GeometryComponent & | src_component, |
| Span< int > | old_by_new_map, | ||
| bke::AttrDomain | domain, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 399 of file reorder.cc.
References blender::BLI_assert(), BLI_assert_unreachable, blender::bke::GeometryComponent::is_empty(), reorder_curves(), reorder_instaces(), reorder_mesh(), reorder_points(), and reordered_component().
Referenced by blender::nodes::node_geo_sort_elements_cc::node_geo_exec(), and reordered_component().
| CurvesGeometry blender::geometry::resample_to_count | ( | const CurvesGeometry & | src_curves, |
| const fn::FieldContext & | field_context, | ||
| const fn::Field< bool > & | selection_field, | ||
| const fn::Field< int > & | count_field, | ||
| const ResampleCurvesOutputAttributeIDs & | output_ids = {} ) |
Definition at line 498 of file resample_curves.cc.
References get_count_input_max_one(), resample_to_count(), and resample_to_uniform().
| CurvesGeometry blender::geometry::resample_to_count | ( | const CurvesGeometry & | src_curves, |
| const IndexMask & | selection, | ||
| const VArray< int > & | counts, | ||
| const ResampleCurvesOutputAttributeIDs & | output_ids = {} ) |
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 463 of file resample_curves.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::MutableSpan< T >::begin(), blender::BKE_defgroup_copy_list(), blender::BLI_assert(), blender::index_mask::IndexMask::complement(), blender::array_utils::copy(), blender::bke::curves::nurbs::copy_custom_knots(), blender::offset_indices::copy_group_sizes(), blender::bke::curves::copy_only_curve_domain(), blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::MutableSpan< T >::drop_back(), blender::MutableSpan< T >::end(), blender::IndexRange::is_empty(), blender::MutableSpan< T >::last(), blender::bke::CurvesGeometry::offsets_for_write(), blender::bke::CurvesGeometry::points_by_curve(), resample_to_count(), resample_to_uniform(), blender::bke::CurvesGeometry::resize(), and blender::CurvesGeometry::vertex_group_names.
Referenced by blender::nodes::node_geo_curve_resample_cc::node_geo_exec(), blender::nodes::node_geo_curve_to_points_cc::node_geo_exec(), resample_to_count(), and resample_to_count().
| CurvesGeometry blender::geometry::resample_to_evaluated | ( | const CurvesGeometry & | src_curves, |
| const fn::FieldContext & | field_context, | ||
| const fn::Field< bool > & | selection_field, | ||
| const ResampleCurvesOutputAttributeIDs & | output_ids = {} ) |
Definition at line 653 of file resample_curves.cc.
References blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::fn::FieldEvaluator::evaluate(), blender::fn::FieldEvaluator::get_evaluated_selection_as_mask(), blender::IndexRange::is_empty(), resample_to_evaluated(), and blender::fn::FieldEvaluator::set_selection().
| CurvesGeometry blender::geometry::resample_to_evaluated | ( | const CurvesGeometry & | src_curves, |
| const IndexMask & | selection, | ||
| const ResampleCurvesOutputAttributeIDs & | output_ids = {} ) |
Evaluate each selected curve to its implicit evaluated points.
Definition at line 566 of file resample_curves.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), attribute, blender::BKE_defgroup_copy_list(), blender::index_mask::IndexMask::complement(), blender::bke::curves::nurbs::copy_custom_knots(), blender::offset_indices::copy_group_sizes(), blender::bke::curves::copy_only_curve_domain(), copy_or_defaults_for_unselected_curves(), blender::CURVE_TYPE_POLY, blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::GMutableSpan::data(), blender::geometry::AttributesForResample::dst, blender::geometry::AttributesForResample::dst_attributes, blender::geometry::AttributesForResample::dst_no_interpolation, blender::geometry::AttributesForResample::dst_normals, blender::geometry::AttributesForResample::dst_tangents, blender::bke::CurvesGeometry::ensure_can_interpolate_to_evaluated(), blender::bke::CurvesGeometry::evaluated_points_by_curve(), blender::bke::CurvesGeometry::evaluated_positions(), blender::bke::CurvesGeometry::fill_curve_types(), blender::index_mask::IndexMask::foreach_segment(), gather_point_attributes_to_interpolate(), blender::exec_mode::grain_size(), blender::bke::CurvesGeometry::interpolate_to_evaluated(), blender::IndexRange::is_empty(), blender::MutableSpan< T >::last(), normalize_curve_point_data(), blender::bke::CurvesGeometry::offsets_for_write(), blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::positions_for_write(), resample_to_evaluated(), blender::bke::CurvesGeometry::resize(), blender::IndexRange::size(), blender::GMutableSpan::slice(), blender::offset_indices::OffsetIndices< T >::slice(), blender::Span< T >::slice(), blender::geometry::AttributesForResample::src, blender::geometry::AttributesForResample::src_evaluated_normals, blender::geometry::AttributesForResample::src_evaluated_tangents, blender::GMutableSpan::type(), blender::CPPType::value_initialize_n(), and blender::CurvesGeometry::vertex_group_names.
Referenced by blender::ed::greasepencil::convert_to_catmull_rom(), blender::ed::greasepencil::convert_to_poly(), blender::modifier::greasepencil::ensure_no_bezier_curves(), blender::io::grease_pencil::PDFExporter::export_grease_pencil_objects(), blender::nodes::node_geo_curve_resample_cc::node_geo_exec(), blender::nodes::node_geo_curve_to_points_cc::node_geo_exec(), resample_to_evaluated(), and resample_to_evaluated().
| CurvesGeometry blender::geometry::resample_to_length | ( | const CurvesGeometry & | src_curves, |
| const fn::FieldContext & | field_context, | ||
| const fn::Field< bool > & | selection_field, | ||
| const fn::Field< float > & | segment_length_field, | ||
| const ResampleCurvesOutputAttributeIDs & | output_ids = {}, | ||
| bool | keep_last_segment = false ) |
Definition at line 552 of file resample_curves.cc.
References get_count_input_from_length(), resample_to_length(), and resample_to_uniform().
| CurvesGeometry blender::geometry::resample_to_length | ( | const CurvesGeometry & | src_curves, |
| const IndexMask & | selection, | ||
| const VArray< float > & | sample_lengths, | ||
| const ResampleCurvesOutputAttributeIDs & | output_ids = {}, | ||
| bool | keep_last_segment = false ) |
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.
| keep_last_segment | If false, curves that are too short are collapsed to a single point. If true, they will have at least one segment after resampling. This mainly exists for compatibility. |
Definition at line 511 of file resample_curves.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::BKE_defgroup_copy_list(), blender::index_mask::IndexMask::complement(), blender::bke::curves::nurbs::copy_custom_knots(), blender::offset_indices::copy_group_sizes(), blender::bke::curves::copy_only_curve_domain(), blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), blender::bke::CurvesGeometry::ensure_evaluated_lengths(), blender::bke::CurvesGeometry::evaluated_length_total_for_curve(), blender::index_mask::IndexMask::foreach_index(), get_count_from_length(), blender::exec_mode::grain_size(), blender::IndexRange::is_empty(), blender::MutableSpan< T >::last(), blender::bke::CurvesGeometry::offsets_for_write(), blender::bke::CurvesGeometry::points_by_curve(), resample_to_length(), resample_to_uniform(), blender::bke::CurvesGeometry::resize(), and blender::CurvesGeometry::vertex_group_names.
Referenced by blender::io::grease_pencil::GreasePencilExporter::foreach_shape_in_layer(), blender::ed::greasepencil::grease_pencil_stroke_simplify_exec(), blender::modify_drawing(), blender::nodes::node_geo_curve_resample_cc::node_geo_exec(), blender::nodes::node_geo_curve_to_points_cc::node_geo_exec(), resample_to_length(), resample_to_length(), and blender::simplify_drawing().
|
static |
Definition at line 426 of file resample_curves.cc.
References blender::offset_indices::accumulate_counts_to_offsets_with_overflow_check(), blender::fn::FieldEvaluator::add_with_destination(), blender::BKE_defgroup_copy_list(), blender::index_mask::IndexMask::complement(), blender::bke::curves::nurbs::copy_custom_knots(), blender::offset_indices::copy_group_sizes(), blender::bke::curves::copy_only_curve_domain(), blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::MutableSpan< T >::drop_back(), blender::fn::FieldEvaluator::evaluate(), blender::fn::FieldEvaluator::get_evaluated_selection_as_mask(), blender::IndexRange::is_empty(), blender::MutableSpan< T >::last(), blender::bke::CurvesGeometry::offsets_for_write(), blender::bke::CurvesGeometry::points_by_curve(), resample_to_uniform(), blender::bke::CurvesGeometry::resize(), blender::fn::FieldEvaluator::set_selection(), and blender::CurvesGeometry::vertex_group_names.
|
static |
Definition at line 287 of file resample_curves.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::MutableSpan< T >::as_span(), attribute, blender::index_mask::IndexMask::complement(), copy_or_defaults_for_unselected_curves(), blender::CURVE_TYPE_POLY, blender::bke::CurvesGeometry::curve_types(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), blender::GMutableSpan::data(), blender::geometry::AttributesForResample::dst, blender::geometry::AttributesForResample::dst_attributes, blender::geometry::AttributesForResample::dst_no_interpolation, blender::geometry::AttributesForResample::dst_normals, blender::geometry::AttributesForResample::dst_tangents, blender::bke::CurvesGeometry::ensure_evaluated_lengths(), blender::bke::CurvesGeometry::evaluated_lengths_for_curve(), blender::bke::CurvesGeometry::evaluated_points_by_curve(), blender::bke::CurvesGeometry::evaluated_positions(), blender::bke::CurvesGeometry::fill_curve_types(), blender::index_mask::IndexMask::foreach_segment(), gather_point_attributes_to_interpolate(), blender::exec_mode::grain_size(), blender::length_parameterize::interpolate(), blender::bke::CurvesGeometry::interpolate_to_evaluated(), blender::IndexRange::is_empty(), blender::Span< T >::is_empty(), normalize_curve_point_data(), blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::points_num(), blender::bke::CurvesGeometry::positions_for_write(), resample_to_uniform(), blender::geometry::EvalDataBuffer::resize(), blender::length_parameterize::sample_uniform(), blender::IndexRange::size(), blender::offset_indices::OffsetIndices< T >::size(), blender::GMutableSpan::slice(), blender::Span< T >::slice(), blender::geometry::AttributesForResample::src, blender::geometry::AttributesForResample::src_evaluated_normals, blender::geometry::AttributesForResample::src_evaluated_tangents, T, blender::bke::attribute_math::to_static_type(), blender::GMutableSpan::type(), and blender::CPPType::value_initialize_n().
Referenced by resample_to_count(), resample_to_count(), resample_to_length(), resample_to_length(), resample_to_uniform(), and resample_to_uniform().
|
static |
Retrieve spans from source and result attributes.
Definition at line 105 of file resample_curves.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), blender::GVArrayCommon::common_info(), blender::bke::cpp_type_to_attribute_type(), blender::CommonVArrayInfo::data, blender::GPointer::GPointer(), blender::Span< T >::index_range(), blender::bke::subdiv::init(), blender::bke::AttributeAccessor::lookup(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::Point, retrieve_attribute_spans(), blender::CommonVArrayInfo::Single, blender::bke::GSpanAttributeWriter::span, blender::CommonVArrayInfo::type, and blender::GVArrayCommon::type().
|
static |
Retrieve spans from source and result attributes.
Definition at line 279 of file interpolate_curves.cc.
References blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), blender::BLI_assert(), blender::bke::cpp_type_to_attribute_type(), blender::Span< T >::index_range(), blender::bke::AttributeAccessor::lookup(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::result, retrieve_attribute_spans(), and blender::GVArrayCommon::type().
Referenced by gather_curve_attributes_to_interpolate(), gather_point_attributes_to_interpolate(), gather_point_attributes_to_interpolate(), retrieve_attribute_spans(), and retrieve_attribute_spans().
|
static |
Definition at line 110 of file merge_curves.cc.
References BUFFER_FOR_CPP_TYPE_VALUE, blender::CPPType::default_construct(), blender::CPPType::destruct(), blender::IndexRange::IndexRange(), blender::CPPType::move_assign(), reverse_order(), blender::GMutableSpan::size(), and blender::GMutableSpan::type().
Referenced by reverse_order().
|
static |
Definition at line 162 of file interpolate_curves.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::MutableSpan< T >::copy_from(), blender::MutableSpan< T >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), reverse_samples(), and blender::MutableSpan< T >::size().
Referenced by reverse_samples(), and sample_curve_padded().
|
static |
Find the minimum bounding square that encloses the UVs as specified in r_phis. If that square is smaller than r_extent, then update r_phis accordingly.
Definition at line 1542 of file uv_pack.cc.
References blender::geometry::PackIsland::aspect_y, blender::geometry::UVMinimumEnclosingSquareFinder::best_angle, blender::geometry::UVMinimumEnclosingSquareFinder::best_bounds, blender::geometry::UVMinimumEnclosingSquareFinder::best_quad, blender::BLI_convexhull_2d(), blender::BLI_rctf_size_x(), blender::BLI_rctf_size_y(), blender::geometry::PackIsland::build_transformation(), blender::geometry::PackIsland::can_scale_(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), DEG2RADF, blender::ED_UVPACK_ROTATION_ANY, blender::ED_UVPACK_SHAPE_AABB, get_aspect_scaled_extent(), blender::geometry::UVMinimumEnclosingSquareFinder::indices, blender::mul_m2_v2(), blender::mul_v2_m2v2(), blender::geometry::PackIsland::pivot_, blender::geometry::UVMinimumEnclosingSquareFinder::points, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), rotate_inside_square(), blender::geometry::UVPackIsland_Params::rotate_method, scale(), blender::geometry::UVPackIsland_Params::shape_method, blender::geometry::UVPackIsland_Params::target_aspect_y, blender::geometry::PackIsland::triangle_vertices_, blender::geometry::UVMinimumEnclosingSquareFinder::update(), blender::geometry::UVMinimumEnclosingSquareFinder::update_recursive(), blender::rctf::xmax, blender::rctf::xmin, blender::rctf::ymax, and blender::rctf::ymin.
Referenced by pack_island_xatlas(), and rotate_inside_square().
|
static |
Definition at line 666 of file interpolate_curves.cc.
References blender::BEZIER_HANDLE_ALIGN, blender::BEZIER_HANDLE_VECTOR, blender::IndexRange::index_range(), blender::bke::curves::bezier::insert(), blender::bke::curves::bezier::Insertion::left_handle, blender::bke::curves::bezier::Insertion::position, blender::bke::curves::bezier::Insertion::right_handle, sample_bezier_curve_positions_handles(), blender::IndexRange::size(), blender::Span< T >::size(), and blender::Span< T >::slice().
Referenced by sample_bezier_curve_positions_handles(), and sample_curve_positions_and_handles().
|
static |
Definition at line 592 of file interpolate_curves.cc.
References blender::BEZIER_HANDLE_ALIGN, blender::bke::curves::catmull_rom::calculate_basis(), calculate_catmull_rom_basis_derivative(), blender::CURVE_TYPE_BEZIER, blender::MutableSpan< T >::fill(), get_catmull_rom_indices(), blender::IndexRange::index_range(), blender::bke::attribute_math::mix4(), sample_catmull_rom_curve_positions_handles(), and blender::IndexRange::size().
Referenced by sample_catmull_rom_curve_positions_handles(), and sample_curve_positions_and_handles().
|
static |
Definition at line 390 of file interpolate_curves.cc.
References blender::bke::CurvesGeometry::bezier_evaluated_offsets_for_curve(), blender::BLI_assert(), blender::CURVE_TYPE_BEZIER, blender::CURVE_TYPE_NURBS, blender::CURVE_TYPE_POLY, blender::bke::CurvesGeometry::curve_types(), blender::bke::CurvesGeometry::evaluated_points_by_curve(), blender::IndexRange::first(), float, blender::math::floor(), blender::index_mask::IndexMask::foreach_index(), blender::IndexRange::from_begin_end_inclusive(), blender::IndexRange::index_range(), blender::length_parameterize::interpolate(), blender::bke::CurvesGeometry::interpolate_to_evaluated(), blender::math::mod(), blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::resolution(), sample_curve_attribute(), blender::GMutableSpan::size(), blender::IndexRange::size(), blender::Span< T >::size(), blender::Span< T >::slice(), T, blender::bke::attribute_math::to_static_type(), blender::GMutableSpan::type(), blender::GSpan::type(), blender::GMutableSpan::typed(), and blender::GSpan::typed().
Referenced by interpolate_curves_with_samples(), and sample_curve_attribute().
| void blender::geometry::sample_curve_padded | ( | const bke::CurvesGeometry & | curves, |
| int | curve_index, | ||
| bool | cyclic, | ||
| bool | reverse, | ||
| MutableSpan< int > | r_indices, | ||
| MutableSpan< float > | r_factors ) |
Assign source point indices and interpolation factors to target points for a single curve.
| curves | Source curves geometry to sample. |
| curve_index | Index of the source curve to sample. |
| cyclic | True if the source curve is cyclic. |
| reverse | True if the curve should be sampled in reverse direction. |
| r_indices | Output array of point indices of the source curve. |
| r_factors | Output array of interpolation factors between a source point and the next. |
Definition at line 206 of file interpolate_curves.cc.
References blender::BLI_assert(), blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), reverse_samples(), sample_curve_padded(), blender::MutableSpan< T >::size(), and blender::Span< T >::size().
| void blender::geometry::sample_curve_padded | ( | const Span< float3 > | positions, |
| bool | cyclic, | ||
| MutableSpan< int > | r_indices, | ||
| MutableSpan< float > | r_factors ) |
Assign source point indices and interpolation factors to target points.
| positions | Source curve positions. |
| cyclic | True if the source curve is cyclic. |
| r_indices | Output array of point indices of the source curve. |
| r_factors | Output array of interpolation factors between a source point and the next. |
Definition at line 91 of file interpolate_curves.cc.
References assign_samples_to_segments(), blender::BLI_assert(), build_point_to_sample_map(), blender::math::ceil(), blender::MutableSpan< T >::fill(), blender::MutableSpan< T >::first(), float, blender::IndexRange::from_begin_end(), blender::IndexRange::index_range(), blender::Span< T >::index_range(), blender::IndexRange::is_empty(), blender::MutableSpan< T >::last(), blender::math::safe_divide(), sample, sample_curve_padded(), blender::IndexRange::size(), blender::MutableSpan< T >::size(), and blender::MutableSpan< T >::slice().
Referenced by blender::ed::sculpt_paint::greasepencil::interpolate_between_curves(), sample_curve_padded(), sample_curve_padded(), and blender::bke::tests::GreasePencilInterpolate::test_sample_curve().
|
static |
Definition at line 752 of file interpolate_curves.cc.
References blender::BLI_assert(), BLI_assert_unreachable, blender::CURVE_TYPE_BEZIER, blender::CURVE_TYPE_CATMULL_ROM, blender::CURVE_TYPE_NURBS, blender::CURVE_TYPE_POLY, blender::bke::CurvesGeometry::curve_types(), blender::bke::CurvesGeometry::cyclic(), blender::index_mask::IndexMask::foreach_index(), blender::bke::CurvesGeometry::handle_positions_left(), blender::bke::CurvesGeometry::handle_positions_right(), blender::bke::CurvesGeometry::handle_types_left(), blender::bke::CurvesGeometry::handle_types_right(), blender::length_parameterize::interpolate(), blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::positions(), sample_bezier_curve_positions_handles(), sample_catmull_rom_curve_positions_handles(), sample_curve_positions_and_handles(), sample_poly_curve_positions_handles(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::blender::Span< T >::slice(), blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
Referenced by interpolate_curves_with_samples(), and sample_curve_positions_and_handles().
|
static |
Definition at line 1273 of file interpolate_curves.cc.
References blender::MutableSpan< T >::fill(), blender::Span< T >::is_empty(), sample_curve_uniform(), blender::length_parameterize::sample_uniform(), and blender::length_parameterize::sample_uniform_reverse().
Referenced by interpolate_curves(), and sample_curve_uniform().
|
static |
Definition at line 392 of file trim_curves.cc.
References blender::BLI_assert(), blender::MutableSpan< T >::copy_from(), blender::bke::curves::IndexRangeCyclic::curve_range(), blender::bke::curves::IndexRangeCyclic::cycles(), blender::bke::curves::IndexRangeCyclic::drop_front(), blender::bke::curves::IndexRangeCyclic::first(), blender::IndexRange::first(), blender::bke::curves::bezier::Insertion::handle_next, blender::bke::curves::bezier::Insertion::handle_prev, blender::bke::curves::CurveSegment::index, blender::bke::curves::bezier::insert(), blender::bke::curves::CurvePoint::is_controlpoint(), knot_insert_bezier(), blender::IndexRange::last(), blender::bke::curves::bezier::Insertion::left_handle, blender::bke::curves::CurveSegment::next_index, blender::bke::curves::IndexRangeCyclic::one_after_last(), blender::IndexRange::one_after_last(), blender::bke::curves::CurvePoint::parameter, blender::bke::curves::bezier::Insertion::position, blender::bke::curves::bezier::Insertion::right_handle, sample_interval_bezier(), blender::IndexRange::size(), blender::bke::curves::IndexRangeCyclic::size_after_loop(), blender::bke::curves::IndexRangeCyclic::size_before_loop(), blender::bke::curves::IndexRangeCyclic::size_range(), blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
Referenced by sample_interval_bezier(), and trim_bezier_curves().
|
static |
Definition at line 354 of file trim_curves.cc.
References blender::BLI_assert(), copy_point_data_between_endpoints(), blender::IndexRange::first(), interpolate_catmull_rom(), blender::bke::curves::CurvePoint::is_controlpoint(), blender::IndexRange::one_after_last(), sample_interval_catmull_rom(), and blender::IndexRange::size().
Referenced by sample_interval_catmull_rom(), and trim_catmull_rom_curves().
|
static |
Sample source curve data in the interval defined by the points [start_point, end_point]. Uses linear interpolation to compute the endpoints.
| include_start_point | If False, the 'start_point' point sample will not be copied and not accounted for in the destination range. |
| src_data | Source to sample from. |
| dst_data | Destination to write samples to. |
| src_range | Interval within [start_point, end_point] to copy from the source point domain. |
| dst_range | Interval to copy point data to in the destination buffer. |
| start_point | Point on the source curve to start sampling from. |
| end_point | Last point to sample in the source curve. |
Definition at line 307 of file trim_curves.cc.
References blender::BLI_assert(), copy_point_data_between_endpoints(), blender::bke::curves::IndexRangeCyclic::drop_front(), blender::IndexRange::first(), blender::bke::curves::CurveSegment::index, blender::bke::curves::CurvePoint::is_controlpoint(), blender::bke::attribute_math::mix2(), blender::bke::curves::CurveSegment::next_index, blender::IndexRange::one_after_last(), blender::bke::curves::CurvePoint::parameter, sample_interval_linear(), and blender::IndexRange::size().
Referenced by sample_interval_linear(), trim_evaluated_curves(), and trim_polygonal_curves().
|
static |
Definition at line 552 of file interpolate_curves.cc.
References blender::BEZIER_HANDLE_VECTOR, blender::CURVE_TYPE_BEZIER, blender::MutableSpan< T >::fill(), blender::IndexRange::index_range(), blender::length_parameterize::interpolate(), blender::math::interpolate(), sample_poly_curve_positions_handles(), and blender::IndexRange::size().
Referenced by sample_curve_positions_and_handles(), and sample_poly_curve_positions_handles().
|
static |
Definition at line 37 of file set_curve_type.cc.
References blender::MutableSpan< T >::index_range(), scale(), and scale_input_assign().
Referenced by convert_curves_to_bezier(), create_nurbs_to_bezier_positions(), and scale_input_assign().
|
static |
Definition at line 66 of file randomize.cc.
References seed_from_curves().
Referenced by debug_randomize_curve_order(), and seed_from_curves().
|
static |
Definition at line 71 of file randomize.cc.
References blender::bke::Instances::instances_num(), and seed_from_instances().
Referenced by debug_randomize_instance_order(), and seed_from_instances().
|
static |
We can't use a fully random seed, because then the randomization wouldn't be deterministic, which is important to avoid causing issues when determinism is expected. Using a single constant seed is not ideal either, because then two geometries might be randomized equally or very similar. Ideally, the seed would be a hash of everything that feeds into the geometry processing algorithm before the randomization, but that's too expensive. Just use something simple but correct for now.
Definition at line 56 of file randomize.cc.
References seed_from_mesh().
Referenced by debug_randomize_edge_order(), debug_randomize_face_order(), debug_randomize_vert_order(), and seed_from_mesh().
|
static |
Definition at line 61 of file randomize.cc.
References seed_from_pointcloud(), and blender::PointCloud::totpoint.
Referenced by debug_randomize_point_order(), and seed_from_pointcloud().
|
static |
Definition at line 28 of file separate_geometry.cc.
References blender::bke::CurvesGeometry::attributes(), BLI_assert_unreachable, blender::bke::curves_copy_curve_selection(), blender::bke::curves_copy_point_selection(), blender::bke::AttributeAccessor::domain_size(), blender::fn::FieldEvaluator::evaluate(), blender::fn::FieldEvaluator::get_evaluated_selection_as_mask(), blender::index_mask::IndexMask::is_empty(), separate_curves_selection(), blender::fn::FieldEvaluator::set_selection(), and blender::index_mask::IndexMask::size().
Referenced by separate_curves_selection(), and separate_geometry().
| void blender::geometry::separate_geometry | ( | bke::GeometrySet & | geometry_set, |
| bke::AttrDomain | domain, | ||
| GeometryNodeDeleteGeometryMode | mode, | ||
| const fn::Field< bool > & | selection_field, | ||
| const bke::AttributeFilter & | attribute_filter, | ||
| bool & | r_is_error ) |
Returns the parts of the geometry that are on the selection for the given domain. If the domain is not applicable for the component, e.g. face domain for point cloud, nothing happens to that component. If no component can work with the domain, then error_message is set to true.
Definition at line 179 of file separate_geometry.cc.
References blender::bke::Curve, blender::bke::curves_copy_parameters(), blender::bke::curves_new_nomain(), delete_selected_instances(), ELEM, blender::bke::GeometrySet::get_curves(), blender::bke::GeometrySet::get_grease_pencil(), blender::bke::GeometrySet::get_grease_pencil_for_write(), blender::bke::GeometrySet::get_mesh(), blender::bke::GeometrySet::get_pointcloud(), blender::bke::GeometrySet::has_instances(), blender::bke::GeometrySet::has_realized_data(), blender::bke::Instance, blender::bke::Layer, blender::bke::Point, blender::bke::GeometrySet::remove(), blender::bke::GeometrySet::replace_curves(), blender::bke::GeometrySet::replace_grease_pencil(), blender::bke::GeometrySet::replace_mesh(), blender::bke::GeometrySet::replace_pointcloud(), separate_curves_selection(), separate_geometry(), separate_grease_pencil_layer_selection(), separate_mesh_selection(), separate_pointcloud_selection(), blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::strokes_for_write(), and blender::bke::greasepencil::Drawing::tag_topology_changed().
Referenced by blender::nodes::node_geo_delete_geometry_cc::node_geo_exec(), blender::nodes::node_geo_separate_geometry_cc::node_geo_exec(), and separate_geometry().
|
static |
Definition at line 128 of file separate_geometry.cc.
References blender::BKE_grease_pencil_copy_layer_parameters(), blender::BKE_grease_pencil_copy_parameters(), blender::BKE_grease_pencil_new_nomain(), blender::bke::AttributeAccessor::domain_size(), blender::fn::FieldEvaluator::evaluate(), blender::index_mask::IndexMask::foreach_index(), blender::bke::gather_attributes(), blender::fn::FieldEvaluator::get_evaluated_selection_as_mask(), blender::index_mask::IndexMask::is_empty(), separate_grease_pencil_layer_selection(), blender::fn::FieldEvaluator::set_selection(), and blender::index_mask::IndexMask::size().
Referenced by separate_geometry(), and separate_grease_pencil_layer_selection().
|
static |
Definition at line 104 of file separate_geometry.cc.
References blender::fn::FieldEvaluator::add(), blender::bke::AttributeAccessor::domain_size(), blender::fn::FieldEvaluator::evaluate(), blender::GEO_NODE_DELETE_GEOMETRY_MODE_ALL, blender::GEO_NODE_DELETE_GEOMETRY_MODE_EDGE_FACE, blender::GEO_NODE_DELETE_GEOMETRY_MODE_ONLY_FACE, blender::fn::FieldEvaluator::get_evaluated(), mesh_copy_selection(), mesh_copy_selection_keep_edges(), mesh_copy_selection_keep_verts(), and separate_mesh_selection().
Referenced by separate_geometry(), and separate_mesh_selection().
|
static |
Definition at line 58 of file separate_geometry.cc.
References blender::BKE_pointcloud_new_nomain(), blender::fn::FieldEvaluator::evaluate(), blender::bke::gather_attributes(), blender::fn::FieldEvaluator::get_evaluated_selection_as_mask(), blender::index_mask::IndexMask::is_empty(), separate_pointcloud_selection(), blender::fn::FieldEvaluator::set_selection(), blender::index_mask::IndexMask::size(), blender::PointCloud::totpoint, and blender::PointCloud::type.
Referenced by separate_geometry(), and separate_pointcloud_selection().
|
static |
Definition at line 24 of file mix_geometries.cc.
References b, and sharing_info_equal().
Referenced by create_id_index_map(), and sharing_info_equal().
|
static |
Definition at line 1220 of file uv_pack.cc.
References blender::BLI_assert(), dist_signed_squared_to_edge(), blender::math::length_squared(), signed_distance_fat_triangle(), and sqrtf.
Referenced by signed_distance_fat_triangle(), and blender::geometry::Occupancy::trace_triangle().
| IndexMask blender::geometry::simplify_curve_attribute | ( | const Span< float3 > | positions, |
| const IndexMask & | curves_selection, | ||
| const OffsetIndices< int > | points_by_curve, | ||
| const VArray< bool > & | cyclic, | ||
| float | epsilon, | ||
| GSpan | attribute_data, | ||
| IndexMaskMemory & | memory ) |
Compute an index masks of points to remove to simplify the curve attribute using the Ramer-Douglas-Peucker algorithm.
Definition at line 136 of file simplify_curves.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), curve_simplify(), blender::bke::curves::fill_points(), float, blender::index_mask::IndexMask::foreach_index(), blender::IndexMask::from_bools(), blender::exec_mode::grain_size(), simplify_curve_attribute(), blender::Span< T >::size(), blender::Span< T >::slice(), T, blender::CPPType::to_static_type(), blender::GSpan::type(), and blender::GSpan::typed().
Referenced by blender::ed::greasepencil::convert_to_catmull_rom(), blender::ed::greasepencil::grease_pencil_stroke_simplify_exec(), simplify_curve_attribute(), and blender::simplify_drawing().
Rounding helper for "D4" transforms, snapping to -90, 0 & 90 degrees.
Definition at line 225 of file uv_pack.cc.
References DEG2RADF, eps, fabsf, blender::result, sincos(), sincos_plusminus_90(), and sincos_wrap().
Referenced by sincos_plusminus_90().
Add 90 degrees to the angle.
Definition at line 205 of file uv_pack.cc.
References sincos(), and sincos_rotate_90().
Referenced by sincos_rotate_90().
Wrap the angle into the [-90, 90] degree range.
Angles of exactly +/-90 degrees are negated, matching the previous angle based logic where float(M_PI_2) being slightly larger than M_PI_2 wrapped these to the opposite sign.
Definition at line 216 of file uv_pack.cc.
References sincos(), and sincos_wrap().
Referenced by sincos_plusminus_90(), and sincos_wrap().
|
static |
Definition at line 408 of file realize_instances.cc.
References blender::MatBase< float, 4, 4 >::identity(), blender::math::is_equal(), and skip_transform().
Referenced by execute_realize_curve_tasks(), execute_realize_grease_pencil_tasks(), execute_realize_mesh_tasks(), execute_realize_pointcloud_tasks(), and skip_transform().
| void blender::geometry::smooth_curve_attribute | ( | const IndexMask & | curves_to_smooth, |
| const OffsetIndices< int > | points_by_curve, | ||
| const VArray< bool > & | point_selection, | ||
| const VArray< bool > & | cyclic, | ||
| int | iterations, | ||
| const VArray< float > & | influence_by_point, | ||
| bool | smooth_ends, | ||
| bool | keep_shape, | ||
| GMutableSpan | attribute_data ) |
Smooths the attribute_data using a 1D gaussian blur.
Definition at line 177 of file smooth_curves.cc.
References blender::CPPType::copy_assign_n(), blender::GMutableSpan::data(), blender::index_mask::IndexMask::foreach_index(), blender::index_mask::IndexMask::foreach_range(), blender::IndexMask::from_bools(), blender::VArray< T >::from_span(), gaussian_blur_1D(), blender::exec_mode::grain_size(), blender::index_mask::IndexMask::is_empty(), blender::IndexRange::size(), blender::GMutableSpan::size_in_bytes(), blender::blender::Span< T >::slice(), blender::GMutableSpan::slice(), smooth_curve_attribute(), blender::index_mask::IndexMask::to_range(), and blender::GMutableSpan::type().
| void blender::geometry::smooth_curve_attribute | ( | const IndexMask & | curves_to_smooth, |
| const OffsetIndices< int > | points_by_curve, | ||
| const VArray< bool > & | point_selection, | ||
| const VArray< bool > & | cyclic, | ||
| int | iterations, | ||
| float | influence, | ||
| bool | smooth_ends, | ||
| bool | keep_shape, | ||
| GMutableSpan | attribute_data ) |
Smooths the attribute_data using a 1D gaussian blur.
Definition at line 230 of file smooth_curves.cc.
References blender::VArray< T >::from_single(), smooth_curve_attribute(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_sequence_exec(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_update(), blender::ed::greasepencil::grease_pencil_stroke_smooth_exec(), blender::modify_drawing(), blender::ed::sculpt_paint::greasepencil::SmoothOperation::on_stroke_extended(), smooth_curve_attribute(), smooth_curve_attribute(), smooth_curve_positions(), blender::ed::sculpt_paint::smooth_fill_strokes(), and blender::ed::sculpt_paint::greasepencil::smooth_stroke().
| void blender::geometry::smooth_curve_positions | ( | bke::CurvesGeometry & | curves, |
| const IndexMask & | curves_to_smooth, | ||
| const VArray< bool > & | point_selection, | ||
| int | iterations, | ||
| const VArray< float > & | influence_by_point, | ||
| bool | smooth_ends, | ||
| bool | keep_shape ) |
Smooths the positions of curves using a 1D gaussian blur.
Definition at line 251 of file smooth_curves.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::CURVE_TYPE_BEZIER, blender::IndexRange::drop_back(), blender::IndexRange::drop_front(), blender::bke::GSpanAttributeWriter::finish(), blender::index_mask::IndexMask::foreach_index(), blender::index_mask::IndexMask::foreach_range(), blender::IndexMask::from_bools(), blender::VArray< T >::from_span(), gaussian_blur_1D(), blender::IndexRange::index_range(), blender::index_mask::IndexMask::is_empty(), blender::bke::MutableAttributeAccessor::lookup_for_write_span(), blender::threading::parallel_for(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::bke::curves::bezier::retrieve_all_positions(), blender::IndexRange::size(), blender::MutableSpan< T >::size(), smooth_curve_attribute(), smooth_curve_positions(), blender::bke::GSpanAttributeWriter::span, and blender::IndexRange::start().
Referenced by blender::ed::sculpt_paint::greasepencil::SmoothOperation::on_stroke_extended(), smooth_curve_positions(), and smooth_curve_positions().
| void blender::geometry::smooth_curve_positions | ( | bke::CurvesGeometry & | curves, |
| const IndexMask & | curves_to_smooth, | ||
| const VArray< bool > & | point_selection, | ||
| int | iterations, | ||
| float | influence, | ||
| bool | smooth_ends, | ||
| bool | keep_shape ) |
Definition at line 370 of file smooth_curves.cc.
References blender::VArray< T >::from_single(), and smooth_curve_positions().
| std::optional< Array< int > > blender::geometry::sort_indices_by_weights | ( | int | domain_size, |
| const IndexMask & | mask, | ||
| const VArray< int > & | group_id, | ||
| const VArray< float > & | weight ) |
Definition at line 495 of file reorder.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::array_utils::copy(), blender::array_utils::fill_index_range(), find_points_by_group_index(), blender::array_utils::gather(), grouped_sort(), identifiers_to_indices(), blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), blender::array_utils::indices_are_range(), blender::VArrayCommon< T >::is_single(), parallel_transform(), blender::array_utils::scatter(), sort_indices_by_weights(), and Span< T >::Span().
Referenced by blender::nodes::node_geo_sort_list_cc::node_geo_exec(), sort_indices_by_weights(), and blender::nodes::node_geo_sort_elements_cc::sorted_indices().
|
static |
Add each triangle to the rows that it is in. After this, the information about each row is still scattered across multiple thread-specific lists. Those separate lists are then joined in a separate step.
Definition at line 92 of file reverse_uv_sampler.cc.
References blender::Span< T >::index_range(), blender::threading::parallel_for(), and sort_tris_into_rows().
Referenced by blender::geometry::ReverseUVSampler::ReverseUVSampler(), and sort_tris_into_rows().
|
static |
Definition at line 49 of file mesh_primitive_uv_sphere.cc.
References sphere_corner_total().
Referenced by create_uv_sphere_mesh(), and sphere_corner_total().
|
static |
Definition at line 44 of file mesh_primitive_uv_sphere.cc.
References sphere_edge_total().
Referenced by create_uv_sphere_mesh(), and sphere_edge_total().
|
static |
Definition at line 56 of file mesh_primitive_uv_sphere.cc.
References sphere_face_total().
Referenced by create_uv_sphere_mesh(), and sphere_face_total().
|
static |
Definition at line 39 of file mesh_primitive_uv_sphere.cc.
References sphere_vert_total().
Referenced by calculate_sphere_corners(), calculate_sphere_edge_indices(), create_uv_sphere_mesh(), and sphere_vert_total().
| void blender::geometry::split_edges | ( | Mesh & | mesh, |
| const IndexMask & | selected_edges, | ||
| const bke::AttributeFilter & | attribute_filter = {} ) |
Definition at line 540 of file mesh_split_edges.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::bke::mesh::build_edge_to_corner_map(), blender::bke::mesh::build_vert_to_edge_map(), calc_all_corner_groups(), calc_new_edges(), calc_vert_ranges_per_old_vert(), blender::index_mask::IndexMask::complement(), debug_randomize_edge_order(), debug_randomize_vert_order(), blender::Span< T >::index_range(), blender::index_mask::IndexMask::is_empty(), offsets_to_map(), propagate_edge_attributes(), propagate_vert_attributes(), reassign_loose_edge_verts(), blender::bits::BitVector< InlineBufferCapacity, Allocator >::resize(), blender::Array< T, InlineBufferCapacity, Allocator >::size(), blender::index_mask::IndexMask::size(), blender::Span< T >::size(), split_edges(), blender::index_mask::IndexMask::to_bits(), update_corner_verts(), update_unselected_edges(), and vert_selection_from_edge().
Referenced by calc_all_corner_groups(), calc_corner_groups_for_vertex(), calc_vert_loose_edges(), calc_vert_ranges_per_old_vert(), blender::nodes::node_geo_edge_split_cc::node_geo_exec(), reassign_loose_edge_verts(), and split_edges().
|
static |
Definition at line 123 of file subdivide_curves.cc.
References blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::bke::curves::per_curve_point_offsets_range(), blender::GMutableSpan::slice(), blender::GSpan::slice(), blender::Span< T >::slice(), and subdivide_attribute_catmull_rom().
Referenced by subdivide_attribute_catmull_rom(), and subdivide_curves().
|
static |
Definition at line 104 of file subdivide_curves.cc.
References subdivide_attribute_linear(), T, blender::bke::attribute_math::to_static_type(), and blender::GMutableSpan::type().
|
static |
Definition at line 74 of file subdivide_curves.cc.
References blender::IndexRange::drop_back(), blender::index_mask::IndexMask::foreach_index(), blender::Span< T >::index_range(), linear_interpolation(), blender::threading::parallel_for(), blender::bke::curves::per_curve_point_offsets_range(), blender::IndexRange::slice(), blender::MutableSpan< T >::slice(), blender::Span< T >::slice(), and subdivide_attribute_linear().
Referenced by subdivide_attribute_linear(), subdivide_attribute_linear(), and subdivide_curves().
|
static |
Definition at line 226 of file subdivide_curves.cc.
References blender::IndexRange::drop_back(), blender::Span< T >::index_range(), blender::threading::parallel_for(), and subdivide_bezier_positions().
Referenced by subdivide_bezier_positions(), and subdivide_curves().
|
static |
Definition at line 161 of file subdivide_curves.cc.
References aligned_or_free_handle_type(), blender::BEZIER_HANDLE_ALIGN, blender::BEZIER_HANDLE_VECTOR, blender::IndexRange::drop_front(), 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(), insert(), blender::IndexRange::last(), blender::bke::curves::bezier::Insertion::left_handle, linear_interpolation(), blender::bke::curves::bezier::Insertion::position, blender::bke::curves::bezier::Insertion::right_handle, blender::bke::curves::bezier::segment_is_vector(), blender::IndexRange::size(), blender::MutableSpan< T >::slice(), and subdivide_bezier_segment().
Referenced by subdivide_bezier_segment().
| bke::CurvesGeometry blender::geometry::subdivide_curves | ( | const bke::CurvesGeometry & | src_curves, |
| const IndexMask & | selection, | ||
| const VArray< int > & | cuts, | ||
| const bke::AttributeFilter & | attribute_filter = {} ) |
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 288 of file subdivide_curves.cc.
References attribute, blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), blender::BKE_defgroup_copy_list(), calculate_result_offsets(), blender::index_mask::IndexMask::complement(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::bke::curves::nurbs::copy_custom_knots(), blender::array_utils::copy_group_to_group(), blender::bke::curves::copy_only_curve_domain(), blender::bke::CurvesGeometry::curve_type_counts(), blender::bke::CurvesGeometry::curve_types(), blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), blender::Array< T, InlineBufferCapacity, Allocator >::fill(), blender::bke::curves::foreach_curve_by_type(), blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), 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::is_empty(), blender::bke::CurvesGeometry::offsets(), blender::bke::CurvesGeometry::offsets_for_write(), blender::bke::curves::per_curve_point_offsets_range(), blender::bke::Point, blender::bke::CurvesGeometry::points_by_curve(), 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(), blender::blender::Span< T >::slice(), blender::MutableSpan< T >::slice(), blender::Span< T >::slice(), subdivide_attribute_catmull_rom(), subdivide_attribute_linear(), subdivide_bezier_positions(), subdivide_curves(), and blender::CurvesGeometry::vertex_group_names.
Referenced by blender::ed::curves::subdivide::exec(), blender::ed::greasepencil::gpencil_stroke_subdivide_exec(), subdivide_curves(), blender::nodes::node_geo_curve_subdivide_cc::subdivide_curves(), blender::subdivide_drawing(), blender::nodes::node_geo_curve_subdivide_cc::subdivide_grease_pencil_curves(), blender::ed::greasepencil::subdivide_last_segment(), and blender::ed::sculpt_paint::greasepencil::subdivide_stroke().
|
static |
Definition at line 474 of file mesh_split_edges.cc.
References swap_edge_vert().
Referenced by reassign_loose_edge_verts(), and swap_edge_vert().
|
static |
Definition at line 413 of file realize_instances.cc.
References blender::BLI_assert(), blender::GVArrayCommon::index_range(), blender::threading::parallel_for(), blender::GMutableSpan::size(), blender::GVArrayCommon::size(), threaded_copy(), blender::GMutableSpan::type(), and blender::GVArrayCommon::type().
Referenced by execute_instances_tasks(), and threaded_copy().
|
static |
Definition at line 422 of file realize_instances.cc.
References blender::BLI_assert(), blender::IndexRange::IndexRange(), blender::threading::parallel_for(), blender::GMutableSpan::size(), threaded_fill(), blender::GMutableSpan::type(), and blender::GPointer::type().
Referenced by execute_instances_tasks(), and threaded_fill().
|
static |
Definition at line 191 of file set_curve_type.cc.
References blender::CURVE_TYPE_NURBS, is_nurbs_to_bezier_one_to_one(), and to_bezier_size().
Referenced by convert_curves_to_bezier(), and to_bezier_size().
|
static |
Definition at line 208 of file set_curve_type.cc.
References blender::CURVE_TYPE_BEZIER, blender::CURVE_TYPE_CATMULL_ROM, and to_nurbs_size().
Referenced by convert_curves_to_nurbs(), and to_nurbs_size().
|
static |
Definition at line 69 of file merge_curves.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BLI_assert(), blender::IndexRange::contains(), blender::Array< T, InlineBufferCapacity, Allocator >::fill(), foreach_connected_curve(), blender::Span< T >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::IndexRange::size(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and toposort_connected_curves().
Referenced by curves_merge_endpoints(), and toposort_connected_curves().
|
static |
Definition at line 172 of file geometry/intern/transform.cc.
References blender::copy_m3_m4(), blender::bke::CurvesEditHints::deform_mats, blender::MutableSpan< T >::index_range(), blender::threading::parallel_for(), blender::bke::CurvesEditHints::positions_for_write(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), transform_curve_edit_hints(), and blender::math::transform_points().
Referenced by transform_curve_edit_hints(), and transform_geometry().
| std::optional< TransformGeometryErrors > blender::geometry::transform_geometry | ( | bke::GeometrySet & | geometry, |
| const float4x4 & | transform ) |
Definition at line 271 of file geometry/intern/transform.cc.
References blender::MatBase< float, 4, 4 >::identity(), blender::bke::mesh_transform(), transform_curve_edit_hints(), transform_geometry(), transform_gizmo_edit_hints(), transform_grease_pencil_edit_hints(), transform_greasepencil(), transform_instances(), transform_pointcloud(), transform_volume(), and blender::geometry::TransformGeometryErrors::volume_too_small.
Referenced by blender::ed::curves::append_primitive_curve(), blender::nodes::node_geo_object_info_cc::node_geo_exec(), blender::nodes::node_geo_transform_geometry_cc::node_geo_exec(), and transform_geometry().
|
static |
Definition at line 219 of file geometry/intern/transform.cc.
References blender::bke::GizmoEditHints::gizmo_transforms, and transform_gizmo_edit_hints().
Referenced by transform_geometry(), and transform_gizmo_edit_hints().
|
static |
Definition at line 192 of file geometry/intern/transform.cc.
References blender::bke::GreasePencilDrawingEditHints::deform_mats, blender::bke::GreasePencilEditHints::drawing_hints, blender::bke::GreasePencilDrawingEditHints::drawing_orig, blender::MutableSpan< T >::index_range(), blender::threading::parallel_for(), blender::bke::CurvesGeometry::points_num(), blender::bke::GreasePencilDrawingEditHints::positions_for_write(), blender::bke::greasepencil::Drawing::strokes(), transform_grease_pencil_edit_hints(), and blender::math::transform_points().
Referenced by transform_geometry(), and transform_grease_pencil_edit_hints().
|
static |
Definition at line 2748 of file realize_instances.cc.
References layer, and transform_grease_pencil_layers().
Referenced by execute_realize_grease_pencil_tasks(), and transform_grease_pencil_layers().
|
static |
Definition at line 89 of file geometry/intern/transform.cc.
References layer, and transform_greasepencil().
Referenced by transform_geometry(), and transform_greasepencil().
|
static |
Definition at line 110 of file geometry/intern/transform.cc.
References blender::MutableSpan< T >::index_range(), blender::threading::parallel_for(), transform_instances(), and blender::bke::Instances::transforms_for_write().
Referenced by transform_geometry(), and transform_instances().
| void blender::geometry::transform_mesh | ( | Mesh & | mesh, |
| float3 | translation, | ||
| math::Quaternion | rotation, | ||
| float3 | scale ) |
Definition at line 314 of file geometry/intern/transform.cc.
References blender::math::from_loc_rot_scale(), blender::bke::mesh_transform(), scale(), and transform_mesh().
Referenced by blender::nodes::node_geo_mesh_primitive_cube_cc::create_cube_mesh(), blender::nodes::node_geo_bounding_box_cc::node_geo_exec(), and transform_mesh().
|
static |
Definition at line 69 of file geometry/intern/transform.cc.
References blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::bke::Point, position, transform_pointcloud(), and blender::math::transform_points().
Referenced by transform_geometry(), and transform_pointcloud().
|
static |
Definition at line 120 of file geometry/intern/transform.cc.
References blender::geometry::TransformGeometryErrors::bad_volume_transform, blender::BKE_volume_grid_determinant_valid(), blender::BKE_volume_grid_get_for_write(), blender::BKE_volume_num_grids(), blender::bke::volume_grid::clear_tree(), blender::math::determinant(), determinant(), blender::bke::volume_grid::get_transform_matrix(), blender::math::normalize(), blender::bke::volume_grid::set_transform_matrix(), transform_volume(), UNUSED_VARS, blender::geometry::TransformGeometryErrors::volume_too_small, blender::MatBase< T, NumCol, NumRow, Alignment >::x_axis(), blender::MatBase< T, NumCol, NumRow, Alignment >::y_axis(), and blender::MatBase< T, NumCol, NumRow, Alignment >::z_axis().
Referenced by transform_geometry(), transform_volume(), and translate_volume().
|
static |
Equivalent to #PackIsland::build_transformation.
Definition at line 240 of file uv_pack.cc.
References sincos(), and transformation_from_sincos().
Referenced by transformation_from_sincos().
|
static |
Definition at line 226 of file geometry/intern/transform.cc.
References blender::bke::CurvesEditHints::positions_for_write(), translate_curve_edit_hints(), and translate_positions().
Referenced by translate_curve_edit_hints(), and translate_geometry().
| void blender::geometry::translate_geometry | ( | bke::GeometrySet & | geometry, |
| const float3 | translation ) |
Definition at line 240 of file geometry/intern/transform.cc.
References blender::math::is_zero(), blender::bke::mesh_translate(), translate_curve_edit_hints(), translate_geometry(), translate_gizmos_edit_hints(), translate_greasepencil(), translate_instances(), translate_pointcloud(), and translate_volume().
Referenced by blender::nodes::node_geo_transform_geometry_cc::node_geo_exec(), and translate_geometry().
|
static |
Definition at line 233 of file geometry/intern/transform.cc.
References blender::bke::GizmoEditHints::gizmo_transforms, and translate_gizmos_edit_hints().
Referenced by translate_geometry(), and translate_gizmos_edit_hints().
|
static |
Definition at line 78 of file geometry/intern/transform.cc.
References layer, blender::MatBase< T, NumCol, NumRow, Alignment >::location(), and translate_greasepencil().
Referenced by translate_geometry(), and translate_greasepencil().
|
static |
Definition at line 100 of file geometry/intern/transform.cc.
References blender::MutableSpan< T >::index_range(), blender::threading::parallel_for(), blender::bke::Instances::transforms_for_write(), and translate_instances().
Referenced by translate_geometry(), and translate_instances().
|
static |
Definition at line 45 of file geometry/intern/transform.cc.
References blender::bke::PointCloudRuntime::bounds_cache, blender::math::is_zero(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::bke::Point, position, blender::PointCloud::runtime, translate_pointcloud(), and translate_positions().
Referenced by translate_geometry(), and translate_pointcloud().
|
static |
Definition at line 36 of file geometry/intern/transform.cc.
References blender::MutableSpan< T >::index_range(), blender::threading::parallel_for(), and translate_positions().
Referenced by translate_curve_edit_hints(), translate_pointcloud(), and translate_positions().
Definition at line 166 of file geometry/intern/transform.cc.
References blender::math::from_location(), transform_volume(), and translate_volume().
Referenced by translate_geometry(), and translate_volume().
|
static |
Definition at line 69 of file reverse_uv_sampler.cc.
References blender::math::max(), blender::math::min(), tri_to_cell_bounds(), and uv_to_cell().
Referenced by tri_to_cell_bounds().
Definition at line 400 of file mesh_triangulate.cc.
References tri_to_ordered().
Referenced by tri_to_ordered(), and tris_in_set().
|
static |
Definition at line 409 of file mesh_triangulate.cc.
References blender::MutableSpan< T >::index_range(), blender::threading::parallel_for(), and tri_to_ordered_tri().
Referenced by mesh_triangulate(), and tri_to_ordered_tri().
|
static |
Definition at line 582 of file trim_curves.cc.
References attribute, blender::bke::CurvesGeometry::points_by_curve(), T, blender::bke::attribute_math::to_static_type(), and trim_attribute_linear().
Referenced by trim_attribute_linear(), trim_bezier_curves(), and trim_polygonal_curves().
|
static |
Definition at line 701 of file trim_curves.cc.
References fill_nurbs_data(), blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), 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::points_by_curve(), blender::bke::CurvesGeometry::positions(), blender::bke::CurvesGeometry::positions_for_write(), sample_interval_bezier(), blender::blender::Span< T >::slice(), blender::Span< T >::slice(), trim_attribute_linear(), and trim_bezier_curves().
Referenced by trim_bezier_curves(), and trim_curves().
|
static |
Definition at line 648 of file trim_curves.cc.
References attribute, blender::bke::CurvesGeometry::cyclic(), fill_bezier_data(), fill_nurbs_data(), blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::positions(), blender::bke::CurvesGeometry::positions_for_write(), sample_interval_catmull_rom(), blender::Span< T >::slice(), T, blender::bke::attribute_math::to_static_type(), and trim_catmull_rom_curves().
Referenced by trim_catmull_rom_curves(), and trim_curves().
| bke::CurvesGeometry blender::geometry::trim_curves | ( | const bke::CurvesGeometry & | src_curves, |
| const IndexMask & | selection, | ||
| const VArray< float > & | starts, | ||
| const VArray< float > & | ends, | ||
| GeometryNodeCurveSampleMode | mode, | ||
| const bke::AttributeFilter & | attribute_filter ) |
Definition at line 955 of file trim_curves.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), attribute, blender::bke::attribute_filter_with_skip_ref(), blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), blender::BLI_assert(), blender::index_mask::IndexMask::complement(), compute_curve_trim_parameters(), blender::bke::copy_attributes_group_to_group(), blender::offset_indices::copy_group_sizes(), blender::bke::curves::copy_only_curve_domain(), blender::bke::CurvesGeometry::curve_type_counts(), blender::CURVE_TYPE_NURBS, blender::CURVE_TYPE_POLY, blender::bke::CurvesGeometry::curve_types(), blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::curves_range(), blender::Default, blender::bke::CurvesGeometry::ensure_evaluated_lengths(), blender::bke::CurvesGeometry::evaluated_positions(), blender::bke::CurvesGeometry::fill_curve_types(), blender::bke::curves::foreach_curve_by_type(), blender::bke::CurvesGeometry::has_curve_with_type(), blender::index_mask::IndexMask::is_empty(), blender::index_mask::IndexMask::last(), blender::bke::MutableAttributeAccessor::lookup_for_write_span(), blender::index_mask::masked_fill(), blender::bke::CurvesGeometry::nurbs_has_custom_knots(), blender::NURBS_KNOT_MODE_NORMAL, blender::bke::CurvesGeometry::offsets(), blender::bke::CurvesGeometry::offsets_for_write(), blender::bke::Point, blender::bke::CurvesGeometry::points_by_curve(), PRF_scope, blender::bke::MutableAttributeAccessor::remove(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove(), blender::bke::CurvesGeometry::remove_attributes_based_on_types(), blender::bke::CurvesGeometry::resize(), blender::bke::retrieve_attributes_for_transfer(), blender::index_mask::IndexMask::size(), blender::VArrayCommon< T >::size(), blender::bke::CurvesGeometry::tag_topology_changed(), trim_bezier_curves(), trim_catmull_rom_curves(), trim_curves(), trim_evaluated_curves(), trim_polygonal_curves(), and blender::bke::curves::nurbs::update_custom_knot_modes().
Referenced by blender::deform_drawing(), blender::ed::sculpt_paint::CutOperationExecutor::execute(), trim_curves(), and blender::nodes::node_geo_curve_trim_cc::trim_curves().
|
static |
Definition at line 754 of file trim_curves.cc.
References attribute, blender::bke::CurvesGeometry::evaluated_points_by_curve(), blender::bke::CurvesGeometry::evaluated_positions(), fill_bezier_data(), fill_nurbs_data(), blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::positions_for_write(), sample_interval_linear(), blender::Span< T >::slice(), T, blender::bke::attribute_math::to_static_type(), and trim_evaluated_curves().
Referenced by trim_curves(), and trim_evaluated_curves().
|
static |
Definition at line 611 of file trim_curves.cc.
References fill_bezier_data(), fill_nurbs_data(), blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::positions(), blender::bke::CurvesGeometry::positions_for_write(), sample_interval_linear(), blender::Span< T >::slice(), trim_attribute_linear(), and trim_polygonal_curves().
Referenced by trim_curves(), and trim_polygonal_curves().
|
static |
Definition at line 818 of file trim_curves.cc.
References blender::GEO_NODE_CURVE_SAMPLE_FACTOR, blender::Span< T >::last(), length(), and trim_sample_length().
Referenced by compute_curve_trim_parameters(), and trim_sample_length().
|
static |
Definition at line 449 of file mesh_triangulate.cc.
References blender::BLI_assert(), blender::IndexMask::from_predicate(), tri_to_ordered(), and tris_in_set().
Referenced by mesh_triangulate(), and tris_in_set().
|
static |
Definition at line 529 of file realize_instances.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::geometry::AttributeFallbacksArray::array, blender::bke::attribute_type_to_cpp_type(), blender::geometry::TaskAttrInfo::attributes, blender::CommonVArrayInfo::data, blender::CPPType::default_value(), blender::geometry::TaskAttrInfo::fallbacks, blender::GPointer::get(), blender::CPPType::is_equal(), blender::geometry::OrderedAttributes::kinds, blender::geometry::OrderedAttributes::names, blender::threading::parallel_reduce(), blender::CommonVArrayInfo::Single, try_join_single_value_attribute(), blender::CommonVArrayInfo::type, and blender::GPointer::type().
Referenced by execute_instances_tasks(), execute_realize_curve_tasks(), execute_realize_grease_pencil_tasks(), execute_realize_mesh_tasks(), execute_realize_pointcloud_tasks(), and try_join_single_value_attribute().
|
static |
Definition at line 68 of file join_geometries.cc.
References blender::GVArrayCommon::common_info(), blender::CommonVArrayInfo::data, blender::IndexRange::drop_front(), blender::Span< T >::first(), blender::GPointer::get(), blender::GPointer::GPointer(), blender::Span< T >::index_range(), blender::CPPType::is_equal(), blender::bke::AttributeAccessor::lookup_or_default(), blender::threading::parallel_reduce(), blender::CommonVArrayInfo::Single, try_join_single_value_attribute(), blender::CommonVArrayInfo::type, blender::GPointer::type(), and blender::GVArrayCommon::type().
Referenced by join_attributes(), and try_join_single_value_attribute().
|
static |
Update corner verts so that each group of corners gets its own vertex. For the last "new vertex" we can reuse the original vertex, which would otherwise become unused by any faces. The loose edge case will have to deal with this later.
Definition at line 316 of file mesh_split_edges.cc.
References blender::threading::parallel_for(), and update_corner_verts().
Referenced by split_edges(), and update_corner_verts().
|
static |
Helper function for pack_islands_alpaca_rotate
The "Hole" is an AABB region of the UV plane that is stored in an unusual way.
| hole | is the XY position of lower left corner of the AABB. |
| hole_diagonal | is the extent of the AABB, possibly flipped. |
| hole_rotate | is a boolean value, tracking if hole_diagonal is flipped. |
Given an alternate AABB specified by (u0, v0, u1, v1), the helper will update the Hole to the candidate location if it is larger.
Definition at line 552 of file uv_pack.cc.
References blender::BLI_assert(), UNUSED_VARS, and update_hole_rotate().
Referenced by pack_islands_alpaca_rotate(), and update_hole_rotate().
|
static |
Definition at line 453 of file mesh_split_edges.cc.
References edge_from_corner(), blender::Span< T >::first(), blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), blender::Span< T >::is_empty(), update_unselected_edges(), blender::OrderedEdge::v_high, and blender::OrderedEdge::v_low.
Referenced by split_edges(), and update_unselected_edges().
| bool blender::geometry::use_debug_randomization | ( | ) |
Definition at line 328 of file randomize.cc.
References blender::G, and use_debug_randomization().
Referenced by debug_randomize_curve_order(), debug_randomize_edge_order(), debug_randomize_face_order(), debug_randomize_instance_order(), debug_randomize_mesh_order(), debug_randomize_point_order(), debug_randomize_vert_order(), and use_debug_randomization().
| ParamKey blender::geometry::uv_find_pin_index | ( | ParamHandle * | handle, |
| const int | bmvertindex, | ||
| const float | uv[2] ) |
Definition at line 3853 of file uv_parametrizer.cc.
References blender::BLI_ghash_lookup(), blender::len_squared_v2v2(), blender::geometry::GeoUVPinIndex::next, blender::geometry::ParamHandle::pin_hash, POINTER_FROM_INT, blender::geometry::GeoUVPinIndex::reindex, blender::geometry::GeoUVPinIndex::uv, and uv_find_pin_index().
Referenced by blender::construct_param_edge_set_seams(), blender::construct_param_handle_face_add(), and uv_find_pin_index().
| void blender::geometry::uv_parametrizer_aspect_ratio | ( | ParamHandle * | handle, |
| float | aspect_y ) |
Definition at line 3841 of file uv_parametrizer.cc.
References blender::geometry::ParamHandle::aspect_y, blender::BLI_assert(), and uv_parametrizer_aspect_ratio().
Referenced by blender::construct_param_handle(), blender::construct_param_handle_multi(), blender::construct_param_handle_subsurfed(), and uv_parametrizer_aspect_ratio().
| void blender::geometry::uv_parametrizer_average | ( | ParamHandle * | handle, |
| bool | ignore_pinned, | ||
| bool | scale_uv, | ||
| bool | shear ) |
Definition at line 4315 of file uv_parametrizer.cc.
References blender::geometry::PChart::area_3d, blender::geometry::PChart::area_uv, blender::geometry::ParamHandle::charts, blender::clamp_f(), blender::geometry::PVert::co, blender::dot_v3v3(), blender::geometry::PVert::edge, fabsf, blender::geometry::PChart::faces, blender::geometry::PChart::has_pins, blender::invert_m2_m2(), blender::len_v3(), blender::mid_v2_v2v2(), blender::geometry::ParamHandle::ncharts, blender::geometry::PEdge::next, blender::geometry::PFace::nextlink, blender::normalize_v3(), blender::geometry::PChart::origin, p_chart_uv_bbox(), p_chart_uv_scale(), p_chart_uv_transform(), p_chart_uv_translate(), p_face_area(), p_face_uv_area_signed(), sqrtf, blender::sub_v2_v2v2(), blender::geometry::PVert::uv, uv_parametrizer_average(), and blender::geometry::PEdge::vert.
Referenced by blender::average_islands_scale_exec(), blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), uv_parametrizer_average(), and blender::uvedit_unwrap().
| void blender::geometry::uv_parametrizer_construct_end | ( | ParamHandle * | phandle, |
| bool | fill_holes, | ||
| bool | topology_from_uvs, | ||
| int * | r_count_failed = nullptr ) |
Definition at line 4066 of file uv_parametrizer.cc.
References blender::BLI_assert(), blender::geometry::ParamHandle::charts, blender::geometry::ParamHandle::construction_chart, blender::geometry::ParamHandle::hash_edges, blender::geometry::ParamHandle::hash_faces, blender::geometry::ParamHandle::hash_verts, blender::geometry::PChart::nboundaries, blender::geometry::ParamHandle::ncharts, p_chart_boundaries(), p_chart_fill_boundaries(), p_connect_pairs(), p_split_charts(), p_vert_load_pin_select_uvs(), PHANDLE_STATE_ALLOCATED, PHANDLE_STATE_CONSTRUCTED, phash_safe_delete(), blender::geometry::ParamHandle::state, uv_parametrizer_construct_end(), blender::v, and blender::geometry::PChart::verts.
Referenced by blender::construct_param_handle(), blender::construct_param_handle_multi(), blender::construct_param_handle_subsurfed(), blender::nodes::node_geo_uv_pack_islands_cc::construct_uv_gvarray(), blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), and uv_parametrizer_construct_end().
| void blender::geometry::uv_parametrizer_edge_set_seam | ( | ParamHandle * | phandle, |
| const ParamKey * | vkeys ) |
Definition at line 4056 of file uv_parametrizer.cc.
References blender::BLI_assert(), blender::e, p_edge_lookup(), PEDGE_SEAM, PHANDLE_STATE_ALLOCATED, blender::geometry::ParamHandle::state, and uv_parametrizer_edge_set_seam().
Referenced by blender::construct_param_edge_set_seams(), blender::construct_param_handle_subsurfed(), blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), and uv_parametrizer_edge_set_seam().
| void blender::geometry::uv_parametrizer_face_add | ( | ParamHandle * | handle, |
| const ParamKey | key, | ||
| const int | nverts, | ||
| const ParamKey * | vkeys, | ||
| const float ** | co, | ||
| float ** | uv, | ||
| const float * | weight, | ||
| const bool * | pin, | ||
| const bool * | select ) |
Definition at line 3962 of file uv_parametrizer.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_unchecked(), blender::BLI_assert(), blender::Array< T, InlineBufferCapacity, Allocator >::first(), p_add_ngon(), p_face_add_construct(), p_face_exists(), PHANDLE_STATE_ALLOCATED, blender::Vector< T, InlineBufferCapacity, Allocator >::remove(), blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::geometry::ParamHandle::state, and uv_parametrizer_face_add().
Referenced by blender::construct_param_handle_face_add(), blender::construct_param_handle_subsurfed(), blender::nodes::node_geo_uv_pack_islands_cc::construct_uv_gvarray(), blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), p_add_ngon(), and uv_parametrizer_face_add().
| void blender::geometry::uv_parametrizer_flush | ( | ParamHandle * | handle | ) |
Definition at line 4455 of file uv_parametrizer.cc.
References blender::geometry::ParamHandle::charts, blender::geometry::ParamHandle::ncharts, p_flush_uvs(), blender::geometry::PChart::skip_flush, and uv_parametrizer_flush().
Referenced by blender::average_islands_scale_exec(), blender::nodes::node_geo_uv_pack_islands_cc::construct_uv_gvarray(), blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), blender::ED_uvedit_live_unwrap_re_solve(), blender::minimize_stretch_exit(), blender::minimize_stretch_iteration(), uv_parametrizer_flush(), and blender::uvedit_unwrap().
| void blender::geometry::uv_parametrizer_flush_restore | ( | ParamHandle * | handle | ) |
Definition at line 4467 of file uv_parametrizer.cc.
References blender::geometry::ParamHandle::charts, blender::geometry::PChart::faces, blender::geometry::ParamHandle::ncharts, blender::geometry::PFace::nextlink, p_face_restore_uvs(), and uv_parametrizer_flush_restore().
Referenced by blender::ED_uvedit_live_unwrap_end(), blender::minimize_stretch_exit(), and uv_parametrizer_flush_restore().
| bool blender::geometry::uv_parametrizer_is_slim | ( | const ParamHandle * | phandle | ) |
Definition at line 5472 of file uv_parametrizer.cc.
References blender::geometry::ParamHandle::slim_mt, UNUSED_VARS, and uv_parametrizer_is_slim().
Referenced by blender::ED_uvedit_live_unwrap_end(), blender::ED_uvedit_live_unwrap_re_solve(), and uv_parametrizer_is_slim().
| void blender::geometry::uv_parametrizer_lscm_begin | ( | ParamHandle * | handle, |
| bool | live, | ||
| bool | abf, | ||
| bool | use_original_bounds ) |
Definition at line 4115 of file uv_parametrizer.cc.
References blender::BLI_assert(), blender::geometry::ParamHandle::charts, blender::geometry::PChart::faces, blender::geometry::ParamHandle::ncharts, blender::geometry::PFace::nextlink, p_chart_lscm_begin(), p_face_backup_uvs(), PHANDLE_STATE_CONSTRUCTED, PHANDLE_STATE_LSCM, blender::geometry::ParamHandle::state, and uv_parametrizer_lscm_begin().
Referenced by blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), blender::ED_uvedit_live_unwrap_begin(), uv_parametrizer_lscm_begin(), and blender::uvedit_unwrap().
| void blender::geometry::uv_parametrizer_lscm_end | ( | ParamHandle * | handle | ) |
Definition at line 4169 of file uv_parametrizer.cc.
References blender::BLI_assert(), blender::geometry::ParamHandle::charts, blender::geometry::ParamHandle::ncharts, p_chart_lscm_end(), PHANDLE_STATE_CONSTRUCTED, PHANDLE_STATE_LSCM, blender::geometry::ParamHandle::state, and uv_parametrizer_lscm_end().
Referenced by blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), blender::ED_uvedit_live_unwrap_end(), uv_parametrizer_lscm_end(), and blender::uvedit_unwrap().
| void blender::geometry::uv_parametrizer_lscm_solve | ( | ParamHandle * | handle, |
| int * | count_changed, | ||
| int * | count_failed ) |
Definition at line 4131 of file uv_parametrizer.cc.
References blender::BLI_assert(), blender::geometry::ParamHandle::charts, blender::geometry::PChart::context, blender::geometry::PChart::has_pins, blender::geometry::ParamHandle::ncharts, p_chart_lscm_end(), p_chart_lscm_solve(), p_chart_lscm_transform_single_pin(), p_chart_rotate_fit_aabb(), p_chart_rotate_minimum_area(), PHANDLE_STATE_LSCM, blender::result, blender::geometry::PChart::single_pin, blender::geometry::ParamHandle::state, and uv_parametrizer_lscm_solve().
Referenced by blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), blender::ED_uvedit_live_unwrap_re_solve(), uv_parametrizer_lscm_solve(), and blender::uvedit_unwrap().
| void blender::geometry::uv_parametrizer_original_bounds | ( | ParamHandle * | phandle | ) |
Definition at line 4279 of file uv_parametrizer.cc.
References blender::geometry::PChartOrigBounds::angle, blender::BLI_assert(), blender::geometry::PChartOrigBounds::bounds, blender::geometry::ParamHandle::charts, blender::mid_v2_v2v2(), blender::geometry::ParamHandle::ncharts, blender::geometry::PChart::orig_bounds, p_chart_minimum_area_angle(), p_chart_uv_bbox(), p_chart_uv_rotate(), p_chart_uv_scale(), p_chart_uv_translate(), PVERT_SELECT, blender::safe_divide(), scale(), blender::sub_v2_v2v2(), uv_parametrizer_original_bounds(), blender::v, and blender::geometry::PChart::verts.
Referenced by uv_parametrizer_original_bounds(), and blender::uvedit_unwrap().
| void blender::geometry::uv_parametrizer_pack | ( | ParamHandle * | handle, |
| const UVPackIsland_Params & | params ) |
Definition at line 4227 of file uv_parametrizer.cc.
References blender::geometry::PackIsland::add_triangle(), blender::geometry::PackIsland::angle, blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::geometry::PackIsland::aspect_y, blender::geometry::ParamHandle::aspect_y, blender::geometry::PackIsland::build_transformation(), blender::geometry::PackIsland::caller_index, blender::geometry::PackIsland::can_scale_(), blender::geometry::ParamHandle::charts, blender::ED_UVPACK_PIN_NONE, blender::geometry::PVert::edge, blender::geometry::PChart::faces, blender::geometry::PChart::has_pins, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), mul_v2_m2_add_v2v2(), blender::geometry::ParamHandle::ncharts, blender::geometry::PEdge::next, blender::geometry::PFace::nextlink, p_chart_uv_translate(), pack_islands(), blender::geometry::UVPackIsland_Params::pin_method, blender::geometry::PackIsland::pinned, blender::geometry::PackIsland::pre_translate, scale(), blender::geometry::UVPackIsland_Params::udim_base_offset, blender::geometry::PVert::uv, uv_parametrizer_pack(), uv_parametrizer_scale_x(), blender::v, blender::v2, blender::geometry::PEdge::vert, and blender::geometry::PChart::verts.
Referenced by blender::nodes::node_geo_uv_pack_islands_cc::construct_uv_gvarray(), blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), and uv_parametrizer_pack().
|
static |
Definition at line 477 of file uv_parametrizer.cc.
References blender::geometry::ParamHandle::charts, blender::geometry::ParamHandle::ncharts, uv_parametrizer_scale_x(), blender::v, and blender::geometry::PChart::verts.
Referenced by uv_parametrizer_pack(), and uv_parametrizer_scale_x().
| void blender::geometry::uv_parametrizer_slim_live_begin | ( | ParamHandle * | phandle, |
| const ParamSlimOptions * | slim_options ) |
Definition at line 5367 of file uv_parametrizer.cc.
References blender::geometry::ParamHandle::charts, slim::MatrixTransfer::charts, blender::geometry::PChart::faces, blender::geometry::ParamHandle::ncharts, blender::geometry::PFace::nextlink, p_face_backup_uvs(), PVERT_PIN, PVERT_SELECT, slim::MatrixTransfer::setup_slim_data(), blender::geometry::PChart::skip_flush, blender::geometry::ParamHandle::slim_mt, slim::MatrixTransferChart::succeeded, UNUSED_VARS, uv_parametrizer_slim_live_begin(), blender::v, and blender::geometry::PChart::verts.
Referenced by blender::ED_uvedit_live_unwrap_begin(), and uv_parametrizer_slim_live_begin().
| void blender::geometry::uv_parametrizer_slim_live_end | ( | ParamHandle * | phandle | ) |
Definition at line 5456 of file uv_parametrizer.cc.
References slim::MatrixTransfer::charts, slim::MatrixTransferChart::free_slim_data(), blender::geometry::ParamHandle::ncharts, blender::geometry::ParamHandle::slim_mt, UNUSED_VARS, and uv_parametrizer_slim_live_end().
Referenced by blender::ED_uvedit_live_unwrap_end(), and uv_parametrizer_slim_live_end().
| void blender::geometry::uv_parametrizer_slim_live_solve_iteration | ( | ParamHandle * | phandle | ) |
Definition at line 5429 of file uv_parametrizer.cc.
References blender::geometry::ParamHandle::charts, slim::MatrixTransfer::charts, slim::MatrixTransferChart::data, blender::geometry::ParamHandle::ncharts, slim::MatrixTransfer::parametrize_live(), slim::MatrixTransfer::pinned_vertex_data, blender::geometry::ParamHandle::slim_mt, UNUSED_VARS, and uv_parametrizer_slim_live_solve_iteration().
Referenced by blender::ED_uvedit_live_unwrap_re_solve(), and uv_parametrizer_slim_live_solve_iteration().
| void blender::geometry::uv_parametrizer_slim_solve | ( | ParamHandle * | phandle, |
| const ParamSlimOptions * | slim_options, | ||
| bool | use_original_bounds, | ||
| int * | count_changed, | ||
| int * | count_failed ) |
Definition at line 5348 of file uv_parametrizer.cc.
References slim::MatrixTransfer::parametrize(), blender::geometry::ParamHandle::slim_mt, UNUSED_VARS, and uv_parametrizer_slim_solve().
Referenced by uv_parametrizer_slim_solve(), and blender::uvedit_unwrap().
| void blender::geometry::uv_parametrizer_slim_stretch_iteration | ( | ParamHandle * | phandle, |
| float | blend ) |
Definition at line 5411 of file uv_parametrizer.cc.
References slim::MatrixTransfer::charts, blender::geometry::ParamHandle::ncharts, blender::geometry::ParamHandle::slim_mt, UNUSED_VARS, and uv_parametrizer_slim_stretch_iteration().
Referenced by uv_parametrizer_slim_stretch_iteration().
| void blender::geometry::uv_parametrizer_stretch_begin | ( | ParamHandle * | handle | ) |
Definition at line 4183 of file uv_parametrizer.cc.
References blender::geometry::ParamHandle::blend, blender::BLI_assert(), blender::BLI_rng_new(), blender::geometry::ParamHandle::charts, blender::geometry::PChart::faces, blender::geometry::ParamHandle::ncharts, blender::geometry::PFace::nextlink, p_face_area(), p_face_backup_uvs(), p_stretch_pin_boundary(), PHANDLE_STATE_CONSTRUCTED, PHANDLE_STATE_STRETCH, PVERT_PIN, blender::geometry::ParamHandle::rng, blender::geometry::ParamHandle::state, uv_parametrizer_stretch_begin(), blender::v, and blender::geometry::PChart::verts.
Referenced by blender::minimize_stretch_init(), and uv_parametrizer_stretch_begin().
| void blender::geometry::uv_parametrizer_stretch_blend | ( | ParamHandle * | handle, |
| float | blend ) |
Definition at line 4207 of file uv_parametrizer.cc.
References blender::geometry::ParamHandle::blend, blender::BLI_assert(), PHANDLE_STATE_STRETCH, blender::geometry::ParamHandle::state, and uv_parametrizer_stretch_blend().
Referenced by blender::minimize_stretch_init(), blender::minimize_stretch_iteration(), and uv_parametrizer_stretch_blend().
| void blender::geometry::uv_parametrizer_stretch_end | ( | ParamHandle * | handle | ) |
Definition at line 4221 of file uv_parametrizer.cc.
References blender::BLI_assert(), PHANDLE_STATE_CONSTRUCTED, PHANDLE_STATE_STRETCH, blender::geometry::ParamHandle::state, and uv_parametrizer_stretch_end().
Referenced by blender::minimize_stretch_exit(), and uv_parametrizer_stretch_end().
| void blender::geometry::uv_parametrizer_stretch_iter | ( | ParamHandle * | handle | ) |
Definition at line 4213 of file uv_parametrizer.cc.
References blender::BLI_assert(), blender::geometry::ParamHandle::charts, blender::geometry::ParamHandle::ncharts, p_chart_stretch_minimize(), PHANDLE_STATE_STRETCH, blender::geometry::ParamHandle::rng, blender::geometry::ParamHandle::state, and uv_parametrizer_stretch_iter().
Referenced by blender::minimize_stretch_iteration(), and uv_parametrizer_stretch_iter().
| void blender::geometry::uv_prepare_pin_index | ( | ParamHandle * | handle, |
| const int | bmvertindex, | ||
| const float | uv[2] ) |
Definition at line 3890 of file uv_parametrizer.cc.
References blender::BLI_ghash_insert(), blender::BLI_ghash_int_new(), blender::BLI_ghash_lookup(), blender::equals_v2v2(), new_geo_uv_pinindex(), blender::geometry::GeoUVPinIndex::next, blender::geometry::ParamHandle::pin_hash, POINTER_FROM_INT, blender::geometry::GeoUVPinIndex::uv, and uv_prepare_pin_index().
Referenced by uv_prepare_pin_index(), and blender::uvedit_prepare_pinned_indices().
Definition at line 64 of file reverse_uv_sampler.cc.
References uv_to_cell().
Referenced by blender::geometry::ReverseUVSampler::sample(), tri_to_cell_bounds(), and uv_to_cell().
|
static |
Definition at line 385 of file realize_instances.cc.
References INT32_MAX, blender::num, and valid_int_num().
Referenced by execute_realize_curve_tasks(), execute_realize_grease_pencil_tasks(), execute_realize_mesh_tasks(), execute_realize_pointcloud_tasks(), and valid_int_num().
| IndexMask blender::geometry::vert_selection_from_edge | ( | Span< int2 > | edges, |
| const IndexMask & | edge_mask, | ||
| int | verts_num, | ||
| IndexMaskMemory & | memory ) |
A vertex is selected if it's used by a selected edge.
Definition at line 17 of file mesh_selection.cc.
References array< T, alignment >::array(), blender::Default, blender::index_mask::IndexMask::foreach_index_optimized(), blender::IndexMask::from_bools(), blender::exec_mode::grain_size(), PRF_scope, and vert_selection_from_edge().
Referenced by blender::geometry::BevelState::BevelState(), blender::ed::transform::calc_target_elems(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_edges(), blender::nodes::node_geo_scale_elements_cc::gather_edge_islands(), split_edges(), and vert_selection_from_edge().
| IndexMask blender::geometry::vert_selection_from_face | ( | OffsetIndices< int > | faces, |
| const IndexMask & | face_mask, | ||
| Span< int > | corner_verts, | ||
| int | verts_num, | ||
| IndexMaskMemory & | memory ) |
A vertex is selected if it is used by a selected face.
Definition at line 49 of file mesh_selection.cc.
References mapped_corner_selection_from_face(), and vert_selection_from_face().
Referenced by blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::nodes::node_geo_scale_elements_cc::gather_face_islands(), and vert_selection_from_face().
|
static |
Build the context weld faces and the corner links for them.
Definition at line 336 of file mesh_merge_verts.cc.
References blender::IndexMask::from_predicate(), blender::offset_indices::OffsetIndices< T >::index_range(), blender::geometry::WeldMesh::vert_affected, and weld_face_corner_ctx_alloc().
Referenced by weld_face_corner_ctx_alloc(), and weld_mesh_context_create().
|
static |
Remove corners for collapsed edges from the weld faces, and split faces that contain the same vertex multiple times.
| remaining_edge_ctx_num | Context weld edges that won't be destroyed by merging. |
Definition at line 584 of file mesh_merge_verts.cc.
References collapse_weld_face(), blender::geometry::WeldMesh::corner_next, blender::geometry::RemovedFacesAndCorners::corners, blender::geometry::WeldFace::corners_num, blender::geometry::WeldMesh::edge_src_to_target, ELEM_COLLAPSED, blender::geometry::WeldFace::face_dst, blender::geometry::RemovedFacesAndCorners::faces, OUT_OF_CONTEXT, blender::threading::parallel_reduce(), blender::geometry::WeldMesh::removed_corners_num, blender::geometry::WeldMesh::removed_faces_num, weld_face_corner_ctx_setup_collapsed_and_split(), weld_face_split_recursive(), and blender::geometry::WeldMesh::weld_faces.
Referenced by weld_face_corner_ctx_setup_collapsed_and_split(), and weld_mesh_context_create().
|
static |
Definition at line 645 of file mesh_merge_verts.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::geometry::WeldMesh::corner_next, ELEM_DUPLICATE, blender::bke::find_duplicate_faces(), blender::index_mask::IndexMask::foreach_index(), foreach_weld_face_corner(), blender::IndexMask::from_predicate(), blender::exec_mode::grain_size(), blender::MutableSpan< T >::index_range(), blender::geometry::WeldMesh::removed_corners_num, blender::geometry::WeldMesh::removed_faces_num, blender::index_mask::IndexMask::size(), blender::MutableSpan< T >::size(), blender::offset_indices::sum_group_sizes(), blender::offset_indices::OffsetIndices< T >::total_size(), blender::geometry::WeldMesh::vert_src_to_target, weld_face_find_doubles(), and blender::geometry::WeldMesh::weld_faces.
Referenced by weld_face_find_doubles(), and weld_mesh_context_create().
|
static |
Split faces that contain the same vertex multiple times after merging into separate faces.
Definition at line 416 of file mesh_merge_verts.cc.
References blender::BLI_assert(), blender::geometry::WeldFace::corner_end, blender::geometry::WeldMesh::corner_next, blender::geometry::WeldFace::corner_start, blender::geometry::RemovedFacesAndCorners::corners, blender::geometry::WeldFace::corners_num, ELEM_COLLAPSED, blender::geometry::WeldFace::face_dst, blender::geometry::WeldFace::face_src, blender::geometry::RemovedFacesAndCorners::faces, blender::geometry::WeldMesh::new_faces_num, OUT_OF_CONTEXT, blender::geometry::WeldMesh::vert_affected, blender::geometry::WeldMesh::vert_src_to_target, weld_face_split_recursive(), and blender::geometry::WeldMesh::weld_faces.
Referenced by weld_face_corner_ctx_setup_collapsed_and_split(), and weld_face_split_recursive().
|
static |
| vert_affected | The vertices that are part of the merge (see find_affected_verts). |
Definition at line 703 of file mesh_merge_verts.cc.
References blender::Default, blender::geometry::WeldMesh::edge_src_to_target, find_collapsed_and_weld_edges(), find_duplicate_edges(), PRF_scope, blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::geometry::WeldMesh::removed_edges_num, blender::geometry::WeldMesh::removed_verts_num, blender::index_mask::IndexMask::size(), blender::Span< T >::size(), blender::geometry::WeldMesh::vert_affected, blender::geometry::WeldMesh::vert_src_to_target, weld_face_corner_ctx_alloc(), weld_face_corner_ctx_setup_collapsed_and_split(), weld_face_find_doubles(), and weld_mesh_context_create().
Referenced by create_merged_mesh(), and weld_mesh_context_create().
|
static |
The result isn't well defined for a fully reversed direction (the arc would be infinitely far away) or when a neighboring segment has zero length. Use zero radius for those points so their fillet points stay at the original position.
Definition at line 113 of file fillet_curves.cc.
References blender::MutableSpan< T >::index_range(), blender::math::is_zero(), blender::IndexRange::last(), and zero_degenerate_radii().
Referenced by fillet_curves(), and zero_degenerate_radii().
|
static |
Definition at line 4695 of file uv_parametrizer.cc.
Referenced by p_chart_correct_degenerate_triangle_point(), p_chart_correct_degenerate_triangles(), and p_chart_correct_degenerate_triangles2().
|
staticconstexpr |
Definition at line 42 of file add_curves_on_mesh.cc.
Referenced by find_curve_neighbors().
|
staticconstexpr |
Definition at line 117 of file uv_parametrizer.cc.
|
static |
Definition at line 194 of file uv_parametrizer.cc.
Referenced by phash_insert(), and phash_new().