Blender
V4.3
source
blender
geometry
GEO_mesh_to_volume.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
7
#include "
BLI_bounds.hh
"
8
#include "
BLI_function_ref.hh
"
9
#include "
BLI_math_matrix_types.hh
"
10
#include "
BLI_math_vector_types.hh
"
11
#include "
BLI_span.hh
"
12
#include "
BLI_string_ref.hh
"
13
14
#include "
DNA_modifier_types.h
"
15
16
#include "
BKE_volume_grid_fwd.hh
"
17
18
struct
Depsgraph;
19
struct
Volume
;
20
25
namespace
blender::geometry
{
26
27
struct
MeshToVolumeResolution
{
28
MeshToVolumeModifierResolutionMode
mode
;
29
union
{
30
float
voxel_size
;
31
float
voxel_amount
;
32
}
settings
;
33
};
34
35
#ifdef WITH_OPENVDB
36
41
float
volume_compute_voxel_size(
const
Depsgraph *
depsgraph
,
42
FunctionRef
<
Bounds<float3>
()> bounds_fn,
43
MeshToVolumeResolution resolution,
44
float
exterior_band_width,
45
const
float4x4
&transform);
49
bke::VolumeGridData *fog_volume_grid_add_from_mesh(
Volume
*volume,
50
StringRefNull
name,
51
Span<float3>
positions,
52
Span<int>
corner_verts,
53
Span<int3>
corner_tris,
54
const
float4x4
&mesh_to_volume_space_transform,
55
float
voxel_size,
56
float
interior_band_width,
57
float
density);
58
59
bke::VolumeGrid<float>
mesh_to_density_grid(
const
Span<float3>
positions,
60
const
Span<int>
corner_verts,
61
const
Span<int3>
corner_tris,
62
const
float
voxel_size,
63
const
float
interior_band_width,
64
const
float
density);
65
66
bke::VolumeGrid<float>
mesh_to_sdf_grid(
Span<float3>
positions,
67
Span<int>
corner_verts,
68
Span<int3>
corner_tris,
69
float
voxel_size,
70
float
half_band_width);
71
72
#endif
73
}
// namespace blender::geometry
BKE_volume_grid_fwd.hh
BLI_bounds.hh
BLI_function_ref.hh
BLI_math_matrix_types.hh
BLI_math_vector_types.hh
BLI_span.hh
BLI_string_ref.hh
DNA_modifier_types.h
MeshToVolumeModifierResolutionMode
MeshToVolumeModifierResolutionMode
Definition
DNA_modifier_types.h:2563
blender::FunctionRef
Definition
BLI_function_ref.hh:74
blender::Span
Definition
BLI_span.hh:75
blender::StringRefNull
Definition
BLI_string_ref.hh:111
blender::bke::volume_grid::VolumeGrid
Definition
BKE_volume_grid_fwd.hh:40
depsgraph
const Depsgraph * depsgraph
Definition
deg_eval_copy_on_write.cc:494
blender::geometry
Definition
GEO_add_curves_on_mesh.hh:17
Volume
Definition
DNA_volume_types.h:42
blender::Bounds
Definition
BLI_bounds_types.hh:13
blender::MatBase< float, 4, 4 >
blender::geometry::MeshToVolumeResolution
Definition
GEO_mesh_to_volume.hh:27
blender::geometry::MeshToVolumeResolution::voxel_amount
float voxel_amount
Definition
GEO_mesh_to_volume.hh:31
blender::geometry::MeshToVolumeResolution::voxel_size
float voxel_size
Definition
GEO_mesh_to_volume.hh:30
blender::geometry::MeshToVolumeResolution::mode
MeshToVolumeModifierResolutionMode mode
Definition
GEO_mesh_to_volume.hh:28
blender::geometry::MeshToVolumeResolution::settings
union blender::geometry::MeshToVolumeResolution::@604 settings
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0