OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::GLGizmoSimplify::Configuration Struct Reference

Public Member Functions

void fix_count_by_ratio (size_t triangle_count)
bool operator== (const Configuration &rhs)
bool operator!= (const Configuration &rhs)

Public Attributes

bool use_count = false
float decimate_ratio = 50.f
uint32_t wanted_count = 0
float max_error = 1.

Detailed Description

Member Function Documentation

◆ fix_count_by_ratio()

void Slic3r::GUI::GLGizmoSimplify::Configuration::fix_count_by_ratio ( size_t triangle_count)
729{
730 if (decimate_ratio <= 0.f)
731 wanted_count = static_cast<uint32_t>(triangle_count);
732 else if (decimate_ratio >= 100.f)
733 wanted_count = 0;
734 else
735 wanted_count = static_cast<uint32_t>(std::round(
736 triangle_count * (100.f - decimate_ratio) / 100.f));
737}
float decimate_ratio
Definition GLGizmoSimplify.hpp:71
uint32_t wanted_count
Definition GLGizmoSimplify.hpp:72

References decimate_ratio, and wanted_count.

◆ operator!=()

bool Slic3r::GUI::GLGizmoSimplify::Configuration::operator!= ( const Configuration & rhs)
inline
80 {
81 return ! (*this == rhs);
82 }

◆ operator==()

bool Slic3r::GUI::GLGizmoSimplify::Configuration::operator== ( const Configuration & rhs)
inline
76 {
77 return (use_count == rhs.use_count && decimate_ratio == rhs.decimate_ratio
78 && wanted_count == rhs.wanted_count && max_error == rhs.max_error);
79 }
bool use_count
Definition GLGizmoSimplify.hpp:70
float max_error
Definition GLGizmoSimplify.hpp:73

References decimate_ratio, max_error, use_count, and wanted_count.

Member Data Documentation

◆ decimate_ratio

float Slic3r::GUI::GLGizmoSimplify::Configuration::decimate_ratio = 50.f

Referenced by fix_count_by_ratio(), and operator==().

◆ max_error

float Slic3r::GUI::GLGizmoSimplify::Configuration::max_error = 1.

Referenced by operator==().

◆ use_count

bool Slic3r::GUI::GLGizmoSimplify::Configuration::use_count = false

Referenced by operator==().

◆ wanted_count

uint32_t Slic3r::GUI::GLGizmoSimplify::Configuration::wanted_count = 0

Referenced by fix_count_by_ratio(), and operator==().


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