Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
priv::Limits Struct Reference
+ Collaboration diagram for priv::Limits:

Static Public Member Functions

template<typename T >
static bool apply (std::optional< T > &val, const MinMax< T > &limit)
 
template<typename T >
static bool apply (T &val, const MinMax< T > &limit)
 

Public Attributes

MinMax< float > emboss {0.01f, 1e4f}
 
MinMax< float > size_in_mm {0.1f, 1000.f}
 
Limit< float > boldness {{-200.f, 200.f}, {-2e4f, 2e4f}}
 
Limit< float > skew {{-1.f, 1.f}, {-100.f, 100.f}}
 
MinMax< int > char_gap {-20000, 20000}
 
MinMax< int > line_gap {-20000, 20000}
 
MinMax< float > angle {-180.f, 180.f}
 

Detailed Description

Member Function Documentation

◆ apply() [1/2]

template<typename T >
static bool priv::Limits::apply ( std::optional< T > &  val,
const MinMax< T > &  limit 
)
inlinestatic
91 {
92 if (val.has_value())
93 return apply<T>(*val, limit);
94 return false;
95 }

Referenced by Slic3r::GUI::GLGizmoEmboss::draw_advanced(), Slic3r::GUI::GLGizmoEmboss::set_depth(), and Slic3r::GUI::GLGizmoEmboss::set_height().

+ Here is the caller graph for this function:

◆ apply() [2/2]

template<typename T >
static bool priv::Limits::apply ( T &  val,
const MinMax< T > &  limit 
)
inlinestatic
98 {
99 if (val > limit.max) {
100 val = limit.max;
101 return true;
102 }
103 if (val < limit.min) {
104 val = limit.min;
105 return true;
106 }
107 return false;
108 }
T max
Definition GLGizmoEmboss.cpp:70
T min
Definition GLGizmoEmboss.cpp:70

References priv::MinMax< T >::max, and priv::MinMax< T >::min.

Member Data Documentation

◆ angle

MinMax<float> priv::Limits::angle {-180.f, 180.f}

◆ boldness

Limit<float> priv::Limits::boldness {{-200.f, 200.f}, {-2e4f, 2e4f}}

◆ char_gap

MinMax<int> priv::Limits::char_gap {-20000, 20000}

◆ emboss

MinMax<float> priv::Limits::emboss {0.01f, 1e4f}

◆ line_gap

MinMax<int> priv::Limits::line_gap {-20000, 20000}

◆ size_in_mm

MinMax<float> priv::Limits::size_in_mm {0.1f, 1000.f}

◆ skew

Limit<float> priv::Limits::skew {{-1.f, 1.f}, {-100.f, 100.f}}

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