|
Blender V4.3
|
#include <BKE_geometry_set.hh>
Inherits blender::ImplicitSharingMixin.
Inherited by blender::bke::CurveComponent, blender::bke::GeometryComponentEditData, blender::bke::GreasePencilComponent, blender::bke::InstancesComponent, blender::bke::MeshComponent, blender::bke::PointCloudComponent, and blender::bke::VolumeComponent.
Public Types | |
| enum class | Type { Mesh = 0 , PointCloud = 1 , Instance = 2 , Volume = 3 , Curve = 4 , Edit = 5 , GreasePencil = 6 } |
Public Member Functions | |
| virtual | ~GeometryComponent ()=default |
| virtual GeometryComponentPtr | copy () const =0 |
| virtual void | clear ()=0 |
| virtual bool | owns_direct_data () const =0 |
| virtual void | ensure_owns_direct_data ()=0 |
Public Member Functions inherited from blender::ImplicitSharingInfo | |
| virtual | ~ImplicitSharingInfo () |
| bool | is_mutable () const |
| bool | is_expired () const |
| void | add_user () const |
| void | add_weak_user () const |
| void | tag_ensured_mutable () const |
| int64_t | version () const |
| int | strong_users () const |
| void | remove_user_and_delete_if_last () const |
| void | remove_weak_user_and_delete_if_last () const |
Geometry Component | |
| GeometryComponent (Type type) | |
| int | attribute_domain_size (AttrDomain domain) const |
| virtual std::optional< AttributeAccessor > | attributes () const |
| virtual std::optional< MutableAttributeAccessor > | attributes_for_write () |
| virtual void | count_memory (MemoryCounter &memory) const |
| Type | type () const |
| virtual bool | is_empty () const |
| static GeometryComponentPtr | create (Type component_type) |
This is the base class for specialized geometry component types. A geometry component uses implicit sharing to avoid read-only copies. It also integrates with attribute API, which generalizes storing and modifying generic information on a geometry.
Definition at line 64 of file BKE_geometry_set.hh.
|
strong |
Each geometry component has a specific type. The type determines what kind of data the component stores. Functions modifying a geometry will usually just modify a subset of the component types.
| Enumerator | |
|---|---|
| Mesh | |
| PointCloud | |
| Instance | |
| Volume | |
| Curve | |
| Edit | |
| GreasePencil | |
Definition at line 72 of file BKE_geometry_set.hh.
| blender::bke::GeometryComponent::GeometryComponent | ( | Type | type | ) |
Definition at line 40 of file geometry_set.cc.
|
virtualdefault |
| int blender::bke::GeometryComponent::attribute_domain_size | ( | AttrDomain | domain | ) | const |
Definition at line 64 of file geometry_set.cc.
References attributes(), and is_empty().
Referenced by blender::nodes::node_geo_sample_index_cc::component_is_available(), blender::nodes::node_geo_sample_nearest_cc::component_is_available(), blender::nodes::node_geo_split_to_instances_cc::do_common_split(), blender::nodes::node_geo_sample_index_cc::SampleIndexFunction::evaluate_field(), blender::geometry::gather_attributes_to_propagate(), blender::nodes::node_geo_interpolate_curves_cc::node_geo_exec(), blender::nodes::node_geo_sort_elements_cc::node_geo_exec(), blender::nodes::node_geo_store_named_attribute_cc::node_geo_exec(), blender::nodes::node_geo_set_id_cc::set_id_in_component(), and blender::nodes::node_geo_split_to_instances_cc::split_mesh_groups().
|
virtual |
Get access to the attributes in this geometry component. May return none if the geometry does not support the attribute system.
Reimplemented in blender::bke::CurveComponent, blender::bke::GreasePencilComponent, blender::bke::InstancesComponent, blender::bke::MeshComponent, and blender::bke::PointCloudComponent.
Definition at line 76 of file geometry_set.cc.
Referenced by attribute_domain_size(), blender::bke::GeometrySet::attribute_foreach(), blender::nodes::compute_attributes_to_store(), blender::bke::GeometrySet::gather_attributes_for_propagation(), blender::nodes::node_geo_instance_on_points_cc::node_geo_exec(), blender::nodes::node_geo_interpolate_curves_cc::node_geo_exec(), blender::nodes::node_geo_remove_attribute_cc::node_geo_exec(), and blender::bke::AttributeFieldInput::preferred_domain().
|
virtual |
Reimplemented in blender::bke::CurveComponent, blender::bke::GreasePencilComponent, blender::bke::InstancesComponent, blender::bke::MeshComponent, and blender::bke::PointCloudComponent.
Definition at line 80 of file geometry_set.cc.
Referenced by blender::nodes::ForeachElementComponent::attributes_for_write(), blender::nodes::node_geo_attribute_capture_cc::clean_unused_attributes(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::nodes::node_geo_remove_attribute_cc::node_geo_exec(), blender::bke::bake::rename_attributes(), blender::nodes::node_geo_set_id_cc::set_id_in_component(), and blender::nodes::store_computed_output_attributes().
|
pure virtual |
Remove referenced data from the geometry component.
Implemented in blender::bke::CurveComponent, blender::bke::GeometryComponentEditData, blender::bke::GreasePencilComponent, blender::bke::InstancesComponent, blender::bke::MeshComponent, blender::bke::PointCloudComponent, and blender::bke::VolumeComponent.
|
pure virtual |
Copies the component. The returned component only has a single user and is therefor mutable.
Implemented in blender::bke::CurveComponent, blender::bke::GeometryComponentEditData, blender::bke::GreasePencilComponent, blender::bke::InstancesComponent, blender::bke::MeshComponent, blender::bke::PointCloudComponent, and blender::bke::VolumeComponent.
|
virtual |
Reimplemented in blender::bke::CurveComponent, blender::bke::InstancesComponent, blender::bke::MeshComponent, blender::bke::PointCloudComponent, and blender::bke::VolumeComponent.
Definition at line 85 of file geometry_set.cc.
|
static |
Definition at line 42 of file geometry_set.cc.
References BLI_assert_unreachable, Curve, Edit, GreasePencil, Instance, Mesh, PointCloud, and Volume.
Referenced by blender::bke::attribute_is_builtin_on_component_type(), and blender::bke::GeometrySet::get_component_for_write().
|
pure virtual |
Implemented in blender::bke::CurveComponent, blender::bke::GeometryComponentEditData, blender::bke::GreasePencilComponent, blender::bke::InstancesComponent, blender::bke::MeshComponent, blender::bke::PointCloudComponent, and blender::bke::VolumeComponent.
Referenced by blender::bke::GeometrySet::ensure_owns_direct_data().
|
virtual |
Reimplemented in blender::bke::CurveComponent, blender::bke::GreasePencilComponent, blender::bke::InstancesComponent, blender::bke::MeshComponent, and blender::bke::PointCloudComponent.
Definition at line 92 of file geometry_set.cc.
Referenced by attribute_domain_size(), blender::geometry::join_component_type(), blender::nodes::node_geo_interpolate_curves_cc::node_geo_exec(), blender::nodes::node_geo_sort_elements_cc::node_geo_exec(), and blender::geometry::reordered_component().
|
pure virtual |
| GeometryComponent::Type blender::bke::GeometryComponent::type | ( | ) | const |
Definition at line 87 of file geometry_set.cc.
Referenced by blender::bke::GeometrySet::add(), blender::nodes::node_geo_sample_nearest_cc::SampleNearestFunction::call(), blender::ed::spreadsheet::GeometryDataSource::foreach_default_column_ids(), blender::bke::GeometryFieldContext::GeometryFieldContext(), blender::ed::spreadsheet::GeometryDataSource::get_column_values(), blender::nodes::node_geo_store_named_attribute_cc::node_geo_exec(), blender::nodes::node_geo_set_id_cc::set_id_in_component(), blender::bke::try_capture_fields_on_geometry(), and blender::bke::try_detect_field_domain().