2022-02-10 23:07:11 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2020-03-17 14:41:48 +01:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-03-20 02:19:09 +01:00
|
|
|
/** \file
|
|
|
|
* \ingroup bke
|
2021-12-13 06:00:39 +01:00
|
|
|
* \brief General operations for point clouds.
|
2020-03-17 14:41:48 +01:00
|
|
|
*/
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
struct BoundBox;
|
2020-08-04 12:52:04 +02:00
|
|
|
struct CustomDataLayer;
|
2020-03-17 14:41:48 +01:00
|
|
|
struct Depsgraph;
|
|
|
|
struct Main;
|
|
|
|
struct Object;
|
|
|
|
struct PointCloud;
|
|
|
|
struct Scene;
|
|
|
|
|
2020-04-09 18:49:40 +02:00
|
|
|
/* PointCloud datablock */
|
|
|
|
extern const char *POINTCLOUD_ATTR_POSITION;
|
|
|
|
extern const char *POINTCLOUD_ATTR_RADIUS;
|
|
|
|
|
2020-03-17 14:41:48 +01:00
|
|
|
void *BKE_pointcloud_add(struct Main *bmain, const char *name);
|
2020-04-09 18:49:40 +02:00
|
|
|
void *BKE_pointcloud_add_default(struct Main *bmain, const char *name);
|
2022-01-07 01:38:08 +01:00
|
|
|
struct PointCloud *BKE_pointcloud_new_nomain(int totpoint);
|
2022-09-15 15:21:25 +02:00
|
|
|
void BKE_pointcloud_nomain_to_pointcloud(struct PointCloud *pointcloud_src,
|
|
|
|
struct PointCloud *pointcloud_dst,
|
|
|
|
bool take_ownership);
|
2020-03-17 14:41:48 +01:00
|
|
|
|
|
|
|
struct BoundBox *BKE_pointcloud_boundbox_get(struct Object *ob);
|
2021-12-29 16:27:24 +01:00
|
|
|
bool BKE_pointcloud_minmax(const struct PointCloud *pointcloud, float r_min[3], float r_max[3]);
|
2020-03-17 14:41:48 +01:00
|
|
|
|
2022-06-08 10:42:21 +02:00
|
|
|
bool BKE_pointcloud_customdata_required(const struct PointCloud *pointcloud, const char *name);
|
2020-03-17 14:41:48 +01:00
|
|
|
|
|
|
|
/* Dependency Graph */
|
|
|
|
|
|
|
|
struct PointCloud *BKE_pointcloud_copy_for_eval(struct PointCloud *pointcloud_src, bool reference);
|
|
|
|
|
|
|
|
void BKE_pointcloud_data_update(struct Depsgraph *depsgraph,
|
|
|
|
struct Scene *scene,
|
|
|
|
struct Object *object);
|
|
|
|
|
|
|
|
/* Draw Cache */
|
|
|
|
|
|
|
|
enum {
|
|
|
|
BKE_POINTCLOUD_BATCH_DIRTY_ALL = 0,
|
|
|
|
};
|
|
|
|
|
2020-10-09 07:25:43 +02:00
|
|
|
void BKE_pointcloud_batch_cache_dirty_tag(struct PointCloud *pointcloud, int mode);
|
2020-03-17 14:41:48 +01:00
|
|
|
void BKE_pointcloud_batch_cache_free(struct PointCloud *pointcloud);
|
|
|
|
|
2020-10-09 07:25:43 +02:00
|
|
|
extern void (*BKE_pointcloud_batch_cache_dirty_tag_cb)(struct PointCloud *pointcloud, int mode);
|
2020-03-17 14:41:48 +01:00
|
|
|
extern void (*BKE_pointcloud_batch_cache_free_cb)(struct PointCloud *pointcloud);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|