OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::TransformationType Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/GUI_Geometry.hpp>

Public Types

enum  Enum {
  World = 0 , Instance = 1 , Local = 2 , Absolute = 0 ,
  Relative = 4 , Joint = 0 , Independent = 8 , World_Relative_Joint = World | Relative | Joint ,
  World_Relative_Independent = World | Relative | Independent , Instance_Absolute_Joint = Instance | Absolute | Joint , Instance_Absolute_Independent = Instance | Absolute | Independent , Instance_Relative_Joint = Instance | Relative | Joint ,
  Instance_Relative_Independent = Instance | Relative | Independent , Local_Absolute_Joint = Local | Absolute | Joint , Local_Absolute_Independent = Local | Absolute | Independent , Local_Relative_Joint = Local | Relative | Joint ,
  Local_Relative_Independent = Local | Relative | Independent
}

Public Member Functions

 TransformationType ()
 TransformationType (Enum value)
TransformationType & operator= (Enum value)
Enum operator() () const
bool has (Enum v) const
void set_world ()
void set_instance ()
void set_local ()
void set_absolute ()
void set_relative ()
void set_joint ()
void set_independent ()
bool world () const
bool instance () const
bool local () const
bool absolute () const
bool relative () const
bool joint () const
bool independent () const

Private Member Functions

void add (Enum v)
void remove (Enum v)

Private Attributes

Enum m_value

Detailed Description

Member Enumeration Documentation

◆ Enum

Enumerator
World 
Instance 
Local 
Absolute 
Relative 
Joint 
Independent 
World_Relative_Joint 
World_Relative_Independent 
Instance_Absolute_Joint 
Instance_Absolute_Independent 
Instance_Relative_Joint 
Instance_Relative_Independent 
Local_Absolute_Joint 
Local_Absolute_Independent 
Local_Relative_Joint 
Local_Relative_Independent 
17 {
18 // Transforming in a world coordinate system
19 World = 0,
20 // Transforming in a instance coordinate system
21 Instance = 1,
22 // Transforming in a local coordinate system
23 Local = 2,
24 // Absolute transformations, allowed in local coordinate system only.
25 Absolute = 0,
26 // Relative transformations, allowed in both local and world coordinate system.
27 Relative = 4,
28 // For group selection, the transformation is performed as if the group made a single solid body.
29 Joint = 0,
30 // For group selection, the transformation is performed on each object independently.
31 Independent = 8,
32
43 };
@ Instance_Relative_Independent
Definition GUI_Geometry.hpp:38
@ Instance_Absolute_Joint
Definition GUI_Geometry.hpp:35
@ World
Definition GUI_Geometry.hpp:19
@ Local_Relative_Joint
Definition GUI_Geometry.hpp:41
@ World_Relative_Joint
Definition GUI_Geometry.hpp:33
@ Local
Definition GUI_Geometry.hpp:23
@ Local_Absolute_Independent
Definition GUI_Geometry.hpp:40
@ Local_Relative_Independent
Definition GUI_Geometry.hpp:42
@ Joint
Definition GUI_Geometry.hpp:29
@ Local_Absolute_Joint
Definition GUI_Geometry.hpp:39
@ World_Relative_Independent
Definition GUI_Geometry.hpp:34
@ Independent
Definition GUI_Geometry.hpp:31
@ Absolute
Definition GUI_Geometry.hpp:25
@ Relative
Definition GUI_Geometry.hpp:27
@ Instance
Definition GUI_Geometry.hpp:21
@ Instance_Relative_Joint
Definition GUI_Geometry.hpp:37
@ Instance_Absolute_Independent
Definition GUI_Geometry.hpp:36

Constructor & Destructor Documentation

◆ TransformationType() [1/2]

Slic3r::GUI::TransformationType::TransformationType ( )
inline
45: m_value(World) {}
Enum m_value
Definition GUI_Geometry.hpp:72

References m_value, and World.

Referenced by operator=().

Here is the caller graph for this function:

◆ TransformationType() [2/2]

Slic3r::GUI::TransformationType::TransformationType ( Enum value)
inline
46: m_value(value) {}

References m_value.

Member Function Documentation

◆ absolute()

bool Slic3r::GUI::TransformationType::absolute ( ) const
inline
63{ return !this->has(Relative); }
bool has(Enum v) const
Definition GUI_Geometry.hpp:50

References has(), and Relative.

Referenced by Slic3r::GUI::GizmoObjectManipulation::change_absolute_rotation_value(), Slic3r::GUI::GizmoObjectManipulation::change_rotation_value(), Slic3r::GUI::Selection::rotate(), Slic3r::GUI::Selection::scale_and_translate(), and Slic3r::GUI::Selection::translate().

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

◆ add()

void Slic3r::GUI::TransformationType::add ( Enum v)
inlineprivate
69{ m_value = Enum((unsigned int)m_value | (unsigned int)v); }
Enum
Definition GUI_Geometry.hpp:17

References m_value.

Referenced by set_independent(), set_instance(), set_local(), and set_relative().

Here is the caller graph for this function:

◆ has()

bool Slic3r::GUI::TransformationType::has ( Enum v) const
inline
50{ return ((unsigned int)m_value & (unsigned int)v) != 0; }

References m_value.

Referenced by absolute(), independent(), instance(), joint(), local(), relative(), and world().

Here is the caller graph for this function:

◆ independent()

bool Slic3r::GUI::TransformationType::independent ( ) const
inline
66{ return this->has(Independent); }

References has(), and Independent.

Referenced by Slic3r::GUI::Selection::transform_instance_relative(), and Slic3r::GUI::Selection::transform_volume_relative().

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

◆ instance()

bool Slic3r::GUI::TransformationType::instance ( ) const
inline
61{ return this->has(Instance); }

References has(), and Instance.

Referenced by Slic3r::GUI::Selection::rotate(), Slic3r::GUI::Selection::scale_and_translate(), Slic3r::GUI::Selection::transform_instance_relative(), Slic3r::GUI::Selection::transform_volume_relative(), and Slic3r::GUI::Selection::translate().

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

◆ joint()

bool Slic3r::GUI::TransformationType::joint ( ) const
inline
65{ return !this->has(Independent); }

References has(), and Independent.

Here is the call graph for this function:

◆ local()

bool Slic3r::GUI::TransformationType::local ( ) const
inline
62{ return this->has(Local); }

References has(), and Local.

Referenced by Slic3r::GUI::Selection::rotate(), Slic3r::GUI::Selection::scale_and_translate(), Slic3r::GUI::Selection::transform_volume_relative(), and Slic3r::GUI::Selection::translate().

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

◆ operator()()

Enum Slic3r::GUI::TransformationType::operator() ( ) const
inline
49{ return m_value; }

References m_value.

◆ operator=()

TransformationType & Slic3r::GUI::TransformationType::operator= ( Enum value)
inline
47{ m_value = value; return *this; }

References TransformationType(), and m_value.

Here is the call graph for this function:

◆ relative()

bool Slic3r::GUI::TransformationType::relative ( ) const
inline
64{ return this->has(Relative); }

References has(), and Relative.

Referenced by Slic3r::GUI::Selection::rotate(), Slic3r::GUI::Selection::transform_instance_relative(), and Slic3r::GUI::Selection::transform_volume_relative().

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

◆ remove()

void Slic3r::GUI::TransformationType::remove ( Enum v)
inlineprivate
70{ m_value = Enum((unsigned int)m_value & (~(unsigned int)v)); }

References m_value.

Referenced by set_absolute(), set_instance(), set_joint(), set_local(), and set_world().

Here is the caller graph for this function:

◆ set_absolute()

void Slic3r::GUI::TransformationType::set_absolute ( )
inline
55{ this->remove(Relative); }
void remove(Enum v)
Definition GUI_Geometry.hpp:70

References Relative, and remove().

Here is the call graph for this function:

◆ set_independent()

void Slic3r::GUI::TransformationType::set_independent ( )
inline
58{ this->add(Independent); }
void add(Enum v)
Definition GUI_Geometry.hpp:69

References add(), and Independent.

Referenced by Slic3r::GUI::GizmoObjectManipulation::change_absolute_rotation_value(), Slic3r::GUI::GizmoObjectManipulation::change_rotation_value(), Slic3r::GUI::GLGizmoRotate3D::on_mouse(), Slic3r::GUI::GLGizmoScale3D::on_mouse(), and Slic3r::GUI::Selection::scale_and_translate().

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

◆ set_instance()

void Slic3r::GUI::TransformationType::set_instance ( )
inline
53{ this->remove(Local); this->add(Instance); }

References add(), Instance, Local, and remove().

Referenced by Slic3r::GUI::GizmoObjectManipulation::change_absolute_rotation_value(), Slic3r::GUI::GizmoObjectManipulation::change_position_value(), Slic3r::GUI::GizmoObjectManipulation::change_rotation_value(), Slic3r::GUI::GizmoObjectManipulation::do_scale(), Slic3r::GUI::GLGizmoMove3D::on_dragging(), and Slic3r::GUI::GLGizmoScale3D::on_mouse().

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

◆ set_joint()

void Slic3r::GUI::TransformationType::set_joint ( )
inline
57{ this->remove(Independent); }

References Independent, and remove().

Referenced by Slic3r::GUI::GLGizmoMeasure::render_dimensioning(), and Slic3r::GUI::Selection::scale_to_fit_print_volume().

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

◆ set_local()

void Slic3r::GUI::TransformationType::set_local ( )
inline
54{ this->remove(Instance); this->add(Local); }

References add(), Instance, Local, and remove().

Referenced by Slic3r::GUI::GizmoObjectManipulation::change_absolute_rotation_value(), Slic3r::GUI::GizmoObjectManipulation::change_position_value(), Slic3r::GUI::GizmoObjectManipulation::change_rotation_value(), Slic3r::GUI::GizmoObjectManipulation::do_scale(), Slic3r::GUI::GLGizmoMove3D::on_dragging(), and Slic3r::GUI::GLGizmoScale3D::on_mouse().

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

◆ set_relative()

◆ set_world()

void Slic3r::GUI::TransformationType::set_world ( )
inline
52{ this->remove(Instance); this->remove(Local); }

References Instance, Local, and remove().

Referenced by Slic3r::GUI::GLGizmoMeasure::render_dimensioning(), and Slic3r::GUI::Selection::scale_to_fit_print_volume().

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

◆ world()

bool Slic3r::GUI::TransformationType::world ( ) const
inline
60{ return !this->has(Instance) && !this->has(Local); }

References has(), Instance, and Local.

Referenced by Slic3r::GUI::Selection::rotate(), Slic3r::GUI::Selection::scale_and_translate(), Slic3r::GUI::Selection::transform_instance_relative(), Slic3r::GUI::Selection::transform_volume_relative(), and Slic3r::GUI::Selection::translate().

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

Member Data Documentation

◆ m_value

Enum Slic3r::GUI::TransformationType::m_value
private

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