Blender  V3.3
Static Public Attributes | List of all members
VolumeComponent Class Reference

#include <BKE_geometry_set.hh>

Inheritance diagram for VolumeComponent:
GeometryComponent

Public Member Functions

Geometry Component Implementation
 VolumeComponent ()
 
 ~VolumeComponent ()
 
GeometryComponentcopy () const override
 
void clear ()
 
bool has_volume () const
 
void replace (Volume *volume, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
 
Volumerelease ()
 
const Volumeget_for_read () const
 
Volumeget_for_write ()
 
bool owns_direct_data () const override
 
void ensure_owns_direct_data () override
 
- Public Member Functions inherited from GeometryComponent
virtual ~GeometryComponent ()=default
 
 GeometryComponent (GeometryComponentType type)
 
int attribute_domain_size (eAttrDomain domain) const
 
virtual std::optional< blender::bke::AttributeAccessorattributes () const
 
virtual std::optional< blender::bke::MutableAttributeAccessorattributes_for_write ()
 
void user_add () const
 
void user_remove () const
 
bool is_mutable () const
 
GeometryComponentType type () const
 
virtual bool is_empty () const
 

Static Public Attributes

static constexpr GeometryComponentType static_type = GEO_COMPONENT_TYPE_VOLUME
 

Additional Inherited Members

- Static Public Member Functions inherited from GeometryComponent
static GeometryComponentcreate (GeometryComponentType component_type)
 

Detailed Description

A geometry component that stores volume grids, corresponding to the Volume data structure. This component does not implement an attribute API, partly because storage of sparse volume information in grids is much more complicated than it is for other types

Definition at line 804 of file BKE_geometry_set.hh.

Constructor & Destructor Documentation

◆ VolumeComponent()

VolumeComponent::VolumeComponent ( )

Definition at line 13 of file geometry_component_volume.cc.

Referenced by copy().

◆ ~VolumeComponent()

VolumeComponent::~VolumeComponent ( )

Definition at line 17 of file geometry_component_volume.cc.

References clear().

Member Function Documentation

◆ clear()

void VolumeComponent::clear ( )

◆ copy()

GeometryComponent * VolumeComponent::copy ( ) const
overridevirtual

Implements GeometryComponent.

Definition at line 22 of file geometry_component_volume.cc.

References BKE_volume_copy_for_eval(), Owned, and VolumeComponent().

◆ ensure_owns_direct_data()

void VolumeComponent::ensure_owns_direct_data ( )
overridevirtual

◆ get_for_read()

const Volume * VolumeComponent::get_for_read ( ) const

Get the volume from this component. This method can be used by multiple threads at the same time. Therefore, the returned volume should not be modified. No ownership is transferred.

Definition at line 64 of file geometry_component_volume.cc.

◆ get_for_write()

Volume * VolumeComponent::get_for_write ( )

Get the volume from this component. This method can only be used when the component is mutable, i.e. it is not shared. The returned volume can be modified. No ownership is transferred.

Definition at line 69 of file geometry_component_volume.cc.

References BKE_volume_copy_for_eval(), BLI_assert, GeometryComponent::is_mutable(), Owned, and ReadOnly.

◆ has_volume()

bool VolumeComponent::has_volume ( ) const

Definition at line 43 of file geometry_component_volume.cc.

◆ owns_direct_data()

bool VolumeComponent::owns_direct_data ( ) const
overridevirtual

Implements GeometryComponent.

Definition at line 79 of file geometry_component_volume.cc.

References Owned.

◆ release()

Volume * VolumeComponent::release ( )

Return the volume and clear the component. The caller takes over responsibility for freeing the volume (if the component was responsible before).

Definition at line 56 of file geometry_component_volume.cc.

References BLI_assert, and GeometryComponent::is_mutable().

Referenced by take_volume_ownership_from_geometry_set().

◆ replace()

void VolumeComponent::replace ( Volume volume,
GeometryOwnershipType  ownership = GeometryOwnershipType::Owned 
)

Clear the component and replace it with the new volume.

Definition at line 48 of file geometry_component_volume.cc.

References BLI_assert, clear(), and GeometryComponent::is_mutable().

Referenced by take_volume_ownership_from_geometry_set().

Member Data Documentation

◆ static_type

constexpr GeometryComponentType VolumeComponent::static_type = GEO_COMPONENT_TYPE_VOLUME
inlinestaticconstexpr

Definition at line 841 of file BKE_geometry_set.hh.


The documentation for this class was generated from the following files: