OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::FloatOrPercent Struct Reference

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

Public Member Functions

 FloatOrPercent ()
 FloatOrPercent (double value_, bool percent_)
double get_abs_value (double ratio_over) const

Public Attributes

double value = 0
bool percent = false

Private Member Functions

template<class Archive>
void serialize (Archive &ar)

Friends

class cereal::access

Detailed Description

Constructor & Destructor Documentation

◆ FloatOrPercent() [1/2]

Slic3r::FloatOrPercent::FloatOrPercent ( )
inline
52{}

◆ FloatOrPercent() [2/2]

Slic3r::FloatOrPercent::FloatOrPercent ( double value_,
bool percent_ )
inline
53: value(value_), percent(percent_) { }
bool percent
Definition Config.hpp:50
double value
Definition Config.hpp:49

References percent, and value.

Member Function Documentation

◆ get_abs_value()

double Slic3r::FloatOrPercent::get_abs_value ( double ratio_over) const
inline
55{ return this->percent ? (ratio_over * this->value / 100) : this->value; }

◆ serialize()

template<class Archive>
void Slic3r::FloatOrPercent::serialize ( Archive & ar)
inlineprivate
59{ ar(this->value); ar(this->percent); }

◆ cereal::access

friend class cereal::access
friend

References cereal::access.

Referenced by cereal::access.

Member Data Documentation

◆ percent

◆ value


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