Blender  V3.3
Public Member Functions | Static Public Attributes | List of all members
CurveComponent Class Reference

#include <BKE_geometry_set.hh>

Inheritance diagram for CurveComponent:
GeometryComponent

Public Member Functions

std::optional< blender::bke::AttributeAccessorattributes () const final
 
std::optional< blender::bke::MutableAttributeAccessorattributes_for_write () final
 
Geometry Component Implementation
 CurveComponent ()
 
 ~CurveComponent ()
 
GeometryComponentcopy () const override
 
void clear ()
 
bool has_curves () const
 
void replace (Curves *curve, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
 
Curvesrelease ()
 
const Curvesget_for_read () const
 
Curvesget_for_write ()
 
bool is_empty () const final
 
bool owns_direct_data () const override
 
void ensure_owns_direct_data () override
 
const Curveget_curve_for_render () const
 
- Public Member Functions inherited from GeometryComponent
virtual ~GeometryComponent ()=default
 
 GeometryComponent (GeometryComponentType type)
 
int attribute_domain_size (eAttrDomain domain) const
 
void user_add () const
 
void user_remove () const
 
bool is_mutable () const
 
GeometryComponentType type () const
 

Static Public Attributes

static constexpr GeometryComponentType static_type = GEO_COMPONENT_TYPE_CURVE
 

Additional Inherited Members

- Static Public Member Functions inherited from GeometryComponent
static GeometryComponentcreate (GeometryComponentType component_type)
 

Detailed Description

A geometry component that stores a group of curves, corresponding the Curves data-block type and the CurvesGeometry type. Attributes are are stored on the control point domain and the curve domain.

Definition at line 511 of file BKE_geometry_set.hh.

Constructor & Destructor Documentation

◆ CurveComponent()

CurveComponent::CurveComponent ( )

Definition at line 23 of file geometry_component_curves.cc.

Referenced by copy().

◆ ~CurveComponent()

CurveComponent::~CurveComponent ( )

Definition at line 27 of file geometry_component_curves.cc.

References clear().

Member Function Documentation

◆ attributes()

std::optional< blender::bke::AttributeAccessor > 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 GeometryComponent.

Definition at line 633 of file geometry_component_curves.cc.

References blender::bke::get_curves_accessor_functions_ref().

Referenced by blender::geometry::gather_point_attributes_to_interpolate(), and blender::geometry::retrieve_attribute_spans().

◆ attributes_for_write()

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

◆ clear()

void CurveComponent::clear ( )

◆ copy()

GeometryComponent * CurveComponent::copy ( ) const
overridevirtual

Implements GeometryComponent.

Definition at line 32 of file geometry_component_curves.cc.

References BKE_curves_copy_for_eval(), CurveComponent(), and Owned.

◆ ensure_owns_direct_data()

void CurveComponent::ensure_owns_direct_data ( )
overridevirtual

◆ get_curve_for_render()

const Curve * 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 115 of file geometry_component_curves.cc.

References BKE_id_new_nomain(), Curve::curve_eval, ID_CU_LEGACY, and lock.

◆ get_for_read()

const Curves * CurveComponent::get_for_read ( ) const

◆ get_for_write()

Curves * CurveComponent::get_for_write ( )

◆ has_curves()

bool CurveComponent::has_curves ( ) const

◆ is_empty()

bool CurveComponent::is_empty ( ) const
finalvirtual

Reimplemented from GeometryComponent.

Definition at line 96 of file geometry_component_curves.cc.

◆ owns_direct_data()

bool CurveComponent::owns_direct_data ( ) const
overridevirtual

Implements GeometryComponent.

Definition at line 101 of file geometry_component_curves.cc.

References Owned.

◆ release()

Curves * CurveComponent::release ( )

Definition at line 73 of file geometry_component_curves.cc.

References BLI_assert, curves, and GeometryComponent::is_mutable().

◆ replace()

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

Member Data Documentation

◆ static_type

constexpr GeometryComponentType CurveComponent::static_type = GEO_COMPONENT_TYPE_CURVE
inlinestaticconstexpr

Definition at line 555 of file BKE_geometry_set.hh.


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