Blender
V3.3
|
#include <BKE_geometry_set.hh>
Public Member Functions | |
Geometry Component Implementation | |
VolumeComponent () | |
~VolumeComponent () | |
GeometryComponent * | copy () const override |
void | clear () |
bool | has_volume () const |
void | replace (Volume *volume, GeometryOwnershipType ownership=GeometryOwnershipType::Owned) |
Volume * | release () |
const Volume * | get_for_read () const |
Volume * | get_for_write () |
bool | owns_direct_data () const override |
void | ensure_owns_direct_data () override |
![]() | |
virtual | ~GeometryComponent ()=default |
GeometryComponent (GeometryComponentType type) | |
int | attribute_domain_size (eAttrDomain domain) const |
virtual std::optional< blender::bke::AttributeAccessor > | attributes () const |
virtual std::optional< blender::bke::MutableAttributeAccessor > | attributes_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 GeometryComponent * | create (GeometryComponentType component_type) |
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.
VolumeComponent::VolumeComponent | ( | ) |
Definition at line 13 of file geometry_component_volume.cc.
Referenced by copy().
VolumeComponent::~VolumeComponent | ( | ) |
Definition at line 17 of file geometry_component_volume.cc.
References clear().
void VolumeComponent::clear | ( | ) |
Definition at line 32 of file geometry_component_volume.cc.
References BKE_id_free(), BLI_assert, GeometryComponent::is_mutable(), and Owned.
Referenced by replace(), and ~VolumeComponent().
|
overridevirtual |
Implements GeometryComponent.
Definition at line 22 of file geometry_component_volume.cc.
References BKE_volume_copy_for_eval(), Owned, and VolumeComponent().
|
overridevirtual |
Implements GeometryComponent.
Definition at line 84 of file geometry_component_volume.cc.
References BKE_volume_copy_for_eval(), BLI_assert, GeometryComponent::is_mutable(), and Owned.
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.
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.
bool VolumeComponent::has_volume | ( | ) | const |
Definition at line 43 of file geometry_component_volume.cc.
|
overridevirtual |
Implements GeometryComponent.
Definition at line 79 of file geometry_component_volume.cc.
References Owned.
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().
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().
|
inlinestaticconstexpr |
Definition at line 841 of file BKE_geometry_set.hh.