Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_spline.hh
| Show First 20 Lines • Show All 300 Lines • ▼ Show 20 Lines | public: | ||||
| blender::Span<HandleType> handle_types_left() const; | blender::Span<HandleType> handle_types_left() const; | ||||
| blender::MutableSpan<HandleType> handle_types_left(); | blender::MutableSpan<HandleType> handle_types_left(); | ||||
| blender::Span<blender::float3> handle_positions_left() const; | blender::Span<blender::float3> handle_positions_left() const; | ||||
| blender::MutableSpan<blender::float3> handle_positions_left(); | blender::MutableSpan<blender::float3> handle_positions_left(); | ||||
| blender::Span<HandleType> handle_types_right() const; | blender::Span<HandleType> handle_types_right() const; | ||||
| blender::MutableSpan<HandleType> handle_types_right(); | blender::MutableSpan<HandleType> handle_types_right(); | ||||
| blender::Span<blender::float3> handle_positions_right() const; | blender::Span<blender::float3> handle_positions_right() const; | ||||
| blender::MutableSpan<blender::float3> handle_positions_right(); | blender::MutableSpan<blender::float3> handle_positions_right(); | ||||
| void ensure_auto_handles() const; | |||||
| void translate(const blender::float3 &translation) override; | void translate(const blender::float3 &translation) override; | ||||
| void transform(const blender::float4x4 &matrix) override; | void transform(const blender::float4x4 &matrix) override; | ||||
| bool point_is_sharp(const int index) const; | bool point_is_sharp(const int index) const; | ||||
| void mark_cache_invalid() final; | void mark_cache_invalid() final; | ||||
| int evaluated_points_size() const final; | int evaluated_points_size() const final; | ||||
| Show All 15 Lines | public: | ||||
| virtual blender::fn::GVArrayPtr interpolate_to_evaluated( | virtual blender::fn::GVArrayPtr interpolate_to_evaluated( | ||||
| const blender::fn::GVArray &src) const override; | const blender::fn::GVArray &src) const override; | ||||
| void evaluate_segment(const int index, | void evaluate_segment(const int index, | ||||
| const int next_index, | const int next_index, | ||||
| blender::MutableSpan<blender::float3> positions) const; | blender::MutableSpan<blender::float3> positions) const; | ||||
| bool segment_is_vector(const int start_index) const; | bool segment_is_vector(const int start_index) const; | ||||
| /** See comment and diagram for #calculate_segment_insertion. */ | |||||
| struct InsertResult { | |||||
| blender::float3 handle_prev; | |||||
| blender::float3 left_handle; | |||||
| blender::float3 position; | |||||
| blender::float3 right_handle; | |||||
| blender::float3 handle_next; | |||||
| }; | |||||
| InsertResult calculate_segment_insertion(const int index, | |||||
| const int next_index, | |||||
| const float parameter); | |||||
| private: | private: | ||||
| void correct_end_tangents() const final; | void correct_end_tangents() const final; | ||||
| void copy_settings(Spline &dst) const final; | void copy_settings(Spline &dst) const final; | ||||
| void copy_data(Spline &dst) const final; | void copy_data(Spline &dst) const final; | ||||
| void ensure_auto_handles() const; | |||||
| }; | }; | ||||
| /** | /** | ||||
| * Data for Non-Uniform Rational B-Splines. The mapping from control points to evaluated points is | * Data for Non-Uniform Rational B-Splines. The mapping from control points to evaluated points is | ||||
| * influenced by a vector of knots, weights for each point, and the order of the spline. Every | * influenced by a vector of knots, weights for each point, and the order of the spline. Every | ||||
| * mapping of data to evaluated points is handled the same way, but the positions are cached in | * mapping of data to evaluated points is handled the same way, but the positions are cached in | ||||
| * the spline. | * the spline. | ||||
| */ | */ | ||||
| ▲ Show 20 Lines • Show All 173 Lines • ▼ Show 20 Lines | public: | ||||
| { | { | ||||
| for (const SplinePtr &spline : other.splines()) { | for (const SplinePtr &spline : other.splines()) { | ||||
| this->add_spline(spline->copy()); | this->add_spline(spline->copy()); | ||||
| } | } | ||||
| } | } | ||||
| blender::Span<SplinePtr> splines() const; | blender::Span<SplinePtr> splines() const; | ||||
| blender::MutableSpan<SplinePtr> splines(); | blender::MutableSpan<SplinePtr> splines(); | ||||
| bool has_spline_with_type(const Spline::Type type) const; | |||||
| void resize(const int size); | void resize(const int size); | ||||
| void add_spline(SplinePtr spline); | void add_spline(SplinePtr spline); | ||||
| void remove_splines(blender::IndexMask mask); | void remove_splines(blender::IndexMask mask); | ||||
| void translate(const blender::float3 &translation); | void translate(const blender::float3 &translation); | ||||
| void transform(const blender::float4x4 &matrix); | void transform(const blender::float4x4 &matrix); | ||||
| void bounds_min_max(blender::float3 &min, blender::float3 &max, const bool use_evaluated) const; | void bounds_min_max(blender::float3 &min, blender::float3 &max, const bool use_evaluated) const; | ||||
| Show All 10 Lines | |||||