Blender V4.3
blender::nodes::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()

int blender::bke::GeometryComponent::attribute_domain_size ( AttrDomain domain) const

Definition at line 64 of file geometry_set.cc.

◆ 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 76 of file geometry_set.cc.

◆ attributes_for_write()

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

Definition at line 80 of file geometry_set.cc.

◆ clear()

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

Remove referenced data from the geometry component.

◆ copy()

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

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

◆ count_memory()

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

Definition at line 85 of file geometry_set.cc.

◆ create()

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

Definition at line 42 of file geometry_set.cc.

◆ ensure_owns_direct_data()

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

◆ is_empty()

bool blender::bke::GeometryComponent::is_empty ( ) const
virtual

Definition at line 92 of file geometry_set.cc.

◆ owns_direct_data()

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

◆ type()

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

Definition at line 87 of file geometry_set.cc.


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