Blender  V3.3
Public Member Functions | Static Public Member Functions | List of all members
blender::bke::CurvesGeometry Class Reference

#include <BKE_curves.hh>

Inheritance diagram for blender::bke::CurvesGeometry:
CurvesGeometry

Public Member Functions

AttributeAccessor attributes () const
 
MutableAttributeAccessor attributes_for_write ()
 
template<typename T >
VArray< Tadapt_domain (const VArray< T > &varray, eAttrDomain from, eAttrDomain to) const
 
Constructors/Destructor
 CurvesGeometry ()
 
 CurvesGeometry (int point_num, int curve_num)
 
 CurvesGeometry (const CurvesGeometry &other)
 
 CurvesGeometry (CurvesGeometry &&other)
 
CurvesGeometryoperator= (const CurvesGeometry &other)
 
CurvesGeometryoperator= (CurvesGeometry &&other)
 
 ~CurvesGeometry ()
 
Accessors
Span< int > offsets () const
 
MutableSpan< int > offsets_for_write ()
 
VArray< int8_tcurve_types () const
 
MutableSpan< int8_tcurve_types_for_write ()
 
void fill_curve_types (CurveType type)
 
void fill_curve_types (IndexMask selection, CurveType type)
 
void update_curve_types ()
 
Span< float3positions () const
 
MutableSpan< float3positions_for_write ()
 
VArray< boolcyclic () const
 
MutableSpan< boolcyclic_for_write ()
 
VArray< int > resolution () const
 
MutableSpan< int > resolution_for_write ()
 
VArray< floattilt () const
 
MutableSpan< floattilt_for_write ()
 
VArray< int8_tnormal_mode () const
 
MutableSpan< int8_tnormal_mode_for_write ()
 
VArray< int8_thandle_types_left () const
 
MutableSpan< int8_thandle_types_left_for_write ()
 
VArray< int8_thandle_types_right () const
 
MutableSpan< int8_thandle_types_right_for_write ()
 
Span< float3handle_positions_left () const
 
MutableSpan< float3handle_positions_left_for_write ()
 
Span< float3handle_positions_right () const
 
MutableSpan< float3handle_positions_right_for_write ()
 
VArray< int8_tnurbs_orders () const
 
MutableSpan< int8_tnurbs_orders_for_write ()
 
VArray< int8_tnurbs_knots_modes () const
 
MutableSpan< int8_tnurbs_knots_modes_for_write ()
 
Span< floatnurbs_weights () const
 
MutableSpan< floatnurbs_weights_for_write ()
 
Span< float2surface_uv_coords () const
 
MutableSpan< float2surface_uv_coords_for_write ()
 
VArray< floatselection_point_float () const
 
MutableSpan< floatselection_point_float_for_write ()
 
VArray< floatselection_curve_float () const
 
MutableSpan< floatselection_curve_float_for_write ()
 
Operations
bool bounds_min_max (float3 &min, float3 &max) const
 
void resize (int points_num, int curves_num)
 
void tag_positions_changed ()
 
void tag_topology_changed ()
 
void tag_normals_changed ()
 
void translate (const float3 &translation)
 
void transform (const float4x4 &matrix)
 
void calculate_bezier_auto_handles ()
 
void remove_points (IndexMask points_to_delete)
 
void remove_curves (IndexMask curves_to_delete)
 
void reverse_curves (IndexMask curves_to_reverse)
 
void remove_attributes_based_on_types ()
 
Domain Interpolation
GVArray adapt_domain (const GVArray &varray, eAttrDomain from, eAttrDomain to) const
 

Static Public Member Functions

static CurvesGeometrywrap (::CurvesGeometry &dna_struct)
 
static const CurvesGeometrywrap (const ::CurvesGeometry &dna_struct)
 

#CurvesGeometry Inline Methods

int points_num () const
 
int curves_num () const
 
IndexRange points_range () const
 
IndexRange curves_range () const
 
IndexRange points_for_curve (int index) const
 
IndexRange points_for_curves (IndexRange curves) const
 
bool has_curve_with_type (CurveType type) const
 
bool has_curve_with_type (Span< CurveType > types) const
 
bool is_single_type (CurveType type) const
 
const std::array< int, CURVE_TYPES_NUM > & curve_type_counts () const
 
int evaluated_points_num () const
 
IndexRange evaluated_points_for_curve (int index) const
 
IndexRange evaluated_points_for_curves (IndexRange curves) const
 
Span< int > bezier_evaluated_offsets_for_curve (int curve_index) const
 
Span< floatevaluated_lengths_for_curve (int curve_index, bool cyclic) const
 
float evaluated_length_total_for_curve (int curve_index, bool cyclic) const
 

Evaluation

IndexMask indices_for_curve_type (CurveType type, Vector< int64_t > &r_indices) const
 
IndexMask indices_for_curve_type (CurveType type, IndexMask selection, Vector< int64_t > &r_indices) const
 
Span< int > evaluated_offsets () const
 
void ensure_evaluated_offsets () const
 
Span< float3evaluated_positions () const
 
Span< float3evaluated_tangents () const
 
Span< float3evaluated_normals () const
 
void ensure_evaluated_lengths () const
 
void ensure_can_interpolate_to_evaluated () const
 
void interpolate_to_evaluated (int curve_index, GSpan src, GMutableSpan dst) const
 
void interpolate_to_evaluated (GSpan src, GMutableSpan dst) const
 

Additional Inherited Members

- Public Attributes inherited from CurvesGeometry
int * curve_offsets
 
CustomData point_data
 
CustomData curve_data
 
int point_num
 
int curve_num
 
CurvesGeometryRuntimeHandleruntime
 

Detailed Description

A C++ class that wraps the DNA struct for better encapsulation and ease of use. It inherits directly from the struct rather than storing a pointer to avoid more complicated ownership handling.

Definition at line 124 of file BKE_curves.hh.

Constructor & Destructor Documentation

◆ CurvesGeometry() [1/4]

CurvesGeometry::CurvesGeometry ( )

Definition at line 47 of file curves_geometry.cc.

◆ CurvesGeometry() [2/4]

CurvesGeometry::CurvesGeometry ( int  point_num,
int  curve_num 
)

◆ CurvesGeometry() [3/4]

CurvesGeometry::CurvesGeometry ( const CurvesGeometry other)

Definition at line 98 of file curves_geometry.cc.

References blender::bke::copy_curves_geometry().

◆ CurvesGeometry() [4/4]

CurvesGeometry::CurvesGeometry ( CurvesGeometry &&  other)

Definition at line 131 of file curves_geometry.cc.

References blender::bke::move_curves_geometry().

◆ ~CurvesGeometry()

CurvesGeometry::~CurvesGeometry ( )

Member Function Documentation

◆ adapt_domain() [1/2]

GVArray CurvesGeometry::adapt_domain ( const GVArray varray,
eAttrDomain  from,
eAttrDomain  to 
) const

◆ adapt_domain() [2/2]

template<typename T >
VArray<T> blender::bke::CurvesGeometry::adapt_domain ( const VArray< T > &  varray,
eAttrDomain  from,
eAttrDomain  to 
) const
inline

Definition at line 414 of file BKE_curves.hh.

References adapt_domain(), from, T, and blender::GVArray::typed().

◆ attributes()

AttributeAccessor CurvesGeometry::attributes ( ) const

◆ attributes_for_write()

MutableAttributeAccessor CurvesGeometry::attributes_for_write ( )

◆ bezier_evaluated_offsets_for_curve()

Span< int > CurvesGeometry::bezier_evaluated_offsets_for_curve ( int  curve_index) const
inline

Retrieve offsets into a Bezier curve's evaluated points for each control point. Call ensure_evaluated_offsets() first to ensure that the evaluated offsets cache is current.

Definition at line 863 of file BKE_curves.hh.

References points_for_curve(), and CurvesGeometry::runtime.

◆ bounds_min_max()

bool CurvesGeometry::bounds_min_max ( float3 min,
float3 max 
) const

Calculate the largest and smallest position values, only including control points (rather than evaluated points). The existing values of min and max are taken into account.

Returns
Whether there are any points. If the curve is empty, the inputs will be unaffected.

Definition at line 1075 of file curves_geometry.cc.

References bounds(), blender::bke::curves_bounds(), blender::math::max(), max, min, and blender::math::min().

Referenced by blender::bke::tests::TEST().

◆ calculate_bezier_auto_handles()

void CurvesGeometry::calculate_bezier_auto_handles ( )

◆ curve_type_counts()

const std::array< int, CURVE_TYPES_NUM > & CurvesGeometry::curve_type_counts ( ) const
inline

◆ curve_types()

VArray< int8_t > CurvesGeometry::curve_types ( ) const

◆ curve_types_for_write()

MutableSpan< int8_t > CurvesGeometry::curve_types_for_write ( )

Mutable access to curve types. Call tag_topology_changed and update_curve_types after changing any type. Consider using the other methods to change types below.

Definition at line 238 of file curves_geometry.cc.

References blender::bke::ATTR_CURVE_TYPE, and ATTR_DOMAIN_CURVE.

Referenced by fill_curve_types().

◆ curves_num()

int CurvesGeometry::curves_num ( ) const
inline

Definition at line 787 of file BKE_curves.hh.

References CurvesGeometry::curve_num.

Referenced by blender::bke::calculate_result_offsets(), blender::bke::curves::copy_only_curve_domain(), curves_range(), blender::ed::sculpt_paint::AddOperationExecutor::ensure_curve_roots_kdtree(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::DeleteOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute(), fill_curve_types(), blender::geometry::fillet_curves(), blender::ed::sculpt_paint::get_curves_selection(), is_single_type(), blender::nodes::node_geo_curve_spline_type_cc::node_geo_exec(), blender::ed::sculpt_paint::DensityAddOperationExecutor::prepare_curve_roots_kdtrees(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_projected(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_spherical(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), and blender::geometry::subdivide_curves().

◆ curves_range()

IndexRange CurvesGeometry::curves_range ( ) const
inline

◆ cyclic()

VArray< bool > CurvesGeometry::cyclic ( ) const

◆ cyclic_for_write()

MutableSpan< bool > CurvesGeometry::cyclic_for_write ( )

Mutable access to curve cyclic values. Call tag_topology_changed after changes.

Definition at line 322 of file curves_geometry.cc.

References blender::bke::ATTR_CYCLIC, and ATTR_DOMAIN_CURVE.

◆ ensure_can_interpolate_to_evaluated()

void CurvesGeometry::ensure_can_interpolate_to_evaluated ( ) const

Definition at line 944 of file curves_geometry.cc.

Referenced by blender::geometry::resample_to_evaluated().

◆ ensure_evaluated_lengths()

void CurvesGeometry::ensure_evaluated_lengths ( ) const

◆ ensure_evaluated_offsets()

void CurvesGeometry::ensure_evaluated_offsets ( ) const

◆ evaluated_length_total_for_curve()

float CurvesGeometry::evaluated_length_total_for_curve ( int  curve_index,
bool  cyclic 
) const
inline

◆ evaluated_lengths_for_curve()

Span< float > CurvesGeometry::evaluated_lengths_for_curve ( int  curve_index,
bool  cyclic 
) const
inline

Return a cache of accumulated lengths along the curve. Each item is the length of the subsequent segment (the first value is the length of the first segment rather than 0). This calculation is rather trivial, and only depends on the evaluated positions, but the results are used often, and it is necessarily single threaded per curve, so it is cached.

Parameters
cyclicThis argument is redundant with the data stored for the curve, but is passed for performance reasons to avoid looking up the attribute.

Definition at line 878 of file BKE_curves.hh.

References BLI_assert, cyclic(), and CurvesGeometry::runtime.

Referenced by evaluated_length_total_for_curve().

◆ evaluated_normals()

Span< float3 > CurvesGeometry::evaluated_normals ( ) const

◆ evaluated_offsets()

Span< int > CurvesGeometry::evaluated_offsets ( ) const

The index of the first evaluated point for every curve. The size of this span is one larger than the number of curves. Consider using evaluated_points_for_curve rather than using the offsets directly.

Definition at line 533 of file curves_geometry.cc.

Referenced by evaluated_points_num().

◆ evaluated_points_for_curve()

IndexRange CurvesGeometry::evaluated_points_for_curve ( int  index) const
inline

Access a range of indices of point data for a specific curve. Call evaluated_offsets() first to ensure that the evaluated offsets cache is current.

Definition at line 848 of file BKE_curves.hh.

References BLI_assert, blender::bke::offsets_to_range(), and CurvesGeometry::runtime.

Referenced by blender::bke::calculate_result_offsets().

◆ evaluated_points_for_curves()

IndexRange CurvesGeometry::evaluated_points_for_curves ( IndexRange  curves) const
inline

◆ evaluated_points_num()

int CurvesGeometry::evaluated_points_num ( ) const
inline

The total number of points in the evaluated poly curve. This can depend on the resolution attribute if it exists.

Definition at line 842 of file BKE_curves.hh.

References evaluated_offsets(), and blender::Span< T >::last().

◆ evaluated_positions()

Span< float3 > CurvesGeometry::evaluated_positions ( ) const

◆ evaluated_tangents()

Span< float3 > CurvesGeometry::evaluated_tangents ( ) const

◆ fill_curve_types() [1/2]

void CurvesGeometry::fill_curve_types ( CurveType  type)

◆ fill_curve_types() [2/2]

void CurvesGeometry::fill_curve_types ( IndexMask  selection,
CurveType  type 
)

Set the types for the curves in the selection and call update_curve_types.

Definition at line 251 of file curves_geometry.cc.

References curve_types_for_write(), fill_curve_types(), blender::IndexMask::size(), tag_topology_changed(), type, and update_curve_types().

◆ handle_positions_left()

Span< float3 > CurvesGeometry::handle_positions_left ( ) const

The positions of Bezier curve handles. Though these are really control points for the Bezier segments, they are stored in separate arrays to better reflect user expectations. Note that values may be generated automatically based on the handle types. Call tag_positions_changed after changes.

Definition at line 372 of file curves_geometry.cc.

References ATTR_DOMAIN_POINT, and blender::bke::ATTR_HANDLE_POSITION_LEFT.

Referenced by blender::geometry::fillet_curves(), and blender::geometry::subdivide_curves().

◆ handle_positions_left_for_write()

MutableSpan< float3 > CurvesGeometry::handle_positions_left_for_write ( )

◆ handle_positions_right()

Span< float3 > CurvesGeometry::handle_positions_right ( ) const

◆ handle_positions_right_for_write()

MutableSpan< float3 > CurvesGeometry::handle_positions_right_for_write ( )

◆ handle_types_left()

VArray< int8_t > CurvesGeometry::handle_types_left ( ) const

Handle types for Bezier control points. Call tag_topology_changed after changes.

Definition at line 354 of file curves_geometry.cc.

References ATTR_DOMAIN_POINT, and blender::bke::ATTR_HANDLE_TYPE_LEFT.

Referenced by blender::bke::curve_to_mesh_sweep(), blender::geometry::fillet_curves(), and blender::geometry::subdivide_curves().

◆ handle_types_left_for_write()

MutableSpan< int8_t > CurvesGeometry::handle_types_left_for_write ( )

◆ handle_types_right()

VArray< int8_t > CurvesGeometry::handle_types_right ( ) const

◆ handle_types_right_for_write()

MutableSpan< int8_t > CurvesGeometry::handle_types_right_for_write ( )

◆ has_curve_with_type() [1/2]

bool CurvesGeometry::has_curve_with_type ( CurveType  type) const
inline

Definition at line 805 of file BKE_curves.hh.

References curve_type_counts(), and type.

Referenced by blender::geometry::fillet_curves().

◆ has_curve_with_type() [2/2]

bool CurvesGeometry::has_curve_with_type ( Span< CurveType types) const
inline

Definition at line 810 of file BKE_curves.hh.

References type, and types.

◆ indices_for_curve_type() [1/2]

IndexMask CurvesGeometry::indices_for_curve_type ( CurveType  type,
IndexMask  selection,
Vector< int64_t > &  r_indices 
) const

Definition at line 545 of file curves_geometry.cc.

References blender::bke::curves::indices_for_type(), and type.

◆ indices_for_curve_type() [2/2]

IndexMask CurvesGeometry::indices_for_curve_type ( CurveType  type,
Vector< int64_t > &  r_indices 
) const

All of the curve indices for curves with a specific type.

Definition at line 539 of file curves_geometry.cc.

References type.

◆ interpolate_to_evaluated() [1/2]

void CurvesGeometry::interpolate_to_evaluated ( GSpan  src,
GMutableSpan  dst 
) const

◆ interpolate_to_evaluated() [2/2]

void CurvesGeometry::interpolate_to_evaluated ( int  curve_index,
GSpan  src,
GMutableSpan  dst 
) const

Evaluate a generic data to the standard evaluated points of a specific curve, defined by the resolution attribute or other factors, depending on the curve type.

Warning
This function expects offsets to the evaluated points for each curve to be calculated. That can be ensured with ensure_can_interpolate_to_evaluated.

Definition at line 833 of file curves_geometry.cc.

References BLI_assert, BLI_assert_unreachable, blender::CPPType::copy_assign_n(), CURVE_TYPE_BEZIER, CURVE_TYPE_CATMULL_ROM, CURVE_TYPE_NURBS, CURVE_TYPE_POLY, blender::GMutableSpan::data(), blender::bke::curves::bezier::interpolate_to_evaluated(), blender::GMutableSpan::size(), blender::IndexRange::size(), src, and blender::GMutableSpan::type().

◆ is_single_type()

bool CurvesGeometry::is_single_type ( CurveType  type) const
inline

Return true if all of the curves have the provided type.

Definition at line 800 of file BKE_curves.hh.

References curve_type_counts(), curves_num(), and type.

Referenced by blender::nodes::node_geo_curve_spline_type_cc::node_geo_exec().

◆ normal_mode()

VArray< int8_t > CurvesGeometry::normal_mode ( ) const

Which method to use for calculating the normals of evaluated points (NormalMode). Call tag_normals_changed after changes.

Definition at line 336 of file curves_geometry.cc.

References ATTR_DOMAIN_CURVE, and blender::bke::ATTR_NORMAL_MODE.

◆ normal_mode_for_write()

MutableSpan< int8_t > CurvesGeometry::normal_mode_for_write ( )

Definition at line 340 of file curves_geometry.cc.

References ATTR_DOMAIN_CURVE, and blender::bke::ATTR_NORMAL_MODE.

◆ nurbs_knots_modes()

VArray< int8_t > CurvesGeometry::nurbs_knots_modes ( ) const

The automatic generation mode for each NURBS curve's knots vector, on the curve domain. Call tag_topology_changed after changes.

Definition at line 408 of file curves_geometry.cc.

References ATTR_DOMAIN_CURVE, and blender::bke::ATTR_NURBS_KNOTS_MODE.

Referenced by blender::geometry::convert_curves_to_bezier().

◆ nurbs_knots_modes_for_write()

MutableSpan< int8_t > CurvesGeometry::nurbs_knots_modes_for_write ( )

Definition at line 412 of file curves_geometry.cc.

References ATTR_DOMAIN_CURVE, and blender::bke::ATTR_NURBS_KNOTS_MODE.

◆ nurbs_orders()

VArray< int8_t > CurvesGeometry::nurbs_orders ( ) const

The order (degree plus one) of each NURBS curve, on the curve domain. Call tag_topology_changed after changes.

Definition at line 390 of file curves_geometry.cc.

References ATTR_DOMAIN_CURVE, and blender::bke::ATTR_NURBS_ORDER.

◆ nurbs_orders_for_write()

MutableSpan< int8_t > CurvesGeometry::nurbs_orders_for_write ( )

Definition at line 394 of file curves_geometry.cc.

References ATTR_DOMAIN_CURVE, and blender::bke::ATTR_NURBS_ORDER.

◆ nurbs_weights()

Span< float > CurvesGeometry::nurbs_weights ( ) const

The weight for each control point for NURBS curves. Call tag_positions_changed after changes.

Definition at line 399 of file curves_geometry.cc.

References ATTR_DOMAIN_POINT, and blender::bke::ATTR_NURBS_WEIGHT.

◆ nurbs_weights_for_write()

MutableSpan< float > CurvesGeometry::nurbs_weights_for_write ( )

Definition at line 403 of file curves_geometry.cc.

References ATTR_DOMAIN_POINT, and blender::bke::ATTR_NURBS_WEIGHT.

◆ offsets()

Span< int > CurvesGeometry::offsets ( ) const

◆ offsets_for_write()

MutableSpan< int > CurvesGeometry::offsets_for_write ( )

◆ operator=() [1/2]

CurvesGeometry & CurvesGeometry::operator= ( const CurvesGeometry other)

Definition at line 104 of file curves_geometry.cc.

References blender::bke::copy_curves_geometry().

◆ operator=() [2/2]

CurvesGeometry & CurvesGeometry::operator= ( CurvesGeometry &&  other)

Definition at line 137 of file curves_geometry.cc.

References blender::bke::move_curves_geometry().

◆ points_for_curve()

IndexRange CurvesGeometry::points_for_curve ( int  index) const
inline

Access a range of indices of point data for a specific curve.

Definition at line 822 of file BKE_curves.hh.

References BLI_assert, CurvesGeometry::curve_num, CurvesGeometry::curve_offsets, and offset.

Referenced by bezier_evaluated_offsets_for_curve().

◆ points_for_curves()

IndexRange CurvesGeometry::points_for_curves ( IndexRange  curves) const
inline

◆ points_num()

int CurvesGeometry::points_num ( ) const
inline

◆ points_range()

IndexRange CurvesGeometry::points_range ( ) const
inline

◆ positions()

Span< float3 > CurvesGeometry::positions ( ) const

◆ positions_for_write()

MutableSpan< float3 > CurvesGeometry::positions_for_write ( )

◆ remove_attributes_based_on_types()

void CurvesGeometry::remove_attributes_based_on_types ( )

◆ remove_curves()

void CurvesGeometry::remove_curves ( IndexMask  curves_to_delete)

◆ remove_points()

void CurvesGeometry::remove_points ( IndexMask  points_to_delete)

◆ resize()

void CurvesGeometry::resize ( int  points_num,
int  curves_num 
)

Change the number of elements. New values for existing attributes should be properly initialized afterwards.

Definition at line 956 of file curves_geometry.cc.

References CustomData_realloc(), and MEM_reallocN.

Referenced by blender::geometry::fillet_curves(), blender::geometry::resample_to_uniform(), and blender::geometry::subdivide_curves().

◆ resolution()

VArray< int > CurvesGeometry::resolution ( ) const

How many evaluated points to create for each segment when evaluating Bezier, Catmull Rom, and NURBS curves. On the curve domain.

Definition at line 327 of file curves_geometry.cc.

References ATTR_DOMAIN_CURVE, and blender::bke::ATTR_RESOLUTION.

◆ resolution_for_write()

MutableSpan< int > CurvesGeometry::resolution_for_write ( )

Mutable access to curve resolution. Call tag_topology_changed after changes.

Definition at line 331 of file curves_geometry.cc.

References ATTR_DOMAIN_CURVE, and blender::bke::ATTR_RESOLUTION.

◆ reverse_curves()

void CurvesGeometry::reverse_curves ( IndexMask  curves_to_reverse)

◆ selection_curve_float()

VArray< float > CurvesGeometry::selection_curve_float ( ) const

◆ selection_curve_float_for_write()

MutableSpan< float > CurvesGeometry::selection_curve_float_for_write ( )

◆ selection_point_float()

VArray< float > CurvesGeometry::selection_point_float ( ) const

◆ selection_point_float_for_write()

MutableSpan< float > CurvesGeometry::selection_point_float_for_write ( )

◆ surface_uv_coords()

Span< float2 > CurvesGeometry::surface_uv_coords ( ) const

UV coordinate for each curve that encodes where the curve is attached to the surface mesh.

Definition at line 417 of file curves_geometry.cc.

References ATTR_DOMAIN_CURVE, and blender::bke::ATTR_SURFACE_UV_COORDINATE.

Referenced by blender::ed::sculpt_paint::SlideOperationExecutor::execute(), and blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide().

◆ surface_uv_coords_for_write()

MutableSpan< float2 > CurvesGeometry::surface_uv_coords_for_write ( )

◆ tag_normals_changed()

void CurvesGeometry::tag_normals_changed ( )

Call after changing the "tilt" or "up" attributes.

Definition at line 986 of file curves_geometry.cc.

◆ tag_positions_changed()

void CurvesGeometry::tag_positions_changed ( )

◆ tag_topology_changed()

void CurvesGeometry::tag_topology_changed ( )

Call after any operation that changes the topology (number of points, evaluated points, or the total count).

Definition at line 977 of file curves_geometry.cc.

Referenced by blender::bke::copy_curves_geometry(), and fill_curve_types().

◆ tilt()

VArray< float > CurvesGeometry::tilt ( ) const

The angle used to rotate evaluated normals around the tangents after their calculation. Call tag_normals_changed after changes.

Definition at line 345 of file curves_geometry.cc.

References ATTR_DOMAIN_POINT, and blender::bke::ATTR_TILT.

◆ tilt_for_write()

MutableSpan< float > CurvesGeometry::tilt_for_write ( )

Definition at line 349 of file curves_geometry.cc.

References ATTR_DOMAIN_POINT, and blender::bke::ATTR_TILT.

◆ transform()

void CurvesGeometry::transform ( const float4x4 matrix)

◆ translate()

void CurvesGeometry::translate ( const float3 translation)

◆ update_curve_types()

void CurvesGeometry::update_curve_types ( )

Update the cached count of curves of each type, necessary after curve_types_for_write.

Definition at line 295 of file curves_geometry.cc.

References blender::bke::calculate_type_counts().

Referenced by curves_blend_read_data(), and fill_curve_types().

◆ wrap() [1/2]

static CurvesGeometry& blender::bke::CurvesGeometry::wrap ( ::CurvesGeometry dna_struct)
inlinestatic

Definition at line 138 of file BKE_curves.hh.

Referenced by apply_objects_internal(), BKE_curves_boundbox_get(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::nodes::node_geo_input_spline_length_cc::construct_curve_point_count_gvarray(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_points(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_radius(), blender::nodes::node_geo_curve_primitive_bezier_segment_cc::create_bezier_segment_curve(), blender::nodes::node_geo_string_to_curves_cc::create_curve_instances(), blender::nodes::node_geo_curve_primitive_line_cc::create_direction_line_curve(), blender::nodes::node_geo_curve_primitive_circle_cc::create_point_circle_curve(), blender::nodes::node_geo_curve_primitive_line_cc::create_point_line_curve(), blender::nodes::node_geo_curve_primitive_quadratic_bezier_cc::create_quadratic_bezier_curve(), blender::nodes::node_geo_curve_primitive_circle_cc::create_radius_circle_curve(), blender::nodes::node_geo_curve_primitive_spiral_cc::create_spiral_curve(), blender::nodes::node_geo_curve_primitive_star_cc::create_star_curve(), curve_create_curves_lines(), curve_create_curves_pos(), curve_eval_to_curves(), blender::nodes::node_geo_curve_fill_cc::curve_fill_calculate(), blender::bke::curve_legacy_to_curves(), curve_render_data_create(), curves_batch_cache_fill_segments_proc_pos(), curves_batch_cache_fill_strands_data(), curves_batch_ensure_attribute(), curves_blend_read_data(), curves_copy_data(), curves_free_data(), blender::bke::curves_new_nomain(), blender::bke::curves_new_nomain_single(), curves_to_curve_eval(), blender::nodes::node_geo_delete_geometry_cc::delete_curves_selection(), DRW_shgroup_curves_create_sub(), everything_selected(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::DeleteOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute(), blender::geometry::gather_point_attributes_to_interpolate(), blender::nodes::node_geo_curve_to_mesh_cc::geometry_set_curve_to_mesh(), blender::bke::get_attribute_accessor_for_write(), blender::ed::sculpt_paint::get_curves_selection(), blender::bke::crazyspace::get_evaluated_curves_deformation(), blender::ed::sculpt_paint::get_point_selection(), blender::nodes::node_geo_curve_handle_type_selection_cc::HandleTypeFieldInput::get_varray_for_context(), blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput::get_varray_for_context(), mesh_new_from_evaluated_curve_type_object(), modifier_apply_obdata(), blender::nodes::node_geo_curve_fillet_cc::node_geo_exec(), blender::nodes::node_geo_curve_length_cc::node_geo_exec(), blender::nodes::node_geo_curve_primitive_quadrilateral_cc::node_geo_exec(), blender::nodes::node_geo_curve_reverse_cc::node_geo_exec(), blender::nodes::node_geo_curve_sample_cc::node_geo_exec(), blender::nodes::node_geo_curve_spline_type_cc::node_geo_exec(), blender::nodes::node_geo_curve_subdivide_cc::node_geo_exec(), object_convert_exec(), object_curves_random_add_exec(), object_origin_set_exec(), request_attribute(), blender::geometry::resample_to_uniform(), blender::ed::sculpt_paint::select_end::select_end_exec(), blender::ed::sculpt_paint::select_random::select_random_exec(), blender::nodes::node_geo_set_curve_handles_cc::set_position_in_component(), blender::nodes::node_geo_curve_set_handle_type_cc::set_type_in_component(), blender::nodes::transform_geometry_set(), blender::nodes::translate_geometry_set(), and blender::ed::curves::convert_to_particle_system::try_convert_single_object().

◆ wrap() [2/2]

static const CurvesGeometry& blender::bke::CurvesGeometry::wrap ( const ::CurvesGeometry dna_struct)
inlinestatic

Definition at line 143 of file BKE_curves.hh.


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