Blender
V3.3
|
Functions | |
static void | node_declare (NodeDeclarationBuilder &b) |
static void | node_layout (uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) |
static void | node_point_distribute_points_on_faces_update (bNodeTree *ntree, bNode *node) |
static float3 | normal_to_euler_rotation (const float3 normal) |
static void | sample_mesh_surface (const Mesh &mesh, const float base_density, const Span< float > density_factors, const int seed, Vector< float3 > &r_positions, Vector< float3 > &r_bary_coords, Vector< int > &r_looptri_indices) |
static BLI_NOINLINE KDTree_3d * | build_kdtree (Span< float3 > positions) |
static BLI_NOINLINE void | update_elimination_mask_for_close_points (Span< float3 > positions, const float minimum_distance, MutableSpan< bool > elimination_mask) |
static BLI_NOINLINE void | update_elimination_mask_based_on_density_factors (const Mesh &mesh, const Span< float > density_factors, const Span< float3 > bary_coords, const Span< int > looptri_indices, const MutableSpan< bool > elimination_mask) |
static BLI_NOINLINE void | eliminate_points_based_on_mask (const Span< bool > elimination_mask, Vector< float3 > &positions, Vector< float3 > &bary_coords, Vector< int > &looptri_indices) |
static BLI_NOINLINE void | interpolate_attribute (const Mesh &mesh, const Span< float3 > bary_coords, const Span< int > looptri_indices, const eAttrDomain source_domain, const GVArray &source_data, GMutableSpan output_data) |
static BLI_NOINLINE void | propagate_existing_attributes (const MeshComponent &mesh_component, const Map< AttributeIDRef, AttributeKind > &attributes, GeometryComponent &point_component, const Span< float3 > bary_coords, const Span< int > looptri_indices) |
static BLI_NOINLINE void | compute_attribute_outputs (const MeshComponent &mesh_component, PointCloudComponent &point_component, const Span< float3 > bary_coords, const Span< int > looptri_indices, const AttributeOutputs &attribute_outputs) |
static Array< float > | calc_full_density_factors_with_selection (const MeshComponent &component, const Field< float > &density_field, const Field< bool > &selection_field) |
static void | distribute_points_random (const MeshComponent &component, const Field< float > &density_field, const Field< bool > &selection_field, const int seed, Vector< float3 > &positions, Vector< float3 > &bary_coords, Vector< int > &looptri_indices) |
static void | distribute_points_poisson_disk (const MeshComponent &mesh_component, const float minimum_distance, const float max_density, const Field< float > &density_factor_field, const Field< bool > &selection_field, const int seed, Vector< float3 > &positions, Vector< float3 > &bary_coords, Vector< int > &looptri_indices) |
static void | point_distribution_calculate (GeometrySet &geometry_set, const Field< bool > selection_field, const GeometryNodeDistributePointsOnFacesMode method, const int seed, const AttributeOutputs &attribute_outputs, const GeoNodeExecParams ¶ms) |
static void | node_geo_exec (GeoNodeExecParams params) |
|
static |
Definition at line 149 of file node_geo_distribute_points_on_faces.cc.
References positions.
Referenced by update_elimination_mask_for_close_points().
|
static |
Definition at line 392 of file node_geo_distribute_points_on_faces.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), ATTR_DOMAIN_CORNER, component(), and blender::fn::FieldEvaluator::set_selection().
Referenced by distribute_points_poisson_disk(), and distribute_points_random().
|
static |
Definition at line 329 of file node_geo_distribute_points_on_faces.cc.
References ATTR_DOMAIN_POINT, PointCloudComponent::attributes_for_write(), BKE_mesh_runtime_looptri_ensure(), BKE_mesh_runtime_looptri_len(), MVert::co, blender::bke::SpanAttributeWriter< T >::finish(), MeshComponent::get_for_read(), blender::noise::hash(), blender::noise::hash_float(), blender::Span< T >::index_range(), mesh, Mesh::mloop, Mesh::mvert, normal, normal_to_euler_rotation(), normal_tri_v3(), normals, blender::bke::pointcloud_attributes(), rotations, blender::bke::SpanAttributeWriter< T >::span, MLoopTri::tri, and MLoop::v.
Referenced by point_distribution_calculate().
|
static |
Definition at line 423 of file node_geo_distribute_points_on_faces.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), calc_full_density_factors_with_selection(), eliminate_points_based_on_mask(), MeshComponent::get_for_read(), mesh, positions, sample_mesh_surface(), seed, update_elimination_mask_based_on_density_factors(), and update_elimination_mask_for_close_points().
Referenced by point_distribution_calculate().
|
static |
Definition at line 409 of file node_geo_distribute_points_on_faces.cc.
References calc_full_density_factors_with_selection(), component(), mesh, positions, sample_mesh_surface(), and seed.
Referenced by point_distribution_calculate().
|
static |
Definition at line 233 of file node_geo_distribute_points_on_faces.cc.
References positions, and blender::Vector< T, InlineBufferCapacity, Allocator >::remove_and_reorder().
Referenced by distribute_points_poisson_disk().
|
static |
Definition at line 247 of file node_geo_distribute_points_on_faces.cc.
References ATTR_DOMAIN_CORNER, ATTR_DOMAIN_FACE, ATTR_DOMAIN_POINT, mesh, blender::bke::mesh_surface_sample::sample_corner_attribute(), blender::bke::mesh_surface_sample::sample_face_attribute(), blender::bke::mesh_surface_sample::sample_point_attribute(), and blender::GMutableSpan::size().
Referenced by propagate_existing_attributes().
|
static |
Definition at line 27 of file node_geo_distribute_points_on_faces.cc.
References usdtokens::b(), GEO_COMPONENT_TYPE_MESH, GEO_NODE_POINT_DISTRIBUTE_POINTS_ON_FACES_POISSON, GEO_NODE_POINT_DISTRIBUTE_POINTS_ON_FACES_RANDOM, blender::nodes::SocketDeclaration::make_available(), min, N_, node, PROP_DISTANCE, PROP_EULER, and PROP_FACTOR.
Referenced by register_node_type_geo_distribute_points_on_faces().
|
static |
Definition at line 530 of file node_geo_distribute_points_on_faces.cc.
References GEO_COMPONENT_TYPE_POINT_CLOUD, GeometrySet::keep_only_during_modify(), GeometrySet::modify_geometry_sets(), params, point_distribution_calculate(), and seed.
Referenced by register_node_type_geo_distribute_points_on_faces().
|
static |
Definition at line 65 of file node_geo_distribute_points_on_faces.cc.
References ptr, and uiItemR().
Referenced by register_node_type_geo_distribute_points_on_faces().
|
static |
Definition at line 70 of file node_geo_distribute_points_on_faces.cc.
References BLI_findlink(), GEO_NODE_POINT_DISTRIBUTE_POINTS_ON_FACES_POISSON, GEO_NODE_POINT_DISTRIBUTE_POINTS_ON_FACES_RANDOM, bNodeSocket::next, node, nodeSetSocketAvailability(), and ntree.
Referenced by register_node_type_geo_distribute_points_on_faces().
|
static |
Use an arbitrary choice of axes for a usable rotation attribute directly out of this node.
Definition at line 91 of file node_geo_distribute_points_on_faces.cc.
References normal, OB_NEGZ, OB_POSY, quat_to_eul(), and vec_to_quat().
Referenced by compute_attribute_outputs().
|
static |
Definition at line 449 of file node_geo_distribute_points_on_faces.cc.
References ATTR_DOMAIN_POINT, BKE_pointcloud_new_nomain(), compute_attribute_outputs(), distribute_points_poisson_disk(), distribute_points_random(), blender::bke::SpanAttributeWriter< T >::finish(), GeometrySet::gather_attributes_for_propagation(), GEO_COMPONENT_TYPE_MESH, GEO_COMPONENT_TYPE_POINT_CLOUD, GEO_NODE_POINT_DISTRIBUTE_POINTS_ON_FACES_POISSON, GEO_NODE_POINT_DISTRIBUTE_POINTS_ON_FACES_RANDOM, GeometrySet::get_component_for_read(), GeometrySet::get_component_for_write(), GeometrySet::has_mesh(), params, point_attributes, blender::bke::pointcloud_attributes_for_write(), positions, propagate_existing_attributes(), GeometrySet::replace_pointcloud(), seed, and blender::bke::SpanAttributeWriter< T >::span.
Referenced by node_geo_exec().
|
static |
Definition at line 285 of file node_geo_distribute_points_on_faces.cc.
References ATTR_DOMAIN_POINT, MeshComponent::attributes(), GeometryComponent::attributes_for_write(), blender::bke::GAttributeReader::domain, blender::bke::GSpanAttributeWriter::finish(), MeshComponent::get_for_read(), interpolate_attribute(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), blender::bke::AttributeAccessor::lookup(), mesh, blender::bke::mesh_attributes(), point_attributes, blender::bke::GSpanAttributeWriter::span, and blender::bke::GAttributeReader::varray.
Referenced by point_distribution_calculate().
|
static |
Definition at line 100 of file node_geo_distribute_points_on_faces.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::compositor::area(), area_tri_v3(), BKE_mesh_runtime_looptri_ensure(), BKE_mesh_runtime_looptri_len(), MVert::co, blender::RandomNumberGenerator::get_barycentric_coordinates(), blender::noise::hash(), interp_v3_v3v3v3(), blender::Span< T >::is_empty(), max, mesh, Mesh::mloop, Mesh::mvert, blender::RandomNumberGenerator::round_probabilistic(), seed, MLoopTri::tri, and MLoop::v.
Referenced by distribute_points_poisson_disk(), and distribute_points_random().
|
static |
Definition at line 198 of file node_geo_distribute_points_on_faces.cc.
References BKE_mesh_runtime_looptri_ensure(), BKE_mesh_runtime_looptri_len(), hash, blender::noise::hash_float_to_float(), blender::Span< T >::index_range(), max, mesh, and MLoopTri::tri.
Referenced by distribute_points_poisson_disk().
|
static |
Definition at line 163 of file node_geo_distribute_points_on_faces.cc.
References BLI_SCOPED_DEFER, build_kdtree(), positions, UNUSED, and user_data.
Referenced by distribute_points_poisson_disk().