OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
marchsq::AdaptiveLevelField Struct Reference
Collaboration diagram for marchsq::AdaptiveLevelField:

Public Member Functions

 AdaptiveLevelField (const AdaptiveInfillField &field, const DensityLevels &levels, const BoundingBox &bbox, coordf_t z)
float get_scalar (const Coord &p) const
coord_t to_coord (long x) const
long to_coordr (coord_t x) const
Point to_Point (const Coord &p) const

Public Attributes

const coord_t rsize = scaled(rsizef)
const long gsize = std::lround(gsizef / rsizef)
const AdaptiveInfillField & field
const DensityLevels & levels
Point size
Point offs
double z

Static Public Attributes

static constexpr float gsizef = 0.5f
static constexpr float rsizef = 0.05f

Detailed Description

Constructor & Destructor Documentation

◆ AdaptiveLevelField()

marchsq::AdaptiveLevelField::AdaptiveLevelField ( const AdaptiveInfillField & field,
const DensityLevels & levels,
const BoundingBox & bbox,
coordf_t z )
inline
725 : field(field), levels(levels), size(bbox.size()), offs(bbox.min), z(z)
726 {}
Point offs
Definition AdaptiveInfillField.cpp:721
const DensityLevels & levels
Definition AdaptiveInfillField.cpp:719
Point size
Definition AdaptiveInfillField.cpp:720
double z
Definition AdaptiveInfillField.cpp:722
const AdaptiveInfillField & field
Definition AdaptiveInfillField.cpp:718

References field, levels, offs, size, and z.

Member Function Documentation

◆ get_scalar()

float marchsq::AdaptiveLevelField::get_scalar ( const Coord & p) const
inline
729 {
730 const Point pt = to_Point(p);
731 return float(levels.level(field.depth(Vec3d(unscaled(pt.x()), unscaled(pt.y()), z))));
732 }
Kernel::Point_3 Point
Definition MeshRepair.cpp:81
Eigen::Matrix< double, 3, 1, Eigen::DontAlign > Vec3d
Definition Point.hpp:68
constexpr Eigen::Matrix< Tout, 2, EigenArgs... > unscaled(const Slic3r::Point &v) noexcept
Definition Arrange.cpp:81
Point to_Point(const Coord &p) const
Definition AdaptiveInfillField.cpp:736

References field, levels, to_Point(), Slic3r::unscaled(), and z.

Referenced by marchsq::_RasterTraits< AdaptiveLevelField >::get().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_coord()

coord_t marchsq::AdaptiveLevelField::to_coord ( long x) const
inline
734{ return x * rsize; }
const coord_t rsize
Definition AdaptiveInfillField.cpp:715

References rsize.

Referenced by to_Point().

Here is the caller graph for this function:

◆ to_coordr()

long marchsq::AdaptiveLevelField::to_coordr ( coord_t x) const
inline
735{ return x / rsize; }

References rsize.

Referenced by marchsq::_RasterTraits< AdaptiveLevelField >::cols(), and marchsq::_RasterTraits< AdaptiveLevelField >::rows().

Here is the caller graph for this function:

◆ to_Point()

Point marchsq::AdaptiveLevelField::to_Point ( const Coord & p) const
inline
736{ return Point(to_coord(p.c) + offs.x(), to_coord(p.r) + offs.y()); }
coord_t to_coord(long x) const
Definition AdaptiveInfillField.cpp:734

References marchsq::Coord::c, offs, marchsq::Coord::r, and to_coord().

Referenced by get_scalar(), and Slic3r::make_adaptive_infill_shells().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ field

const AdaptiveInfillField& marchsq::AdaptiveLevelField::field

Referenced by AdaptiveLevelField(), and get_scalar().

◆ gsize

const long marchsq::AdaptiveLevelField::gsize = std::lround(gsizef / rsizef)

◆ gsizef

float marchsq::AdaptiveLevelField::gsizef = 0.5f
staticconstexpr

◆ levels

const DensityLevels& marchsq::AdaptiveLevelField::levels

Referenced by AdaptiveLevelField(), and get_scalar().

◆ offs

Point marchsq::AdaptiveLevelField::offs

Referenced by AdaptiveLevelField(), and to_Point().

◆ rsize

const coord_t marchsq::AdaptiveLevelField::rsize = scaled(rsizef)

Referenced by to_coord(), and to_coordr().

◆ rsizef

float marchsq::AdaptiveLevelField::rsizef = 0.05f
staticconstexpr

◆ size

◆ z

double marchsq::AdaptiveLevelField::z

Referenced by AdaptiveLevelField(), and get_scalar().


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