OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::Geometry::CubicKernelWrapper< Kernel > Struct Template Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Geometry/Bicubic.hpp>

Inheritance diagram for Slic3r::Geometry::CubicKernelWrapper< Kernel >:

Public Types

typedef Kernel::FloatType FloatType

Static Public Member Functions

static FloatType kernel (FloatType x)
static FloatType interpolate (FloatType f0, FloatType f1, FloatType f2, FloatType f3, FloatType x)

Static Public Attributes

static constexpr size_t kernel_span = 4

Detailed Description

template<typename Kernel>
struct Slic3r::Geometry::CubicKernelWrapper< Kernel >

Member Typedef Documentation

◆ FloatType

template<typename Kernel>
typedef Kernel::FloatType Slic3r::Geometry::CubicKernelWrapper< Kernel >::FloatType

Member Function Documentation

◆ interpolate()

template<typename Kernel>
FloatType Slic3r::Geometry::CubicKernelWrapper< Kernel >::interpolate ( FloatType f0,
FloatType f1,
FloatType f2,
FloatType f3,
FloatType x )
inlinestatic
218 {
219 const FloatType x2 = x * x;
220 const FloatType x3 = x * x * x;
221 return f0 * (Kernel::a00() + Kernel::a01() * x + Kernel::a02() * x2 + Kernel::a03() * x3) +
222 f1 * (Kernel::a10() + Kernel::a11() * x + Kernel::a12() * x2 + Kernel::a13() * x3) +
223 f2 * (Kernel::a20() + Kernel::a21() * x + Kernel::a22() * x2 + Kernel::a23() * x3) +
224 f3 * (Kernel::a30() + Kernel::a31() * x + Kernel::a32() * x2 + Kernel::a33() * x3);
225 }
Definition Bicubic.hpp:195
Kernel::FloatType FloatType
Definition Bicubic.hpp:196

◆ kernel()

template<typename Kernel>
FloatType Slic3r::Geometry::CubicKernelWrapper< Kernel >::kernel ( FloatType x)
inlinestatic
201 {
202 x = fabs(x);
203 if (x >= (FloatType) 2.)
204 return 0.0f;
205 if (x <= (FloatType) 1.) {
206 FloatType x2 = x * x;
207 FloatType x3 = x2 * x;
208 return Kernel::a10() + Kernel::a11() * x + Kernel::a12() * x2 + Kernel::a13() * x3;
209 }
210 assert(x > (FloatType )1. && x < (FloatType )2.);
211 x -= (FloatType) 1.;
212 FloatType x2 = x * x;
213 FloatType x3 = x2 * x;
214 return Kernel::a00() + Kernel::a01() * x + Kernel::a02() * x2 + Kernel::a03() * x3;
215 }

Member Data Documentation

◆ kernel_span

template<typename Kernel>
size_t Slic3r::Geometry::CubicKernelWrapper< Kernel >::kernel_span = 4
staticconstexpr

The documentation for this struct was generated from the following file:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Geometry/Bicubic.hpp