Blender  V2.93
Namespaces | Functions | Variables
node_geo_point_distribute.cc File Reference
#include "BLI_hash.h"
#include "BLI_kdtree.h"
#include "BLI_rand.hh"
#include "BLI_timeit.hh"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_pointcloud_types.h"
#include "BKE_attribute_math.hh"
#include "BKE_bvhutils.h"
#include "BKE_geometry_set_instances.hh"
#include "BKE_mesh.h"
#include "BKE_mesh_runtime.h"
#include "BKE_pointcloud.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "node_geometry_util.hh"

Go to the source code of this file.

Namespaces

 blender
 
 blender::nodes
 

Functions

static void geo_node_point_distribute_layout (uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
 
static void node_point_distribute_update (bNodeTree *UNUSED(ntree), bNode *node)
 
static float3 blender::nodes::normal_to_euler_rotation (const float3 normal)
 
static Span< MLoopTriblender::nodes::get_mesh_looptris (const Mesh &mesh)
 
static void blender::nodes::sample_mesh_surface (const Mesh &mesh, const float4x4 &transform, const float base_density, const FloatReadAttribute *density_factors, const int seed, Vector< float3 > &r_positions, Vector< float3 > &r_bary_coords, Vector< int > &r_looptri_indices)
 
static BLI_NOINLINE KDTree_3d * blender::nodes::build_kdtree (Span< Vector< float3 >> positions_all, const int initial_points_len)
 
static BLI_NOINLINE void blender::nodes::update_elimination_mask_for_close_points (Span< Vector< float3 >> positions_all, Span< int > instance_start_offsets, const float minimum_distance, MutableSpan< bool > elimination_mask, const int initial_points_len)
 
static BLI_NOINLINE void blender::nodes::update_elimination_mask_based_on_density_factors (const Mesh &mesh, const FloatReadAttribute &density_factors, Span< float3 > bary_coords, Span< int > looptri_indices, MutableSpan< bool > elimination_mask)
 
static BLI_NOINLINE void blender::nodes::eliminate_points_based_on_mask (Span< bool > elimination_mask, Vector< float3 > &positions, Vector< float3 > &bary_coords, Vector< int > &looptri_indices)
 
template<typename T >
static BLI_NOINLINE void blender::nodes::interpolate_attribute_point (const Mesh &mesh, const Span< float3 > bary_coords, const Span< int > looptri_indices, const Span< T > data_in, MutableSpan< T > data_out)
 
template<typename T >
static BLI_NOINLINE void blender::nodes::interpolate_attribute_corner (const Mesh &mesh, const Span< float3 > bary_coords, const Span< int > looptri_indices, const Span< T > data_in, MutableSpan< T > data_out)
 
template<typename T >
static BLI_NOINLINE void blender::nodes::interpolate_attribute_face (const Mesh &mesh, const Span< int > looptri_indices, const Span< T > data_in, MutableSpan< T > data_out)
 
template<typename T >
static BLI_NOINLINE void blender::nodes::interpolate_attribute (const Mesh &mesh, Span< float3 > bary_coords, Span< int > looptri_indices, const AttributeDomain source_domain, Span< T > source_span, MutableSpan< T > output_span)
 
static BLI_NOINLINE void blender::nodes::interpolate_existing_attributes (Span< GeometryInstanceGroup > set_groups, Span< int > instance_start_offsets, const Map< std::string, AttributeKind > &attributes, GeometryComponent &component, Span< Vector< float3 >> bary_coords_array, Span< Vector< int >> looptri_indices_array)
 
static BLI_NOINLINE void blender::nodes::compute_special_attributes (Span< GeometryInstanceGroup > sets, Span< int > instance_start_offsets, GeometryComponent &component, Span< Vector< float3 >> bary_coords_array, Span< Vector< int >> looptri_indices_array)
 
static BLI_NOINLINE void blender::nodes::add_remaining_point_attributes (Span< GeometryInstanceGroup > set_groups, Span< int > instance_start_offsets, const Map< std::string, AttributeKind > &attributes, GeometryComponent &component, Span< Vector< float3 >> bary_coords_array, Span< Vector< int >> looptri_indices_array)
 
static void blender::nodes::distribute_points_random (Span< GeometryInstanceGroup > set_groups, const StringRef density_attribute_name, const float density, const int seed, MutableSpan< Vector< float3 >> positions_all, MutableSpan< Vector< float3 >> bary_coords_all, MutableSpan< Vector< int >> looptri_indices_all)
 
static void blender::nodes::distribute_points_poisson_disk (Span< GeometryInstanceGroup > set_groups, const StringRef density_attribute_name, const float density, const int seed, const float minimum_distance, MutableSpan< Vector< float3 >> positions_all, MutableSpan< Vector< float3 >> bary_coords_all, MutableSpan< Vector< int >> looptri_indices_all)
 
static void blender::nodes::geo_node_point_distribute_exec (GeoNodeExecParams params)
 
void register_node_type_geo_point_distribute ()
 

Variables

static bNodeSocketTemplate geo_node_point_distribute_in []
 
static bNodeSocketTemplate geo_node_point_distribute_out []
 

Function Documentation

◆ geo_node_point_distribute_layout()

static void geo_node_point_distribute_layout ( uiLayout layout,
bContext UNUSEDC,
PointerRNA ptr 
)
static

Definition at line 55 of file node_geo_point_distribute.cc.

References ptr, and uiItemR().

Referenced by register_node_type_geo_point_distribute().

◆ node_point_distribute_update()

static void node_point_distribute_update ( bNodeTree UNUSEDntree,
bNode node 
)
static

◆ register_node_type_geo_point_distribute()

void register_node_type_geo_point_distribute ( void  )

Variable Documentation

◆ geo_node_point_distribute_in

bNodeSocketTemplate geo_node_point_distribute_in[]
static
Initial value:
= {
{SOCK_GEOMETRY, N_("Geometry")},
{SOCK_FLOAT, N_("Distance Min"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 100000.0f, PROP_DISTANCE},
{SOCK_FLOAT, N_("Density Max"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 100000.0f, PROP_NONE},
{SOCK_STRING, N_("Density Attribute")},
{SOCK_INT, N_("Seed"), 0, 0, 0, 0, -10000, 10000},
{-1, ""},
}
#define N_(msgid)
@ SOCK_INT
@ SOCK_FLOAT
@ SOCK_GEOMETRY
@ SOCK_STRING
@ PROP_DISTANCE
Definition: RNA_types.h:135
@ PROP_NONE
Definition: RNA_types.h:113

Definition at line 41 of file node_geo_point_distribute.cc.

Referenced by register_node_type_geo_point_distribute().

◆ geo_node_point_distribute_out

bNodeSocketTemplate geo_node_point_distribute_out[]
static
Initial value:
= {
{SOCK_GEOMETRY, N_("Geometry")},
{-1, ""},
}

Definition at line 50 of file node_geo_point_distribute.cc.

Referenced by register_node_type_geo_point_distribute().