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

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

Public Member Functions

 Rect ()=default
 Rect (float left, float top, float right, float bottom)
bool operator== (const Rect &other) const
bool operator!= (const Rect &other) const
float get_left () const
void set_left (float left)
float get_top () const
void set_top (float top)
float get_right () const
void set_right (float right)
float get_bottom () const
void set_bottom (float bottom)
float get_width () const
float get_height () const

Private Attributes

float m_left { 0.0f }
float m_top { 0.0f }
float m_right { 0.0f }
float m_bottom { 0.0f }

Detailed Description

Constructor & Destructor Documentation

◆ Rect() [1/2]

Slic3r::GUI::Rect::Rect ( )
default

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

Here is the caller graph for this function:

◆ Rect() [2/2]

Slic3r::GUI::Rect::Rect ( float left,
float top,
float right,
float bottom )
inline
53: m_left(left) , m_top(top) , m_right(right) , m_bottom(bottom) {}
float m_bottom
Definition GLGizmosManager.hpp:49
float m_right
Definition GLGizmosManager.hpp:48
float m_left
Definition GLGizmosManager.hpp:46
float m_top
Definition GLGizmosManager.hpp:47

References m_bottom, m_left, m_right, and m_top.

Member Function Documentation

◆ get_bottom()

float Slic3r::GUI::Rect::get_bottom ( ) const
inline
73{ return m_bottom; }

References m_bottom.

Referenced by Slic3r::GUI::GLCanvas3D::_perform_layer_editing_action(), Slic3r::GUI::GLCanvas3D::LayersEditing::bar_rect_contains(), and Slic3r::GUI::GLCanvas3D::LayersEditing::get_cursor_z_relative().

Here is the caller graph for this function:

◆ get_height()

float Slic3r::GUI::Rect::get_height ( ) const
inline
77{ return m_top - m_bottom; }

References m_bottom, and m_top.

◆ get_left()

float Slic3r::GUI::Rect::get_left ( ) const
inline
64{ return m_left; }

References m_left.

Referenced by Slic3r::GUI::GLCanvas3D::LayersEditing::bar_rect_contains(), and Slic3r::GUI::GLCanvas3D::LayersEditing::get_cursor_z_relative().

Here is the caller graph for this function:

◆ get_right()

float Slic3r::GUI::Rect::get_right ( ) const
inline
70{ return m_right; }

References m_right.

Referenced by Slic3r::GUI::GLCanvas3D::LayersEditing::bar_rect_contains(), and Slic3r::GUI::GLCanvas3D::LayersEditing::get_cursor_z_relative().

Here is the caller graph for this function:

◆ get_top()

float Slic3r::GUI::Rect::get_top ( ) const
inline
67{ return m_top; }

References m_top.

Referenced by Slic3r::GUI::GLCanvas3D::_perform_layer_editing_action(), Slic3r::GUI::GLCanvas3D::LayersEditing::bar_rect_contains(), and Slic3r::GUI::GLCanvas3D::LayersEditing::get_cursor_z_relative().

Here is the caller graph for this function:

◆ get_width()

float Slic3r::GUI::Rect::get_width ( ) const
inline
76{ return m_right - m_left; }

References m_left, and m_right.

◆ operator!=()

bool Slic3r::GUI::Rect::operator!= ( const Rect & other) const
inline
62{ return !operator==(other); }
bool operator==(const Rect &other) const
Definition GLGizmosManager.hpp:55

References Rect(), and operator==().

Here is the call graph for this function:

◆ operator==()

bool Slic3r::GUI::Rect::operator== ( const Rect & other) const
inline
55 {
56 if (std::abs(m_left - other.m_left) > EPSILON) return false;
57 if (std::abs(m_top - other.m_top) > EPSILON) return false;
58 if (std::abs(m_right - other.m_right) > EPSILON) return false;
59 if (std::abs(m_bottom - other.m_bottom) > EPSILON) return false;
60 return true;
61 }
#define EPSILON
Definition ColorUtils.cpp:64

References Rect(), EPSILON, m_bottom, m_left, m_right, and m_top.

Referenced by operator!=().

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

◆ set_bottom()

void Slic3r::GUI::Rect::set_bottom ( float bottom)
inline
74{ m_bottom = bottom; }

References m_bottom.

◆ set_left()

void Slic3r::GUI::Rect::set_left ( float left)
inline
65{ m_left = left; }
@ left
Definition MarchingSquares.hpp:188

References m_left.

◆ set_right()

void Slic3r::GUI::Rect::set_right ( float right)
inline
71{ m_right = right; }
@ right
Definition MarchingSquares.hpp:190

References m_right.

◆ set_top()

void Slic3r::GUI::Rect::set_top ( float top)
inline
68{ m_top = top; }

References m_top.

Member Data Documentation

◆ m_bottom

float Slic3r::GUI::Rect::m_bottom { 0.0f }
private
49{ 0.0f };

Referenced by Rect(), get_bottom(), get_height(), operator==(), and set_bottom().

◆ m_left

float Slic3r::GUI::Rect::m_left { 0.0f }
private
46{ 0.0f };

Referenced by Rect(), get_left(), get_width(), operator==(), and set_left().

◆ m_right

float Slic3r::GUI::Rect::m_right { 0.0f }
private
48{ 0.0f };

Referenced by Rect(), get_right(), get_width(), operator==(), and set_right().

◆ m_top

float Slic3r::GUI::Rect::m_top { 0.0f }
private
47{ 0.0f };

Referenced by Rect(), get_height(), get_top(), operator==(), and set_top().


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