Blender
V5.0
source
blender
makesdna
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
8
9
#pragma once
10
11
#include "
DNA_ID.h
"
12
#include "
DNA_attribute_types.h
"
13
#include "
DNA_customdata_types.h
"
14
15
#ifdef __cplusplus
16
# include <optional>
17
18
# include "
BLI_bounds_types.hh
"
19
# include "
BLI_math_vector_types.hh
"
20
# include "
BLI_memory_counter_fwd.hh
"
21
# include "
BLI_span.hh
"
22
# include "
BLI_virtual_array_fwd.hh
"
23
#endif
24
25
#ifdef __cplusplus
26
namespace
blender
{
27
template
<
typename
T>
class
Span
;
28
namespace
bke
{
29
class
AttributeAccessor
;
30
struct
BVHTreeFromPointCloud
;
31
class
MutableAttributeAccessor
;
32
struct
PointCloudRuntime
;
33
}
// namespace bke
34
}
// namespace blender
35
using
PointCloudRuntimeHandle
=
blender::bke::PointCloudRuntime
;
36
#else
37
typedef
struct
PointCloudRuntimeHandle
PointCloudRuntimeHandle
;
38
#endif
39
40
typedef
struct
PointCloud
{
41
#ifdef __cplusplus
43
static
constexpr
ID_Type
id_type =
ID_PT
;
44
#endif
45
46
ID
id
;
47
struct
AnimData
*
adt
;
/* animation data (must be immediately after id) */
48
49
int
flag
;
50
51
/* Geometry */
52
int
totpoint
;
53
55
struct
AttributeStorage
attribute_storage
;
56
57
/* Custom Data */
58
struct
CustomData
pdata_legacy
;
60
int
attributes_active_index
;
61
int
_pad4
;
62
63
/* Material */
64
struct
Material
**
mat
;
65
short
totcol
;
66
short
_pad3
[3];
67
68
#ifdef __cplusplus
69
blender::Span<blender::float3>
positions()
const
;
70
blender::MutableSpan<blender::float3>
positions_for_write();
71
72
blender::VArray<float>
radius()
const
;
73
blender::MutableSpan<float>
radius_for_write();
74
75
blender::bke::AttributeAccessor
attributes
()
const
;
76
blender::bke::MutableAttributeAccessor
attributes_for_write();
77
78
void
tag_positions_changed();
79
void
tag_radii_changed();
80
81
std::optional<blender::Bounds<blender::float3>> bounds_min_max(
bool
use_radius =
true
)
const
;
82
84
std::optional<int> material_index_max()
const
;
85
86
blender::bke::BVHTreeFromPointCloud
bvh_tree()
const
;
87
88
void
count_memory(
blender::MemoryCounter
&memory)
const
;
89
#endif
90
91
PointCloudRuntimeHandle
*
runtime
;
92
93
/* Draw Cache */
94
void
*
batch_cache
;
95
}
PointCloud
;
96
98
enum
{
99
PT_DS_EXPAND
= (1 << 0),
100
};
101
102
/* Only one material supported currently. */
103
#define POINTCLOUD_MATERIAL_NR 1
BLI_bounds_types.hh
BLI_math_vector_types.hh
BLI_memory_counter_fwd.hh
BLI_span.hh
BLI_virtual_array_fwd.hh
DNA_ID.h
ID and Library types, which are fundamental for SDNA.
ID_Type
ID_Type
Definition
DNA_ID_enums.h:116
ID_PT
@ ID_PT
Definition
DNA_ID_enums.h:153
DNA_attribute_types.h
DNA_customdata_types.h
PointCloudRuntimeHandle
struct PointCloudRuntimeHandle PointCloudRuntimeHandle
Definition
DNA_pointcloud_types.h:37
PT_DS_EXPAND
@ PT_DS_EXPAND
Definition
DNA_pointcloud_types.h:99
Geometry::attributes
AttributeSet attributes
Definition
scene/geometry.h:85
blender::MutableSpan
Definition
BLI_span.hh:443
blender::Span
Definition
BLI_span.hh:74
blender::VArray
Definition
BLI_virtual_array.hh:858
blender::bke::AttributeAccessor
Definition
BKE_attribute.hh:524
blender::bke::MutableAttributeAccessor
Definition
BKE_attribute.hh:729
blender::memory_counter::MemoryCounter
Definition
BLI_memory_counter.hh:39
blender::bke
Definition
AS_asset_library.hh:27
blender
Definition
ANIM_action.hh:36
AnimData
Definition
DNA_anim_types.h:651
AttributeStorage
Definition
DNA_attribute_types.h:56
CustomData
Definition
DNA_customdata_types.h:67
ID
Definition
DNA_ID.h:414
Material
Definition
DNA_material_types.h:163
PointCloud
Definition
DNA_pointcloud_types.h:40
PointCloud::batch_cache
void * batch_cache
Definition
DNA_pointcloud_types.h:94
PointCloud::mat
struct Material ** mat
Definition
DNA_pointcloud_types.h:64
PointCloud::PointCloud
PointCloud()
Definition
scene/pointcloud.cpp:92
PointCloud::totcol
short totcol
Definition
DNA_pointcloud_types.h:65
PointCloud::_pad3
short _pad3[3]
Definition
DNA_pointcloud_types.h:66
PointCloud::totpoint
int totpoint
Definition
DNA_pointcloud_types.h:52
PointCloud::attributes_active_index
int attributes_active_index
Definition
DNA_pointcloud_types.h:60
PointCloud::_pad4
int _pad4
Definition
DNA_pointcloud_types.h:61
PointCloud::id
ID id
Definition
DNA_pointcloud_types.h:46
PointCloud::runtime
PointCloudRuntimeHandle * runtime
Definition
DNA_pointcloud_types.h:91
PointCloud::attribute_storage
struct AttributeStorage attribute_storage
Definition
DNA_pointcloud_types.h:55
PointCloud::flag
int flag
Definition
DNA_pointcloud_types.h:49
PointCloud::adt
struct AnimData * adt
Definition
DNA_pointcloud_types.h:47
PointCloud::pdata_legacy
struct CustomData pdata_legacy
Definition
DNA_pointcloud_types.h:58
blender::bke::BVHTreeFromPointCloud
Definition
BKE_bvhutils.hh:95
blender::bke::PointCloudRuntime
Definition
BKE_pointcloud.hh:31
Generated on
for Blender by
doxygen
1.16.1