blob: 384293df336f5fdf67a0a2b5e5aeaaeec1afe4ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "BLI_float4x4.hh"
#include "BLI_string_ref.hh"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#pragma once
struct Volume;
struct VolumeGrid;
struct Depsgraph;
/** \file
* \ingroup geo
*/
namespace blender::geometry {
struct MeshToVolumeResolution {
MeshToVolumeModifierResolutionMode mode;
union {
float voxel_size;
float voxel_amount;
} settings;
};
#ifdef WITH_OPENVDB
float volume_compute_voxel_size(const Depsgraph *depsgraph,
const float3 &bb_min,
const float3 &bb_max,
const MeshToVolumeResolution resolution,
float exterior_band_width,
const float4x4 &transform);
/**
* Add a new VolumeGrid to the Volume by converting the supplied mesh
*/
VolumeGrid *volume_grid_add_from_mesh(Volume *volume,
const StringRefNull name,
const Mesh *mesh,
const float4x4 &mesh_to_volume_space_transform,
float voxel_size,
bool fill_volume,
float exterior_band_width,
float interior_band_width,
float density);
#endif
} // namespace blender::geometry
|