Blender  V3.3
Namespaces | Functions
mesh_sample.cc File Reference
#include "BKE_attribute_math.hh"
#include "BKE_bvhutils.h"
#include "BKE_mesh_runtime.h"
#include "BKE_mesh_sample.hh"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "BLI_rand.hh"

Go to the source code of this file.

Namespaces

 blender
 
 blender::bke
 
 blender::bke::mesh_surface_sample
 

Functions

template<typename T >
static BLI_NOINLINE void blender::bke::mesh_surface_sample::sample_point_attribute (const Mesh &mesh, const Span< int > looptri_indices, const Span< float3 > bary_coords, const VArray< T > &data_in, const IndexMask mask, const MutableSpan< T > data_out)
 
void blender::bke::mesh_surface_sample::sample_point_attribute (const Mesh &mesh, Span< int > looptri_indices, Span< float3 > bary_coords, const GVArray &data_in, const IndexMask mask, GMutableSpan data_out)
 
template<typename T >
static BLI_NOINLINE void blender::bke::mesh_surface_sample::sample_corner_attribute (const Mesh &mesh, const Span< int > looptri_indices, const Span< float3 > bary_coords, const VArray< T > &data_in, const IndexMask mask, const MutableSpan< T > data_out)
 
void blender::bke::mesh_surface_sample::sample_corner_attribute (const Mesh &mesh, Span< int > looptri_indices, Span< float3 > bary_coords, const GVArray &data_in, const IndexMask mask, GMutableSpan data_out)
 
template<typename T >
void blender::bke::mesh_surface_sample::sample_face_attribute (const Mesh &mesh, const Span< int > looptri_indices, const VArray< T > &data_in, const IndexMask mask, const MutableSpan< T > data_out)
 
void blender::bke::mesh_surface_sample::sample_face_attribute (const Mesh &mesh, Span< int > looptri_indices, const GVArray &data_in, const IndexMask mask, GMutableSpan data_out)
 
int blender::bke::mesh_surface_sample::sample_surface_points_spherical (RandomNumberGenerator &rng, const Mesh &mesh, Span< int > looptri_indices_to_sample, const float3 &sample_pos, float sample_radius, float approximate_density, Vector< float3 > &r_bary_coords, Vector< int > &r_looptri_indices, Vector< float3 > &r_positions)
 
int blender::bke::mesh_surface_sample::sample_surface_points_projected (RandomNumberGenerator &rng, const Mesh &mesh, BVHTreeFromMesh &mesh_bvhtree, const float2 &sample_pos_re, const float sample_radius_re, const FunctionRef< void(const float2 &pos_re, float3 &r_start, float3 &r_end)> region_position_to_ray, const bool front_face_only, const int tries_num, const int max_points, Vector< float3 > &r_bary_coords, Vector< int > &r_looptri_indices, Vector< float3 > &r_positions)
 
float3 blender::bke::mesh_surface_sample::compute_bary_coord_in_triangle (const Mesh &mesh, const MLoopTri &looptri, const float3 &position)