Changeset View
Changeset View
Standalone View
Standalone View
source/blender/geometry/GEO_mesh_to_volume.hh
| /* SPDX-License-Identifier: GPL-2.0-or-later */ | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||||
| #include "BLI_float4x4.hh" | #include "BLI_float4x4.hh" | ||||
| #include "BLI_function_ref.hh" | |||||
| #include "BLI_string_ref.hh" | #include "BLI_string_ref.hh" | ||||
| #include "DNA_mesh_types.h" | #include "DNA_mesh_types.h" | ||||
| #include "DNA_meshdata_types.h" | #include "DNA_meshdata_types.h" | ||||
| #include "DNA_modifier_types.h" | #include "DNA_modifier_types.h" | ||||
| #pragma once | #pragma once | ||||
| Show All 11 Lines | struct MeshToVolumeResolution { | ||||
| MeshToVolumeModifierResolutionMode mode; | MeshToVolumeModifierResolutionMode mode; | ||||
| union { | union { | ||||
| float voxel_size; | float voxel_size; | ||||
| float voxel_amount; | float voxel_amount; | ||||
| } settings; | } settings; | ||||
| }; | }; | ||||
| #ifdef WITH_OPENVDB | #ifdef WITH_OPENVDB | ||||
| /** | |||||
| * \param bounds_fn: Return the bounds of the mesh positions, | |||||
| * used for deciding the voxel size in "Amount" mode. | |||||
| */ | |||||
| float volume_compute_voxel_size(const Depsgraph *depsgraph, | float volume_compute_voxel_size(const Depsgraph *depsgraph, | ||||
| const float3 &bb_min, | FunctionRef<void(float3 &r_min, float3 &r_max)> bounds_fn, | ||||
| const float3 &bb_max, | |||||
| const MeshToVolumeResolution resolution, | const MeshToVolumeResolution resolution, | ||||
| float exterior_band_width, | float exterior_band_width, | ||||
| const float4x4 &transform); | const float4x4 &transform); | ||||
| /** | /** | ||||
| * Add a new VolumeGrid to the Volume by converting the supplied mesh | * Add a new VolumeGrid to the Volume by converting the supplied mesh | ||||
| */ | */ | ||||
| VolumeGrid *volume_grid_add_from_mesh(Volume *volume, | VolumeGrid *volume_grid_add_from_mesh(Volume *volume, | ||||
| const StringRefNull name, | const StringRefNull name, | ||||
| Show All 9 Lines | |||||