Blender V4.3
BKE_pointcloud.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
12#include <mutex>
13
14#include "BLI_bounds_types.hh"
16#include "BLI_shared_cache.hh"
17
19
20struct Depsgraph;
21struct Main;
22struct Object;
23struct PointCloud;
24struct Scene;
25namespace blender::bke::bake {
26struct BakeMaterialsList;
27}
28
29/* PointCloud datablock */
30extern const char *POINTCLOUD_ATTR_POSITION;
31extern const char *POINTCLOUD_ATTR_RADIUS;
32
33namespace blender::bke {
34
42
44 std::unique_ptr<bake::BakeMaterialsList> bake_materials;
45
46 MEM_CXX_CLASS_ALLOC_FUNCS("PointCloudRuntime");
47};
48
50
51} // namespace blender::bke
52
53void *BKE_pointcloud_add(Main *bmain, const char *name);
54void *BKE_pointcloud_add_default(Main *bmain, const char *name);
56void BKE_pointcloud_nomain_to_pointcloud(PointCloud *pointcloud_src, PointCloud *pointcloud_dst);
57
58bool BKE_pointcloud_attribute_required(const PointCloud *pointcloud, const char *name);
59
60/* Dependency Graph */
61
63
64void BKE_pointcloud_data_update(Depsgraph *depsgraph, Scene *scene, Object *object);
65
66/* Draw Cache */
67
68enum {
70};
71
72void BKE_pointcloud_batch_cache_dirty_tag(PointCloud *pointcloud, int mode);
74
75extern void (*BKE_pointcloud_batch_cache_dirty_tag_cb)(PointCloud *pointcloud, int mode);
76extern void (*BKE_pointcloud_batch_cache_free_cb)(PointCloud *pointcloud);
PointCloud * BKE_pointcloud_copy_for_eval(const PointCloud *pointcloud_src)
void BKE_pointcloud_nomain_to_pointcloud(PointCloud *pointcloud_src, PointCloud *pointcloud_dst)
const char * POINTCLOUD_ATTR_RADIUS
Definition pointcloud.cc:56
bool BKE_pointcloud_attribute_required(const PointCloud *pointcloud, const char *name)
void BKE_pointcloud_batch_cache_dirty_tag(PointCloud *pointcloud, int mode)
void * BKE_pointcloud_add(Main *bmain, const char *name)
void BKE_pointcloud_batch_cache_free(PointCloud *pointcloud)
PointCloud * BKE_pointcloud_new_nomain(int totpoint)
void * BKE_pointcloud_add_default(Main *bmain, const char *name)
@ BKE_POINTCLOUD_BATCH_DIRTY_ALL
void BKE_pointcloud_data_update(Depsgraph *depsgraph, Scene *scene, Object *object)
const char * POINTCLOUD_ATTR_POSITION
Definition pointcloud.cc:55
void(* BKE_pointcloud_batch_cache_free_cb)(PointCloud *pointcloud)
void(* BKE_pointcloud_batch_cache_dirty_tag_cb)(PointCloud *pointcloud, int mode)
const Depsgraph * depsgraph
PointCloud * pointcloud_new_no_attributes(int totpoint)
MEM_CXX_CLASS_ALLOC_FUNCS("PointCloudRuntime")
std::unique_ptr< bake::BakeMaterialsList > bake_materials
SharedCache< Bounds< float3 > > bounds_cache