81 &pointcloud_dst->
pdata,
101 for (
int i = 0; i < pointcloud->
totcol; i++) {
126 if (pointcloud->
adt) {
147 for (
int a = 0;
a < pointcloud->
totcol;
a++) {
155 for (
int a = 0;
a < pointcloud->
totcol;
a++) {
206 for (
const int i :
positions.span.index_range()) {
274 if (!(
radii.is_single() &&
radii.get_internal_single() == 0.0f)) {
337 pointcloud_dst->
totpoint = totpoint;
341 return pointcloud_dst;
375 for (; md; md = md->
next) {
396 if (pointcloud !=
nullptr) {
421 if (pointcloud_eval ==
nullptr) {
426 const bool eval_is_owned = pointcloud_eval != pointcloud;
428 object->runtime.geometry_set_eval =
new GeometrySet(std::move(geometry_set));
void BKE_animdata_free(struct ID *id, bool do_id_user)
void BKE_animdata_blend_read_data(struct BlendDataReader *reader, struct AnimData *adt)
void BKE_animdata_blend_write(struct BlendWriter *writer, struct AnimData *adt)
CustomData interface, see also DNA_customdata_types.h.
void CustomData_free(struct CustomData *data, int totelem)
void CustomData_blend_read(struct BlendDataReader *reader, struct CustomData *data, int count)
void CustomData_copy(const struct CustomData *source, struct CustomData *dest, eCustomDataMask mask, eCDAllocType alloctype, int totelem)
void * CustomData_add_layer_named(struct CustomData *data, int type, eCDAllocType alloctype, void *layer, int totelem, const char *name)
void CustomData_realloc(struct CustomData *data, int totelem)
void CustomData_reset(struct CustomData *data)
const char * BKE_idtype_idcode_to_name(short idcode)
@ IDTYPE_FLAGS_APPEND_IS_REUSABLE
@ LIB_ID_COPY_CD_REFERENCE
struct ID * BKE_id_copy_ex(struct Main *bmain, const struct ID *id, struct ID **r_newid, int flag)
void * BKE_libblock_alloc(struct Main *bmain, short type, const char *name, int flag) ATTR_WARN_UNUSED_RESULT
void * BKE_id_new_nomain(short type, const char *name)
void BKE_id_blend_write(struct BlendWriter *writer, struct ID *id)
void * BKE_id_new(struct Main *bmain, short type, const char *name)
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(_data, _id_super, _cb_flag)
const ModifierTypeInfo * BKE_modifier_get_info(ModifierType type)
bool BKE_modifier_is_enabled(const struct Scene *scene, struct ModifierData *md, int required_mode)
struct ModifierData * BKE_modifiers_get_virtual_modifierlist(const struct Object *ob, struct VirtualModifierData *data)
void BKE_modifiers_clear_errors(struct Object *ob)
General operations, lookup, etc. for blender objects.
void BKE_boundbox_init_from_minmax(struct BoundBox *bb, const float min[3], const float max[3])
void BKE_object_free_derived_caches(struct Object *ob)
void BKE_object_eval_assign_data(struct Object *object, struct ID *data, bool is_owned)
General operations for point clouds.
MINLINE void copy_v3_v3(float r[3], const float a[3])
void BLI_rng_free(struct RNG *rng) ATTR_NONNULL(1)
struct RNG * BLI_rng_new(unsigned int seed)
float BLI_rng_get_float(struct RNG *rng) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define STRNCPY(dst, src)
#define INIT_MINMAX(min, max)
#define MEMCMP_STRUCT_AFTER_IS_ZERO(struct_var, member)
#define MEMCPY_STRUCT_AFTER(struct_dst, struct_src, member)
#define BLO_read_data_address(reader, ptr_p)
#define BLO_write_id_struct(writer, struct_name, id_address, id)
#define BLO_read_id_address(reader, lib, id_ptr_p)
#define BLO_expand(expander, id)
void BLO_read_pointer_array(BlendDataReader *reader, void **ptr_p)
void BLO_write_pointer_array(BlendWriter *writer, uint num, const void *data_ptr)
#define BLT_I18NCONTEXT_ID_POINTCLOUD
struct Depsgraph Depsgraph
eEvaluationMode DEG_get_mode(const Depsgraph *graph)
#define DNA_struct_default_get(struct_name)
Object is a sort of wrapper for general info.
struct PointCloud PointCloud
Read Guarded memory(de)allocation.
void replace(PointCloud *pointcloud, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
GVArray lookup_or_default(const AttributeIDRef &attribute_id, const eAttrDomain domain, const eCustomDataType data_type, const void *default_value=nullptr) const
GSpanAttributeWriter lookup_or_add_for_write_only_span(const AttributeIDRef &attribute_id, const eAttrDomain domain, const eCustomDataType data_type)
void CustomData_blend_write(BlendWriter *writer, CustomData *data, Span< CustomDataLayer > layers_to_write, int count, eCustomDataMask cddata_mask, ID *id)
void CustomData_blend_write_prepare(CustomData &data, Vector< CustomDataLayer, 16 > &layers_to_write)
const Depsgraph * depsgraph
SyclQueue void void size_t num_bytes void
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
AttributeAccessor pointcloud_attributes(const PointCloud &pointcloud)
MutableAttributeAccessor pointcloud_attributes_for_write(PointCloud &pointcloud)
static std::optional< MinMaxResult< T > > min_max(Span< T > values)
static std::optional< MinMaxResult< T > > min_max_with_radii(Span< T > values, Span< RadiusT > radii)
T min(const T &a, const T &b)
T max(const T &a, const T &b)
vec_base< float, 3 > float3
MutableSpan< float3 > positions
MutableSpan< float > radii
bool BKE_pointcloud_minmax(const PointCloud *pointcloud, float r_min[3], float r_max[3])
void BKE_pointcloud_data_update(struct Depsgraph *depsgraph, struct Scene *scene, Object *object)
static void pointcloud_init_data(ID *id)
static void pointcloud_evaluate_modifiers(struct Depsgraph *depsgraph, struct Scene *scene, Object *object, GeometrySet &geometry_set)
static void pointcloud_free_data(ID *id)
static void pointcloud_foreach_id(ID *id, LibraryForeachIDData *data)
const char * POINTCLOUD_ATTR_RADIUS
static void pointcloud_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_src, const int flag)
PointCloud * BKE_pointcloud_new_for_eval(const PointCloud *pointcloud_src, int totpoint)
void BKE_pointcloud_batch_cache_dirty_tag(PointCloud *pointcloud, int mode)
void BKE_pointcloud_batch_cache_free(PointCloud *pointcloud)
static PointCloud * take_pointcloud_ownership_from_geometry_set(GeometrySet &geometry_set)
BoundBox * BKE_pointcloud_boundbox_get(Object *ob)
PointCloud * BKE_pointcloud_copy_for_eval(struct PointCloud *pointcloud_src, bool reference)
void * BKE_pointcloud_add_default(Main *bmain, const char *name)
static std::optional< blender::bounds::MinMaxResult< float3 > > point_cloud_bounds(const PointCloud &pointcloud)
bool BKE_pointcloud_customdata_required(const PointCloud *UNUSED(pointcloud), const char *name)
static void pointcloud_blend_write(BlendWriter *writer, ID *id, const void *id_address)
static void pointcloud_blend_read_lib(BlendLibReader *reader, ID *id)
static void pointcloud_blend_read_data(BlendDataReader *reader, ID *id)
const char * POINTCLOUD_ATTR_POSITION
static void pointcloud_random(PointCloud *pointcloud)
PointCloud * BKE_pointcloud_new_nomain(const int totpoint)
void(* BKE_pointcloud_batch_cache_free_cb)(PointCloud *pointcloud)
void * BKE_pointcloud_add(Main *bmain, const char *name)
void(* BKE_pointcloud_batch_cache_dirty_tag_cb)(PointCloud *pointcloud, int mode)
static void pointcloud_blend_read_expand(BlendExpander *expander, ID *id)
void remove(const GeometryComponentType component_type)
GeometryComponent & get_component_for_write(GeometryComponentType component_type)
bool has(const GeometryComponentType component_type) const
static GeometrySet create_with_pointcloud(PointCloud *pointcloud, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
bool compute_boundbox_without_instances(blender::float3 *r_min, blender::float3 *r_max) const
struct ModifierData * next
void(* modifyGeometrySet)(struct ModifierData *md, const struct ModifierEvalContext *ctx, struct GeometrySet *geometry_set)
struct GeometrySet * geometry_set_eval