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

#include <BKE_geometry_set.hh>

Inheritance diagram for CurveComponentLegacy:
GeometryComponent

Public Member Functions

std::optional< blender::bke::AttributeAccessorattributes () const final
 
std::optional< blender::bke::MutableAttributeAccessorattributes_for_write () final
 
Geometry Component Implementation
 CurveComponentLegacy ()
 
 ~CurveComponentLegacy ()
 
GeometryComponentcopy () const override
 
void clear ()
 
bool has_curve () const
 
void replace (CurveEval *curve, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
 
CurveEvalrelease ()
 
const CurveEvalget_for_read () const
 
CurveEvalget_for_write ()
 
bool is_empty () const final
 
bool owns_direct_data () const override
 
void ensure_owns_direct_data () override
 
- 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

Legacy runtime-only curves type. These curves are stored differently than other geometry components, because the data structure used here does not correspond exactly to the Curve DNA data structure. A CurveEval is stored here instead, though the component does give access to a Curve for interfacing with render engines and other areas of Blender that expect to use a data-block with an ID.

Definition at line 474 of file BKE_geometry_set.hh.

Constructor & Destructor Documentation

◆ CurveComponentLegacy()

CurveComponentLegacy::CurveComponentLegacy ( )

Definition at line 25 of file geometry_component_curve.cc.

Referenced by copy().

◆ ~CurveComponentLegacy()

CurveComponentLegacy::~CurveComponentLegacy ( )

Definition at line 29 of file geometry_component_curve.cc.

References clear().

Member Function Documentation

◆ attributes()

std::optional< blender::bke::AttributeAccessor > CurveComponentLegacy::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 1448 of file geometry_component_curve.cc.

References blender::bke::get_curve_accessor_functions_ref().

Referenced by curve_eval_to_curves().

◆ attributes_for_write()

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

◆ clear()

void CurveComponentLegacy::clear ( )

Definition at line 44 of file geometry_component_curve.cc.

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

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

◆ copy()

GeometryComponent * CurveComponentLegacy::copy ( ) const
overridevirtual

Implements GeometryComponent.

Definition at line 34 of file geometry_component_curve.cc.

References CurveComponentLegacy(), and Owned.

◆ ensure_owns_direct_data()

void CurveComponentLegacy::ensure_owns_direct_data ( )
overridevirtual

Implements GeometryComponent.

Definition at line 101 of file geometry_component_curve.cc.

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

◆ get_for_read()

const CurveEval * CurveComponentLegacy::get_for_read ( ) const

Definition at line 76 of file geometry_component_curve.cc.

◆ get_for_write()

CurveEval * CurveComponentLegacy::get_for_write ( )

Definition at line 81 of file geometry_component_curve.cc.

References BLI_assert, GeometryComponent::is_mutable(), Owned, and ReadOnly.

Referenced by attributes_for_write().

◆ has_curve()

bool CurveComponentLegacy::has_curve ( ) const

Definition at line 55 of file geometry_component_curve.cc.

◆ is_empty()

bool CurveComponentLegacy::is_empty ( ) const
finalvirtual

Reimplemented from GeometryComponent.

Definition at line 91 of file geometry_component_curve.cc.

◆ owns_direct_data()

bool CurveComponentLegacy::owns_direct_data ( ) const
overridevirtual

Implements GeometryComponent.

Definition at line 96 of file geometry_component_curve.cc.

References Owned.

◆ release()

CurveEval * CurveComponentLegacy::release ( )

Definition at line 68 of file geometry_component_curve.cc.

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

◆ replace()

void CurveComponentLegacy::replace ( CurveEval curve,
GeometryOwnershipType  ownership = GeometryOwnershipType::Owned 
)

Clear the component and replace it with the new curve.

Definition at line 60 of file geometry_component_curve.cc.

References BLI_assert, clear(), curve, and GeometryComponent::is_mutable().

Referenced by curve_eval_to_curves(), and curves_to_curve_eval().

Member Data Documentation

◆ static_type

constexpr GeometryComponentType CurveComponentLegacy::static_type = GEO_COMPONENT_TYPE_CURVE
inlinestaticconstexpr

Definition at line 503 of file BKE_geometry_set.hh.


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