Blender  V3.3
GEO_mesh_to_volume.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include "BLI_float4x4.hh"
4 #include "BLI_function_ref.hh"
5 #include "BLI_string_ref.hh"
6 
7 #include "DNA_mesh_types.h"
8 #include "DNA_meshdata_types.h"
9 #include "DNA_modifier_types.h"
10 
11 #pragma once
12 
13 struct Volume;
14 struct VolumeGrid;
15 struct Depsgraph;
16 
21 namespace blender::geometry {
22 
25  union {
26  float voxel_size;
27  float voxel_amount;
29 };
30 
31 #ifdef WITH_OPENVDB
32 
37 float volume_compute_voxel_size(const Depsgraph *depsgraph,
38  FunctionRef<void(float3 &r_min, float3 &r_max)> bounds_fn,
39  const MeshToVolumeResolution resolution,
40  float exterior_band_width,
41  const float4x4 &transform);
45 VolumeGrid *volume_grid_add_from_mesh(Volume *volume,
46  const StringRefNull name,
47  const Mesh *mesh,
48  const float4x4 &mesh_to_volume_space_transform,
49  float voxel_size,
50  bool fill_volume,
51  float exterior_band_width,
52  float interior_band_width,
53  float density);
54 #endif
55 } // namespace blender::geometry
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
MeshToVolumeModifierResolutionMode
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
const Depsgraph * depsgraph
static const pxr::TfToken density("density", pxr::TfToken::Immortal)
union blender::geometry::MeshToVolumeResolution::@636 settings
MeshToVolumeModifierResolutionMode mode