OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::ConfigOptionPoint3 Class Reference

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

Inheritance diagram for Slic3r::ConfigOptionPoint3:
Collaboration diagram for Slic3r::ConfigOptionPoint3:

Public Member Functions

 ConfigOptionPoint3 ()
 ConfigOptionPoint3 (const Vec3d &value)
ConfigOptionType type () const override
ConfigOption * clone () const override
ConfigOptionPoint3 & operator= (const ConfigOption *opt)
bool operator== (const ConfigOptionPoint3 &rhs) const throw ()
bool operator< (const ConfigOptionPoint3 &rhs) const throw ()
std::string serialize () const override
bool deserialize (const std::string &str, bool append=false) override
 operator Vec3d () const
void set (const ConfigOption *rhs) override
bool operator== (const ConfigOption &rhs) const override
bool operator!= (const Vec3d &rhs) const throw ()
bool operator!= (const ConfigOption &rhs) const
bool operator< (const Vec3d &rhs) const throw ()
size_t hash () const override throw ()
virtual int getInt () const
virtual double getFloat () const
virtual bool getBool () const
virtual void setInt (int)
bool is_scalar () const
bool is_vector () const
virtual bool nullable () const
virtual bool is_nil () const
virtual bool overriden_by (const ConfigOption *rhs) const
virtual bool apply_override (const ConfigOption *rhs, std::vector< int > &default_index)

Static Public Member Functions

static ConfigOptionType static_type ()

Public Attributes

Vec3d value

Private Member Functions

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

Friends

class cereal::access

Detailed Description

Constructor & Destructor Documentation

◆ ConfigOptionPoint3() [1/2]

Slic3r::ConfigOptionPoint3::ConfigOptionPoint3 ( )
inline
ConfigOptionSingle(Vec3d value)
Definition Config.hpp:330
Eigen::Matrix< double, 3, 1, Eigen::DontAlign > Vec3d
Definition Point.hpp:68

References Slic3r::ConfigOptionSingle< Vec3d >::ConfigOptionSingle().

Referenced by clone(), operator<(), operator=(), and operator==().

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

◆ ConfigOptionPoint3() [2/2]

Slic3r::ConfigOptionPoint3::ConfigOptionPoint3 ( const Vec3d & value)
inlineexplicit
Vec3d value
Definition Config.hpp:329

References Slic3r::ConfigOptionSingle< Vec3d >::ConfigOptionSingle(), and Slic3r::ConfigOptionSingle< Vec3d >::value.

Here is the call graph for this function:

Member Function Documentation

◆ apply_override()

virtual bool Slic3r::ConfigOption::apply_override ( const ConfigOption * rhs,
std::vector< int > & default_index )
inlinevirtualinherited
314 {
315 if (*this == *rhs)
316 return false;
317 *this = *rhs;
318 return true;
319 }
Definition Config.hpp:327

◆ clone()

ConfigOption * Slic3r::ConfigOptionPoint3::clone ( ) const
inlineoverridevirtual

Implements Slic3r::ConfigOption.

1668{ return new ConfigOptionPoint3(*this); }
ConfigOptionPoint3()
Definition Config.hpp:1663

References ConfigOptionPoint3().

Here is the call graph for this function:

◆ deserialize()

bool Slic3r::ConfigOptionPoint3::deserialize ( const std::string & str,
bool append = false )
inlineoverridevirtual

Implements Slic3r::ConfigOption.

1687 {
1688 UNUSED(append);
1689 char dummy;
1690 Vec3d value;
1691 if (sscanf(str.data(), " %lf , %lf , %lf %c", &value(0), &value(1), &value(2), &dummy) != 3 &&
1692 sscanf(str.data(), " %lf x %lf x %lf %c", &value(0), &value(1), &value(2), &dummy) != 3)
1693 return false;
1694 this->value = value;
1695 return true;
1696 }
#define UNUSED(x)
Definition libslic3r.h:112
void append(std::vector< T, Alloc > &dest, const std::vector< T, Alloc2 > &src)
Definition libslic3r.h:157

References Slic3r::append(), UNUSED, and Slic3r::ConfigOptionSingle< Vec3d >::value.

Here is the call graph for this function:

◆ getBool()

virtual bool Slic3r::ConfigOption::getBool ( ) const
inlinevirtualinherited
296{ throw BadOptionTypeException("Calling ConfigOption::getBool on a non-boolean ConfigOption"); }

◆ getFloat()

virtual double Slic3r::ConfigOption::getFloat ( ) const
inlinevirtualinherited
295{ throw BadOptionTypeException("Calling ConfigOption::getFloat on a non-float ConfigOption"); }

◆ getInt()

virtual int Slic3r::ConfigOption::getInt ( ) const
inlinevirtualinherited
294{ throw BadOptionTypeException("Calling ConfigOption::getInt on a non-int ConfigOption"); }

◆ hash()

size_t Slic3r::ConfigOptionSingle< Vec3d >::hash ( ) const
throw ( )
inlineoverridevirtualinherited

Implements Slic3r::ConfigOption.

353{ return std::hash<T>{}(this->value); }

◆ is_nil()

virtual bool Slic3r::ConfigOption::is_nil ( ) const
inlinevirtualinherited
306{ return false; }

◆ is_scalar()

bool Slic3r::ConfigOption::is_scalar ( ) const
inlineinherited
301{ return (int(this->type()) & int(coVectorType)) == 0; }
virtual ConfigOptionType type() const=0

◆ is_vector()

bool Slic3r::ConfigOption::is_vector ( ) const
inlineinherited
302{ return ! this->is_scalar(); }
bool is_scalar() const
Definition Config.hpp:301

◆ nullable()

virtual bool Slic3r::ConfigOption::nullable ( ) const
inlinevirtualinherited
304{ return false; }

◆ operator Vec3d()

Slic3r::ConfigOptionSingle< Vec3d >::operator Vec3d ( ) const
inlineinherited
331{ return this->value; }

◆ operator!=() [1/2]

bool Slic3r::ConfigOption::operator!= ( const ConfigOption & rhs) const
inlineinherited
299{ return ! (*this == rhs); }

◆ operator!=() [2/2]

bool Slic3r::ConfigOptionSingle< Vec3d >::operator!= ( const Vec3d & rhs) const
throw ( )
inlineinherited
350{ return this->value != rhs; }

◆ operator<() [1/2]

bool Slic3r::ConfigOptionPoint3::operator< ( const ConfigOptionPoint3 & rhs) const
throw ( )
inline
1673 { return this->value.x() < rhs.value.x() || (this->value.x() == rhs.value.x() && (this->value.y() < rhs.value.y() || (this->value.y() == rhs.value.y() && this->value.z() < rhs.value.z()))); }

References ConfigOptionPoint3().

Here is the call graph for this function:

◆ operator<() [2/2]

bool Slic3r::ConfigOptionSingle< Vec3d >::operator< ( const Vec3d & rhs) const
throw ( )
inlineinherited
351{ return this->value < rhs; }

◆ operator=()

ConfigOptionPoint3 & Slic3r::ConfigOptionPoint3::operator= ( const ConfigOption * opt)
inline
1669{ this->set(opt); return *this; }
void set(const ConfigOption *rhs) override
Definition Config.hpp:333

References ConfigOptionPoint3(), and Slic3r::ConfigOptionSingle< Vec3d >::set().

Here is the call graph for this function:

◆ operator==() [1/2]

bool Slic3r::ConfigOptionPoint3::operator== ( const ConfigOptionPoint3 & rhs) const
throw ( )
inline
1671{ return this->value == rhs.value; }

References ConfigOptionPoint3().

Here is the call graph for this function:

◆ operator==() [2/2]

bool Slic3r::ConfigOptionSingle< Vec3d >::operator== ( const ConfigOption & rhs) const
inlineoverridevirtualinherited

Implements Slic3r::ConfigOption.

342 {
343 if (rhs.type() != this->type())
344 throw ConfigurationError("ConfigOptionSingle: Comparing incompatible types");
345 assert(dynamic_cast<const ConfigOptionSingle<T>*>(&rhs));
346 return this->value == static_cast<const ConfigOptionSingle<T>*>(&rhs)->value;
347 }

◆ overriden_by()

virtual bool Slic3r::ConfigOption::overriden_by ( const ConfigOption * rhs) const
inlinevirtualinherited
309 {
310 assert(! this->nullable() && ! rhs->nullable());
311 return *this != *rhs;
312 }
virtual bool nullable() const
Definition Config.hpp:304

◆ serialize() [1/2]

std::string Slic3r::ConfigOptionPoint3::serialize ( ) const
inlineoverridevirtual

Implements Slic3r::ConfigOption.

1676 {
1677 std::ostringstream ss;
1678 ss << this->value(0);
1679 ss << ",";
1680 ss << this->value(1);
1681 ss << ",";
1682 ss << this->value(2);
1683 return ss.str();
1684 }

References Slic3r::ConfigOptionSingle< Vec3d >::value.

◆ serialize() [2/2]

template<class Archive>
void Slic3r::ConfigOptionPoint3::serialize ( Archive & ar)
inlineprivate
1700{ ar(cereal::base_class<ConfigOptionSingle<Vec3d>>(this)); }

References Slic3r::ConfigOptionSingle< Vec3d >::ConfigOptionSingle().

Here is the call graph for this function:

◆ set()

void Slic3r::ConfigOptionSingle< Vec3d >::set ( const ConfigOption * rhs)
inlineoverridevirtualinherited

Implements Slic3r::ConfigOption.

334 {
335 if (rhs->type() != this->type())
336 throw ConfigurationError("ConfigOptionSingle: Assigning an incompatible type");
337 assert(dynamic_cast<const ConfigOptionSingle<T>*>(rhs));
338 this->value = static_cast<const ConfigOptionSingle<T>*>(rhs)->value;
339 }

Referenced by Slic3r::ConfigOptionPoint3::operator=().

Here is the caller graph for this function:

◆ setInt()

virtual void Slic3r::ConfigOption::setInt ( int )
inlinevirtualinherited
297{ throw BadOptionTypeException("Calling ConfigOption::setInt on a non-int ConfigOption"); }

◆ static_type()

ConfigOptionType Slic3r::ConfigOptionPoint3::static_type ( )
inlinestatic
1666{ return coPoint3; }
@ coPoint3
Definition Config.hpp:207

References Slic3r::coPoint3.

Referenced by type().

Here is the caller graph for this function:

◆ type()

ConfigOptionType Slic3r::ConfigOptionPoint3::type ( ) const
inlineoverridevirtual

Implements Slic3r::ConfigOption.

1667{ return static_type(); }
static ConfigOptionType static_type()
Definition Config.hpp:1666

References static_type().

Here is the call graph for this function:

◆ cereal::access

friend class cereal::access
friend

References cereal::access.

Referenced by cereal::access.

Member Data Documentation

◆ value


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