Blender
V5.3
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
#include <optional>
16
17
#include "
BLI_bounds_types.hh
"
18
#include "
BLI_enum_flags.hh
"
19
#include "
BLI_math_quaternion_types.hh
"
20
#include "
BLI_math_vector_types.hh
"
21
#include "
BLI_memory_counter_fwd.hh
"
22
#include "
BLI_span.hh
"
23
#include "
BLI_virtual_array_fwd.hh
"
24
25
namespace
blender
{
26
27
template
<
typename
T>
class
Span
;
28
namespace
bke
{
29
class
AttributeAccessor
;
30
class
MutableAttributeAccessor
;
31
struct
PointCloudRuntime
;
32
namespace
bvh
{
33
class
Tree
;
34
}
35
}
// namespace bke
36
37
namespace
draw
{
38
struct
PointCloudBatchCache
;
39
struct
GSplatBatchCache
;
40
}
// namespace draw
41
43
enum
ePointCloud_Flag
:
int
{
44
PT_DS_EXPAND
= (1 << 0),
45
};
46
ENUM_OPERATORS
(
ePointCloud_Flag
)
47
48
enum class
PointCloudType
:
short
{
49
Points
= 0,
50
GSplat
= 1,
51
};
52
53
struct
PointCloud
{
54
#ifdef __cplusplus
56
static
constexpr
ID_Type
id_type =
ID_PT
;
57
#endif
58
59
ID
id
;
60
struct
AnimData
*
adt
=
nullptr
;
/* animation data (must be immediately after id) */
61
62
PointCloudType
type
=
PointCloudType::Points
;
63
short
_pad1
[3] = {};
64
65
ePointCloud_Flag
flag
= {};
66
67
/* Geometry */
68
int
totpoint
= 0;
69
71
struct
AttributeStorage
attribute_storage
;
72
73
/* Custom Data */
74
struct
CustomData
pdata_legacy
;
76
int
attributes_active_index
= -1;
77
int
_pad4
= {};
78
79
/* Material */
80
struct
Material
**
mat
=
nullptr
;
81
short
totcol
= 0;
82
short
_pad3
[3] = {};
83
84
#ifdef __cplusplus
85
Span<float3>
positions()
const
;
86
MutableSpan<float3>
positions_for_write();
87
88
VArray<float>
radius()
const
;
89
MutableSpan<float>
radius_for_write();
90
91
bke::AttributeAccessor
attributes()
const
;
92
bke::MutableAttributeAccessor
attributes_for_write();
93
94
void
tag_positions_changed();
95
void
tag_radii_changed();
96
97
std::optional<Bounds<float3>> bounds_min_max(
bool
use_radius =
true
)
const
;
98
100
std::optional<int> material_index_max()
const
;
101
103
const
bke::bvh::Tree
&bvh_tree()
const
;
104
105
void
count_memory(
MemoryCounter
&memory)
const
;
106
#endif
107
108
bke::PointCloudRuntime
*
runtime
=
nullptr
;
109
110
/* Draw Caches */
111
draw::PointCloudBatchCache
*
pointcloud_batch_cache
=
nullptr
;
112
draw::GSplatBatchCache
*
gsplat_batch_cache
=
nullptr
;
113
};
114
115
/* Only one material supported currently. */
116
#define POINTCLOUD_MATERIAL_NR 1
117
118
}
// namespace blender
BLI_bounds_types.hh
BLI_enum_flags.hh
ENUM_OPERATORS
#define ENUM_OPERATORS(_enum_type)
Definition
BLI_enum_flags.hh:35
BLI_math_quaternion_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.
DNA_attribute_types.h
DNA_customdata_types.h
blender::MutableSpan
Definition
BLI_span.hh:447
blender::Span
Definition
BLI_span.hh:74
blender::VArray
Definition
BLI_virtual_array.hh:725
blender::bke::AttributeAccessor
Definition
BKE_attribute.hh:493
blender::bke::AttributeStorage
Definition
BKE_attribute_storage.hh:140
blender::bke::MutableAttributeAccessor
Definition
BKE_attribute.hh:707
blender::bke::bvh::Tree
Definition
BKE_bvh.hh:73
blender::memory_counter::MemoryCounter
Definition
BLI_memory_counter.hh:39
blender::bke::bvh
Definition
BKE_bvh.hh:26
blender::bke
Definition
AS_asset_library.hh:32
blender::draw
Definition
BKE_grease_pencil.hh:34
blender::draw::IBOType::Points
@ Points
Definition
draw_cache_extract.hh:129
blender
BMesh Iterators.
Definition
ANIM_action.hh:30
blender::ID_Type
ID_Type
Definition
DNA_ID_enums.h:136
blender::ID_PT
@ ID_PT
Definition
DNA_ID_enums.h:173
blender::ePointCloud_Flag
ePointCloud_Flag
Definition
DNA_pointcloud_types.h:43
blender::PT_DS_EXPAND
@ PT_DS_EXPAND
Definition
DNA_pointcloud_types.h:44
blender::PointCloudType
PointCloudType
Definition
DNA_pointcloud_types.h:48
blender::PointCloudType::GSplat
@ GSplat
Definition
DNA_pointcloud_types.h:50
blender::PointCloudType::Points
@ Points
Definition
DNA_pointcloud_types.h:49
blender::AnimData
Definition
DNA_anim_types.h:706
blender::CustomData
Definition
DNA_customdata_types.h:249
blender::ID
Definition
DNA_ID.h:415
blender::PointCloud
Definition
DNA_pointcloud_types.h:53
blender::PointCloud::type
PointCloudType type
Definition
DNA_pointcloud_types.h:62
blender::PointCloud::flag
ePointCloud_Flag flag
Definition
DNA_pointcloud_types.h:65
blender::PointCloud::attributes_active_index
int attributes_active_index
Definition
DNA_pointcloud_types.h:76
blender::PointCloud::gsplat_batch_cache
draw::GSplatBatchCache * gsplat_batch_cache
Definition
DNA_pointcloud_types.h:112
blender::PointCloud::pdata_legacy
struct CustomData pdata_legacy
Definition
DNA_pointcloud_types.h:74
blender::PointCloud::id
ID id
Definition
DNA_pointcloud_types.h:59
blender::PointCloud::_pad4
int _pad4
Definition
DNA_pointcloud_types.h:77
blender::PointCloud::runtime
bke::PointCloudRuntime * runtime
Definition
DNA_pointcloud_types.h:108
blender::PointCloud::_pad3
short _pad3[3]
Definition
DNA_pointcloud_types.h:82
blender::PointCloud::mat
struct Material ** mat
Definition
DNA_pointcloud_types.h:80
blender::PointCloud::adt
struct AnimData * adt
Definition
DNA_pointcloud_types.h:60
blender::PointCloud::pointcloud_batch_cache
draw::PointCloudBatchCache * pointcloud_batch_cache
Definition
DNA_pointcloud_types.h:111
blender::PointCloud::totcol
short totcol
Definition
DNA_pointcloud_types.h:81
blender::PointCloud::attribute_storage
struct AttributeStorage attribute_storage
Definition
DNA_pointcloud_types.h:71
blender::PointCloud::_pad1
short _pad1[3]
Definition
DNA_pointcloud_types.h:63
blender::PointCloud::totpoint
int totpoint
Definition
DNA_pointcloud_types.h:68
blender::bke::PointCloudRuntime
Definition
BKE_pointcloud.hh:36
blender::draw::GSplatBatchCache
Definition
draw_cache_impl_gsplat.cc:508
blender::draw::PointCloudBatchCache
Definition
draw_cache_impl_pointcloud.cc:79
blender::eevee::Material
Definition
eevee_material.hh:328
Generated on
for Blender by
doxygen
1.18.0