Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/BKE_volume.h')
-rw-r--r--source/blender/blenkernel/BKE_volume.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/blenkernel/BKE_volume.h b/source/blender/blenkernel/BKE_volume.h
index 2a272d06986..12c37ec56e0 100644
--- a/source/blender/blenkernel/BKE_volume.h
+++ b/source/blender/blenkernel/BKE_volume.h
@@ -140,6 +140,10 @@ struct VolumeGrid *BKE_volume_grid_add(struct Volume *volume,
VolumeGridType type);
void BKE_volume_grid_remove(struct Volume *volume, struct VolumeGrid *grid);
+/* Simplify */
+int BKE_volume_simplify_level(const struct Depsgraph *depsgraph);
+float BKE_volume_simplify_factor(const struct Depsgraph *depsgraph);
+
/* File Save */
bool BKE_volume_save(struct Volume *volume,
struct Main *bmain,
@@ -166,16 +170,7 @@ openvdb::GridBase::Ptr BKE_volume_grid_openvdb_for_write(const struct Volume *vo
struct VolumeGrid *grid,
const bool clear);
-template<typename GridType>
-typename GridType::Ptr BKE_volume_grid_openvdb_for_write(const struct Volume *volume,
- struct VolumeGrid *grid,
- const bool clear)
-{
- openvdb::GridBase::Ptr openvdb_grid = BKE_volume_grid_openvdb_for_write(volume, grid, clear);
- BLI_assert(openvdb_grid->isType<GridType>());
- typename GridType::Ptr typed_openvdb_grid = openvdb::gridPtrCast<GridType>(openvdb_grid);
- return typed_openvdb_grid;
-}
+VolumeGridType BKE_volume_grid_type_openvdb(const openvdb::GridBase::Ptr &grid);
template<typename OpType>
auto BKE_volume_grid_type_operation(const VolumeGridType grid_type, OpType &&op)
@@ -212,4 +207,9 @@ auto BKE_volume_grid_type_operation(const VolumeGridType grid_type, OpType &&op)
return op.template operator()<openvdb::FloatGrid>();
}
+openvdb::GridBase::Ptr BKE_volume_grid_create_with_changed_resolution(
+ const VolumeGridType grid_type,
+ const openvdb::GridBase &old_grid,
+ const float resolution_factor);
+
#endif