Blender
V4.5
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
58
struct
AttributeStorage
attribute_storage
;
59
60
/* Custom Data */
61
struct
CustomData
pdata
;
63
int
attributes_active_index
;
64
int
_pad4
;
65
66
/* Material */
67
struct
Material
**
mat
;
68
short
totcol
;
69
short
_pad3
[3];
70
71
#ifdef __cplusplus
72
blender::Span<blender::float3>
positions()
const
;
73
blender::MutableSpan<blender::float3>
positions_for_write();
74
75
blender::VArray<float>
radius()
const
;
76
blender::MutableSpan<float>
radius_for_write();
77
78
blender::bke::AttributeAccessor
attributes
()
const
;
79
blender::bke::MutableAttributeAccessor
attributes_for_write();
80
81
void
tag_positions_changed();
82
void
tag_radii_changed();
83
84
std::optional<blender::Bounds<blender::float3>> bounds_min_max(
bool
use_radius =
true
)
const
;
85
87
std::optional<int> material_index_max()
const
;
88
89
blender::bke::BVHTreeFromPointCloud
bvh_tree()
const
;
90
91
void
count_memory(
blender::MemoryCounter
&memory)
const
;
92
#endif
93
94
PointCloudRuntimeHandle
*
runtime
;
95
96
/* Draw Cache */
97
void
*
batch_cache
;
98
}
PointCloud
;
99
101
enum
{
102
PT_DS_EXPAND
= (1 << 0),
103
};
104
105
/* Only one material supported currently. */
106
#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:122
ID_PT
@ ID_PT
Definition
DNA_ID_enums.h:160
DNA_attribute_types.h
DNA_customdata_types.h
PT_DS_EXPAND
@ PT_DS_EXPAND
Definition
DNA_pointcloud_types.h:102
PointCloudRuntimeHandle
struct PointCloudRuntimeHandle PointCloudRuntimeHandle
Definition
DNA_pointcloud_types.h:37
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:798
blender::bke::AttributeAccessor
Definition
BKE_attribute.hh:525
blender::bke::MutableAttributeAccessor
Definition
BKE_attribute.hh:730
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:404
Material
Definition
DNA_material_types.h:164
PointCloud
Definition
DNA_pointcloud_types.h:40
PointCloud::batch_cache
void * batch_cache
Definition
DNA_pointcloud_types.h:97
PointCloud::mat
struct Material ** mat
Definition
DNA_pointcloud_types.h:67
PointCloud::PointCloud
PointCloud()
Definition
scene/pointcloud.cpp:92
PointCloud::totcol
short totcol
Definition
DNA_pointcloud_types.h:68
PointCloud::_pad3
short _pad3[3]
Definition
DNA_pointcloud_types.h:69
PointCloud::totpoint
int totpoint
Definition
DNA_pointcloud_types.h:52
PointCloud::attributes_active_index
int attributes_active_index
Definition
DNA_pointcloud_types.h:63
PointCloud::_pad4
int _pad4
Definition
DNA_pointcloud_types.h:64
PointCloud::id
ID id
Definition
DNA_pointcloud_types.h:46
PointCloud::runtime
PointCloudRuntimeHandle * runtime
Definition
DNA_pointcloud_types.h:94
PointCloud::attribute_storage
struct AttributeStorage attribute_storage
Definition
DNA_pointcloud_types.h:58
PointCloud::flag
int flag
Definition
DNA_pointcloud_types.h:49
PointCloud::adt
struct AnimData * adt
Definition
DNA_pointcloud_types.h:47
PointCloud::pdata
struct CustomData pdata
Definition
DNA_pointcloud_types.h:61
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