Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::Geometry::PolynomialCurve< Dimension, NumberType > Struct Template Reference

#include <src/libslic3r/Geometry/Curves.hpp>

Public Member Functions

Vec< Dimension, NumberType > get_fitted_value (const NumberType &value) const
 

Public Attributes

Eigen::MatrixXf coefficients
 

Detailed Description

template<int Dimension, typename NumberType>
struct Slic3r::Geometry::PolynomialCurve< Dimension, NumberType >

Member Function Documentation

◆ get_fitted_value()

template<int Dimension, typename NumberType >
Vec< Dimension, NumberType > Slic3r::Geometry::PolynomialCurve< Dimension, NumberType >::get_fitted_value ( const NumberType &  value) const
inline
18 {
19 Vec<Dimension, NumberType> result = Vec<Dimension, NumberType>::Zero();
20 size_t order = this->coefficients.rows() - 1;
21 auto x = NumberType(1.);
22 for (size_t index = 0; index < order + 1; ++index, x *= value)
23 result += x * this->coefficients.col(index);
24 return result;
25 }
TCoord< P > x(const P &p)
Definition geometry_traits.hpp:297
Eigen::MatrixXf coefficients
Definition Curves.hpp:16

Member Data Documentation

◆ coefficients

template<int Dimension, typename NumberType >
Eigen::MatrixXf Slic3r::Geometry::PolynomialCurve< Dimension, NumberType >::coefficients

The documentation for this struct was generated from the following file: