Blender V5.0
BKE_volume.hh File Reference

Volume data-block. More...

#include <memory>
#include <optional>
#include "BLI_bounds_types.hh"
#include "BLI_math_matrix_types.hh"
#include "BLI_math_vector_types.hh"
#include "BLI_memory_counter_fwd.hh"
#include "BLI_string_ref.hh"
#include "BKE_volume_grid_fwd.hh"
#include "DNA_volume_types.h"

Go to the source code of this file.

Classes

struct  blender::bke::VolumeRuntime

Namespaces

namespace  blender
namespace  blender::bke
namespace  blender::bke::bake

Enumerations

enum  { BKE_VOLUME_BATCH_DIRTY_ALL = 0 }

Functions

void BKE_volumes_init ()
void BKE_volume_init_grids (Volume *volume)
VolumeBKE_volume_add (Main *bmain, const char *name)
bool BKE_volume_is_y_up (const Volume *volume)
bool BKE_volume_is_points_only (const Volume *volume)
void BKE_volume_eval_geometry (Depsgraph *depsgraph, Volume *volume)
void BKE_volume_data_update (Depsgraph *depsgraph, Scene *scene, Object *object)
void BKE_volume_grids_backup_restore (Volume *volume, VolumeGridVector *grids, const char *filepath)
void BKE_volume_batch_cache_dirty_tag (Volume *volume, int mode)
void BKE_volume_batch_cache_free (Volume *volume)
bool BKE_volume_load (const Volume *volume, const Main *bmain)
void BKE_volume_unload (Volume *volume)
bool BKE_volume_is_loaded (const Volume *volume)
int BKE_volume_num_grids (const Volume *volume)
const char * BKE_volume_grids_error_msg (const Volume *volume)
const char * BKE_volume_grids_frame_filepath (const Volume *volume)
const blender::bke::VolumeGridData * BKE_volume_grid_get (const Volume *volume, int grid_index)
blender::bke::VolumeGridData * BKE_volume_grid_get_for_write (Volume *volume, int grid_index)
const blender::bke::VolumeGridData * BKE_volume_grid_active_get_for_read (const Volume *volume)
const blender::bke::VolumeGridData * BKE_volume_grid_find (const Volume *volume, blender::StringRef name)
blender::bke::VolumeGridData * BKE_volume_grid_find_for_write (Volume *volume, blender::StringRef name)
bool BKE_volume_set_velocity_grid_by_name (Volume *volume, blender::StringRef base_name)
VolumeBKE_volume_new_for_eval (const Volume *volume_src)
VolumeBKE_volume_copy_for_eval (const Volume *volume_src)
void BKE_volume_grid_remove (Volume *volume, const blender::bke::VolumeGridData *grid)
void BKE_volume_grid_add (Volume *volume, const blender::bke::VolumeGridData &grid)
bool BKE_volume_grid_determinant_valid (double determinant)
bool BKE_volume_voxel_size_valid (const blender::float3 &voxel_size)
bool BKE_volume_grid_transform_valid (const blender::float4x4 &transform)
int BKE_volume_simplify_level (const Depsgraph *depsgraph)
float BKE_volume_simplify_factor (const Depsgraph *depsgraph)
bool BKE_volume_save (const Volume *volume, const Main *bmain, ReportList *reports, const char *filepath)
void BKE_volume_count_memory (const Volume &volume, blender::MemoryCounter &memory)
std::optional< blender::Bounds< blender::float3 > > BKE_volume_min_max (const Volume *volume)

Variables

void(* BKE_volume_batch_cache_dirty_tag_cb )(Volume *volume, int mode)
void(* BKE_volume_batch_cache_free_cb )(Volume *volume)

Detailed Description

Volume data-block.

Definition in file BKE_volume.hh.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
BKE_VOLUME_BATCH_DIRTY_ALL 

Definition at line 60 of file BKE_volume.hh.

Function Documentation

◆ BKE_volume_add()

Volume * BKE_volume_add ( Main * bmain,
const char * name )

◆ BKE_volume_batch_cache_dirty_tag()

void BKE_volume_batch_cache_dirty_tag ( Volume * volume,
int mode )

◆ BKE_volume_batch_cache_free()

void BKE_volume_batch_cache_free ( Volume * volume)

Definition at line 830 of file blenkernel/intern/volume.cc.

References Volume::batch_cache, and BKE_volume_batch_cache_free_cb.

Referenced by volume_free_data().

◆ BKE_volume_copy_for_eval()

◆ BKE_volume_count_memory()

void BKE_volume_count_memory ( const Volume & volume,
blender::MemoryCounter & memory )

◆ BKE_volume_data_update()

◆ BKE_volume_eval_geometry()

◆ BKE_volume_grid_active_get_for_read()

◆ BKE_volume_grid_add()

void BKE_volume_grid_add ( Volume * volume,
const blender::bke::VolumeGridData & grid )

Adds a new grid to the volume with the name stored in the grid. The caller is responsible for making sure that the user count already contains the volume as a user.

Definition at line 1011 of file blenkernel/intern/volume.cc.

References Volume::runtime, and UNUSED_VARS.

Referenced by blender::nodes::geo_eval_log::ViewerNodeLog::main_geometry(), and blender::nodes::node_geo_import_vdb::node_geo_exec().

◆ BKE_volume_grid_determinant_valid()

bool BKE_volume_grid_determinant_valid ( double determinant)

OpenVDB crashes when the determinant of the transform matrix becomes too small.

Definition at line 1021 of file blenkernel/intern/volume.cc.

References determinant(), and UNUSED_VARS.

Referenced by BKE_volume_grid_transform_valid(), BKE_volume_voxel_size_valid(), and blender::geometry::transform_volume().

◆ BKE_volume_grid_find()

const blender::bke::VolumeGridData * BKE_volume_grid_find ( const Volume * volume,
blender::StringRef name )

◆ BKE_volume_grid_find_for_write()

blender::bke::VolumeGridData * BKE_volume_grid_find_for_write ( Volume * volume,
blender::StringRef name )

◆ BKE_volume_grid_get()

◆ BKE_volume_grid_get_for_write()

blender::bke::VolumeGridData * BKE_volume_grid_get_for_write ( Volume * volume,
int grid_index )

◆ BKE_volume_grid_remove()

void BKE_volume_grid_remove ( Volume * volume,
const blender::bke::VolumeGridData * grid )

Definition at line 996 of file blenkernel/intern/volume.cc.

References Volume::runtime, and UNUSED_VARS.

◆ BKE_volume_grid_transform_valid()

bool BKE_volume_grid_transform_valid ( const blender::float4x4 & transform)

◆ BKE_volume_grids_backup_restore()

void BKE_volume_grids_backup_restore ( Volume * volume,
VolumeGridVector * grids,
const char * filepath )

◆ BKE_volume_grids_error_msg()

const char * BKE_volume_grids_error_msg ( const Volume * volume)

Definition at line 849 of file blenkernel/intern/volume.cc.

References Volume::runtime, and UNUSED_VARS.

Referenced by blender::ed::object::volume_import_exec().

◆ BKE_volume_grids_frame_filepath()

const char * BKE_volume_grids_frame_filepath ( const Volume * volume)

Definition at line 859 of file blenkernel/intern/volume.cc.

References Volume::runtime, and UNUSED_VARS.

Referenced by blender::io::hydra::VolumeData::init().

◆ BKE_volume_init_grids()

void BKE_volume_init_grids ( Volume * volume)

Definition at line 308 of file blenkernel/intern/volume.cc.

References Volume::runtime, and UNUSED_VARS.

Referenced by volume_blend_read_after_liblink(), and volume_init_data().

◆ BKE_volume_is_loaded()

bool BKE_volume_is_loaded ( const Volume * volume)

Definition at line 412 of file blenkernel/intern/volume.cc.

References Volume::filepath, Volume::runtime, and UNUSED_VARS.

Referenced by BKE_volume_load().

◆ BKE_volume_is_points_only()

bool BKE_volume_is_points_only ( const Volume * volume)

◆ BKE_volume_is_y_up()

bool BKE_volume_is_y_up ( const Volume * volume)

Definition at line 631 of file blenkernel/intern/volume.cc.

References Volume::runtime, and UNUSED_VARS.

Referenced by blender::ed::object::volume_import_exec().

◆ BKE_volume_load()

◆ BKE_volume_min_max()

◆ BKE_volume_new_for_eval()

Volume * BKE_volume_new_for_eval ( const Volume * volume_src)

◆ BKE_volume_num_grids()

◆ BKE_volume_save()

◆ BKE_volume_set_velocity_grid_by_name()

bool BKE_volume_set_velocity_grid_by_name ( Volume * volume,
blender::StringRef base_name )

◆ BKE_volume_simplify_factor()

float BKE_volume_simplify_factor ( const Depsgraph * depsgraph)

◆ BKE_volume_simplify_level()

int BKE_volume_simplify_level ( const Depsgraph * depsgraph)

◆ BKE_volume_unload()

◆ BKE_volume_voxel_size_valid()

bool BKE_volume_voxel_size_valid ( const blender::float3 & voxel_size)

◆ BKE_volumes_init()

void BKE_volumes_init ( )

Definition at line 124 of file blenkernel/intern/volume.cc.

Referenced by main().

Variable Documentation

◆ BKE_volume_batch_cache_dirty_tag_cb

void(* BKE_volume_batch_cache_dirty_tag_cb) (Volume *volume, int mode) ( Volume * volume,
int mode )
extern

◆ BKE_volume_batch_cache_free_cb

void(* BKE_volume_batch_cache_free_cb) (Volume *volume) ( Volume * volume)
extern

Definition at line 821 of file blenkernel/intern/volume.cc.

Referenced by BKE_volume_batch_cache_free(), and DRW_module_init().