Blender V5.0
blender::geometry::GeometryComponent Class Referenceabstract

#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

 ~GeometryComponent () override=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)

Detailed Description

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 63 of file BKE_geometry_set.hh.

Member Enumeration Documentation

◆ Type

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.

Note
These values are stored in files, so they should not be reordered.
Enumerator
Mesh 
PointCloud 
Instance 
Volume 
Curve 
Edit 
GreasePencil 

Definition at line 71 of file BKE_geometry_set.hh.

Constructor & Destructor Documentation

◆ GeometryComponent()

◆ ~GeometryComponent()

Member Function Documentation

◆ attribute_domain_size()

◆ attributes()

std::optional< AttributeAccessor > blender::bke::GeometryComponent::attributes ( ) const
virtual

Get access to the attributes in this geometry component. May return none if the geometry does not support the attribute system.

Definition at line 69 of file geometry_set.cc.

◆ attributes_for_write()

std::optional< MutableAttributeAccessor > blender::bke::GeometryComponent::attributes_for_write ( )
virtual

Definition at line 73 of file geometry_set.cc.

◆ clear()

virtual void blender::bke::GeometryComponent::clear ( )
pure virtual

Remove referenced data from the geometry component.

◆ copy()

Copies the component. The returned component only has a single user and is therefor mutable.

◆ count_memory()

Definition at line 78 of file geometry_set.cc.

◆ create()

Definition at line 35 of file geometry_set.cc.

◆ ensure_owns_direct_data()

◆ is_empty()

Definition at line 85 of file geometry_set.cc.

◆ owns_direct_data()

virtual bool blender::bke::GeometryComponent::owns_direct_data ( ) const
pure virtual

◆ type()


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