Blender V4.3
DNA_pointcloud_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "DNA_ID.h"
13
14#ifdef __cplusplus
15# include <optional>
16
17# include "BLI_bounds_types.hh"
20# include "BLI_span.hh"
21#endif
22
23#ifdef __cplusplus
24namespace blender {
25template<typename T> class Span;
26namespace bke {
27class AttributeAccessor;
28class MutableAttributeAccessor;
29struct PointCloudRuntime;
30} // namespace bke
31} // namespace blender
33#else
35#endif
36
37typedef struct PointCloud {
39 struct AnimData *adt; /* animation data (must be immediately after id) */
40
41 int flag;
42
43 /* Geometry */
45
46 /* Custom Data */
50 int _pad4;
51
52 /* Material */
53 struct Material **mat;
54 short totcol;
55 short _pad3[3];
56
57#ifdef __cplusplus
58 blender::Span<blender::float3> positions() const;
59 blender::MutableSpan<blender::float3> positions_for_write();
60
62 blender::bke::MutableAttributeAccessor attributes_for_write();
63
64 void tag_positions_changed();
65 void tag_radii_changed();
66
67 std::optional<blender::Bounds<blender::float3>> bounds_min_max() const;
68
69 void count_memory(blender::MemoryCounter &memory) const;
70#endif
71
73
74 /* Draw Cache */
77
79enum {
80 PT_DS_EXPAND = (1 << 0),
81};
82
83/* Only one material supported currently. */
84#define POINTCLOUD_MATERIAL_NR 1
ID and Library types, which are fundamental for SDNA.
struct PointCloud PointCloud
struct PointCloudRuntimeHandle PointCloudRuntimeHandle
@ PT_DS_EXPAND
AttributeSet attributes
Definition DNA_ID.h:413
struct Material ** mat
PointCloudRuntimeHandle * runtime
struct AnimData * adt
struct CustomData pdata