Blender V5.0
blender::bke::CurveComponent Class Reference

#include <BKE_geometry_set.hh>

Inherits blender::bke::GeometryComponent.

Public Member Functions

Geometry Component Implementation
 CurveComponent ()
 CurveComponent (Curves *curve, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
 ~CurveComponent () override
GeometryComponentPtr copy () const override
void clear () override
bool has_curves () const
void replace (Curves *curve, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
Curvesrelease ()
const Curvesget () const
Curvesget_for_write ()
bool is_empty () const final
bool owns_direct_data () const override
void ensure_owns_direct_data () override
void count_memory (MemoryCounter &memory) const override
const Curveget_curve_for_render () const
Attribute Access
std::optional< AttributeAccessorattributes () const final
std::optional< MutableAttributeAccessorattributes_for_write () final
Public Member Functions inherited from blender::bke::GeometryComponent
 ~GeometryComponent () override=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::Curve

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 a group of curves, corresponding the Curves data-block and the CurvesGeometry type. Attributes are stored on the control point domain and the curve domain.

Definition at line 589 of file BKE_geometry_set.hh.

Constructor & Destructor Documentation

◆ CurveComponent() [1/2]

blender::bke::CurveComponent::CurveComponent ( )

Definition at line 23 of file geometry_component_curves.cc.

References blender::bke::GeometryComponent::GeometryComponent().

Referenced by copy().

◆ CurveComponent() [2/2]

blender::bke::CurveComponent::CurveComponent ( Curves * curve,
GeometryOwnershipType ownership = GeometryOwnershipType::Owned )

◆ ~CurveComponent()

blender::bke::CurveComponent::~CurveComponent ( )
override

Definition at line 30 of file geometry_component_curves.cc.

References clear().

Member Function Documentation

◆ attributes()

std::optional< AttributeAccessor > blender::bke::CurveComponent::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 313 of file geometry_component_curves.cc.

References blender::bke::curves::get_attribute_accessor_functions().

◆ attributes_for_write()

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

◆ clear()

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

Remove referenced data from the geometry component.

Implements blender::bke::GeometryComponent.

Definition at line 45 of file geometry_component_curves.cc.

References BKE_id_free(), BLI_assert, blender::ImplicitSharingInfo::is_expired(), blender::ImplicitSharingInfo::is_mutable(), and blender::bke::Owned.

Referenced by replace(), and ~CurveComponent().

◆ copy()

GeometryComponentPtr blender::bke::CurveComponent::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 35 of file geometry_component_curves.cc.

References BKE_curves_copy_for_eval(), CurveComponent(), and blender::bke::Owned.

◆ count_memory()

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

Reimplemented from blender::bke::GeometryComponent.

Definition at line 120 of file geometry_component_curves.cc.

◆ ensure_owns_direct_data()

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

◆ get()

◆ get_curve_for_render()

const Curve * blender::bke::CurveComponent::get_curve_for_render ( ) const

Create empty curve data used for rendering the spline's wire edges.

Note
See comment on #curve_for_render_ for further explanation.

Definition at line 127 of file geometry_component_curves.cc.

References BKE_id_new_nomain(), and lock.

◆ get_for_write()

◆ has_curves()

bool blender::bke::CurveComponent::has_curves ( ) const

Definition at line 63 of file geometry_component_curves.cc.

Referenced by blender::bke::GeometrySet::has_curves().

◆ is_empty()

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

Reimplemented from blender::bke::GeometryComponent.

Definition at line 99 of file geometry_component_curves.cc.

◆ owns_direct_data()

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

Implements blender::bke::GeometryComponent.

Definition at line 104 of file geometry_component_curves.cc.

References blender::bke::Owned.

◆ release()

Curves * blender::bke::CurveComponent::release ( )

◆ replace()

void blender::bke::CurveComponent::replace ( Curves * curve,
GeometryOwnershipType ownership = GeometryOwnershipType::Owned )

Clear the component and replace it with the new curve.

Definition at line 68 of file geometry_component_curves.cc.

References BLI_assert, clear(), and blender::ImplicitSharingInfo::is_mutable().

Referenced by blender::bke::GeometrySet::replace_curves().

Member Data Documentation

◆ static_type

GeometryComponent::Type blender::bke::CurveComponent::static_type = Type::Curve
staticconstexpr

Definition at line 635 of file BKE_geometry_set.hh.


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