Blender V4.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
7#include "BLI_bounds.hh"
8#include "BLI_function_ref.hh"
11#include "BLI_span.hh"
12#include "BLI_string_ref.hh"
13
14#include "DNA_modifier_types.h"
15
17
18struct Depsgraph;
19struct Volume;
20
25namespace blender::geometry {
26
34
35#ifdef WITH_OPENVDB
36
41float 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);
49bke::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
59bke::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
66bke::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
MeshToVolumeModifierResolutionMode
const Depsgraph * depsgraph
MeshToVolumeModifierResolutionMode mode
union blender::geometry::MeshToVolumeResolution::@604 settings