Blender V5.3
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
10
11#include "BLI_bounds_types.hh"
12#include "BLI_function_ref.hh"
15#include "BLI_span.hh"
16#include "BLI_string_ref.hh"
17
18#include "DNA_modifier_types.h"
19
21
22namespace blender {
23
24struct Depsgraph;
25struct Volume;
26
27namespace geometry {
28
36
37#ifdef WITH_OPENVDB
38
43float volume_compute_voxel_size(const Depsgraph *depsgraph,
44 FunctionRef<Bounds<float3>()> bounds_fn,
45 MeshToVolumeResolution resolution,
46 float exterior_band_width,
47 const float4x4 &transform);
51bke::VolumeGridData *fog_volume_grid_add_from_mesh(Volume *volume,
52 StringRefNull name,
53 Span<float3> positions,
54 Span<int> corner_verts,
55 Span<int3> corner_tris,
56 const float4x4 &mesh_to_volume_space_transform,
57 float voxel_size,
58 float interior_band_width,
59 float density);
60
61bke::VolumeGrid<float> mesh_to_density_grid(const Span<float3> positions,
62 const Span<int> corner_verts,
63 const Span<int3> corner_tris,
64 const float voxel_size,
65 const float interior_band_width,
66 const float density);
67
68bke::VolumeGrid<float> mesh_to_sdf_grid(Span<float3> positions,
69 Span<int> corner_verts,
70 Span<int3> corner_tris,
71 float voxel_size,
72 float half_band_width);
73
74#endif
75} // namespace geometry
76} // namespace blender
BMesh Iterators.
MatBase< float, 4, 4 > float4x4
MeshToVolumeModifierResolutionMode mode
union blender::geometry::MeshToVolumeResolution::@136176125347007140140220107206020355355017357363 settings