Blender V4.3
blender::bke::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

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< AttributeAccessorattributes () const
 
virtual std::optional< MutableAttributeAccessorattributes_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 64 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 72 of file BKE_geometry_set.hh.

Constructor & Destructor Documentation

◆ GeometryComponent()

blender::bke::GeometryComponent::GeometryComponent ( Type type)

Definition at line 40 of file geometry_set.cc.

◆ ~GeometryComponent()

virtual blender::bke::GeometryComponent::~GeometryComponent ( )
virtualdefault

Member Function Documentation

◆ attribute_domain_size()

◆ attributes()

◆ attributes_for_write()

◆ clear()

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

◆ copy()

virtual GeometryComponentPtr blender::bke::GeometryComponent::copy ( ) const
pure virtual

◆ count_memory()

void blender::bke::GeometryComponent::count_memory ( MemoryCounter & memory) const
virtual

◆ create()

GeometryComponentPtr blender::bke::GeometryComponent::create ( Type component_type)
static

◆ ensure_owns_direct_data()

◆ is_empty()

◆ owns_direct_data()

◆ type()


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