Blender V4.3
blender::nodes::InstancesComponent Class Reference

#include <BKE_geometry_set.hh>

Inherits blender::bke::GeometryComponent.

Public Member Functions

Geometry Component Implementation
 InstancesComponent ()
 InstancesComponent (Instances *instances, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
 ~InstancesComponent ()
GeometryComponentPtr copy () const override
void clear () override
const Instancesget () const
Instancesget_for_write ()
void replace (Instances *instances, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
bool is_empty () const final
Instancesrelease ()
bool owns_direct_data () const override
void ensure_owns_direct_data () override
void count_memory (MemoryCounter &memory) const override
std::optional< AttributeAccessorattributes () const final
std::optional< MutableAttributeAccessorattributes_for_write () final
Public Member Functions inherited from blender::bke::GeometryComponent
virtual ~GeometryComponent ()=default
 GeometryComponent (Type type)
int attribute_domain_size (AttrDomain domain) const
Type type () const
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

Static Public Attributes

static constexpr GeometryComponent::Type static_type = Type::Instance

Additional Inherited Members

Public Types inherited from blender::bke::GeometryComponent
enum class  Type {
  Mesh = 0 , PointCloud = 1 , Instance = 2 , Volume = 3 ,
  Curve = 4 , Edit = 5 , GreasePencil = 6
}
static GeometryComponentPtr create (Type component_type)

Detailed Description

A geometry component that stores Instances.

Definition at line 639 of file BKE_geometry_set.hh.

Constructor & Destructor Documentation

◆ InstancesComponent() [1/2]

blender::bke::InstancesComponent::InstancesComponent ( )

Definition at line 26 of file geometry_component_instances.cc.

◆ InstancesComponent() [2/2]

blender::bke::InstancesComponent::InstancesComponent ( Instances * instances,
GeometryOwnershipType ownership = GeometryOwnershipType::Owned )

Definition at line 28 of file geometry_component_instances.cc.

◆ ~InstancesComponent()

blender::bke::InstancesComponent::~InstancesComponent ( )

Definition at line 33 of file geometry_component_instances.cc.

Member Function Documentation

◆ attributes()

std::optional< AttributeAccessor > blender::bke::InstancesComponent::attributes ( ) const
finalvirtual

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

Reimplemented from blender::bke::GeometryComponent.

Definition at line 225 of file geometry_component_instances.cc.

◆ attributes_for_write()

std::optional< MutableAttributeAccessor > blender::bke::InstancesComponent::attributes_for_write ( )
finalvirtual

Reimplemented from blender::bke::GeometryComponent.

Definition at line 230 of file geometry_component_instances.cc.

◆ clear()

void blender::bke::InstancesComponent::clear ( )
overridevirtual

Remove referenced data from the geometry component.

Implements blender::bke::GeometryComponent.

Definition at line 48 of file geometry_component_instances.cc.

◆ copy()

GeometryComponentPtr blender::bke::InstancesComponent::copy ( ) const
overridevirtual

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

Implements blender::bke::GeometryComponent.

Definition at line 38 of file geometry_component_instances.cc.

◆ count_memory()

void blender::bke::InstancesComponent::count_memory ( MemoryCounter & memory) const
overridevirtual

Reimplemented from blender::bke::GeometryComponent.

Definition at line 113 of file geometry_component_instances.cc.

◆ ensure_owns_direct_data()

void blender::bke::InstancesComponent::ensure_owns_direct_data ( )
overridevirtual

Implements blender::bke::GeometryComponent.

Definition at line 75 of file geometry_component_instances.cc.

◆ get()

const Instances * blender::bke::InstancesComponent::get ( ) const

Definition at line 82 of file geometry_component_instances.cc.

◆ get_for_write()

Instances * blender::bke::InstancesComponent::get_for_write ( )

Definition at line 87 of file geometry_component_instances.cc.

◆ is_empty()

bool blender::bke::InstancesComponent::is_empty ( ) const
finalvirtual

Reimplemented from blender::bke::GeometryComponent.

Definition at line 57 of file geometry_component_instances.cc.

◆ owns_direct_data()

bool blender::bke::InstancesComponent::owns_direct_data ( ) const
overridevirtual

Implements blender::bke::GeometryComponent.

Definition at line 67 of file geometry_component_instances.cc.

◆ release()

Instances * blender::bke::InstancesComponent::release ( )

Definition at line 105 of file geometry_component_instances.cc.

◆ replace()

void blender::bke::InstancesComponent::replace ( Instances * instances,
GeometryOwnershipType ownership = GeometryOwnershipType::Owned )

Definition at line 97 of file geometry_component_instances.cc.

Member Data Documentation

◆ static_type

GeometryComponent::Type blender::bke::InstancesComponent::static_type = Type::Instance
inlinestaticconstexpr

Definition at line 671 of file BKE_geometry_set.hh.


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