#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/3DBed.hpp>
Classes | |
| class | Axes |
Public Types | |
| enum class | Type : unsigned char { System , Custom } |
Public Member Functions | |
| Bed3D ()=default | |
| ~Bed3D ()=default | |
| bool | set_shape (const Pointfs &printable_area, const double printable_height, std::vector< Pointfs > extruder_areas, std::vector< double > extruder_heights, const std::string &custom_model, bool force_as_custom=false, const Vec2d position=Vec2d::Zero(), bool with_reset=true) |
| void | set_position (Vec2d &position) |
| void | set_axes_mode (bool origin) |
| void | set_axes_origin (const Vec3d &origin) |
| const Vec2d & | get_position () const |
| const BuildVolume & | build_volume () const |
| BuildVolume & | build_volume () |
| Type | get_type () const |
| bool | is_custom () const |
| BuildVolume_Type | get_build_volume_type () const |
| const BoundingBoxf3 & | extended_bounding_box () const |
| const BoundingBoxf3 & | printable_bounding_box () const |
| bool | contains (const Point &point) const |
| Point | point_projection (const Point &point) const |
| void | render (GLCanvas3D &canvas, const Transform3d &view_matrix, const Transform3d &projection_matrix, bool bottom, float scale_factor, bool show_axes) |
| void | on_change_color_mode (bool is_dark) |
Static Public Member Functions | |
| static void | update_render_colors () |
| static void | load_render_colors () |
Static Public Attributes | |
| static ColorRGBA | DEFAULT_MODEL_COLOR = { 0.3255f, 0.337f, 0.337f, 1.0f } |
| static ColorRGBA | DEFAULT_MODEL_COLOR_DARK = { 0.255f, 0.255f, 0.283f, 1.0f } |
| static ColorRGBA | DEFAULT_SOLID_GRID_COLOR = { 0.9f, 0.9f, 0.9f, 1.0f } |
| static ColorRGBA | DEFAULT_TRANSPARENT_GRID_COLOR = { 0.9f, 0.9f, 0.9f, 0.6f } |
| static ColorRGBA | AXIS_X_COLOR = ColorRGBA::X() |
| static ColorRGBA | AXIS_Y_COLOR = ColorRGBA::Y() |
| static ColorRGBA | AXIS_Z_COLOR = ColorRGBA::Z() |
Private Member Functions | |
| BoundingBoxf3 | calc_printable_bounding_box () const |
| BoundingBoxf3 | calc_extended_bounding_box () const |
| void | update_model_offset () |
| void | update_bed_triangles () |
| void | render_internal (GLCanvas3D &canvas, const Transform3d &view_matrix, const Transform3d &projection_matrix, bool bottom, float scale_factor, bool show_axes) |
| void | render_axes () |
| void | render_system (GLCanvas3D &canvas, const Transform3d &view_matrix, const Transform3d &projection_matrix, bool bottom) |
| void | render_model (const Transform3d &view_matrix, const Transform3d &projection_matrix) |
| void | render_custom (GLCanvas3D &canvas, const Transform3d &view_matrix, const Transform3d &projection_matrix, bool bottom) |
| void | render_default (bool bottom, const Transform3d &view_matrix, const Transform3d &projection_matrix) |
| void | render_gravity_arrow (const Transform3d &view_matrix, const Transform3d &projection_matrix) |
Static Private Member Functions | |
| static std::tuple< Type, std::string, std::string > | detect_type (const Pointfs &shape) |
Private Attributes | |
| BuildVolume | m_build_volume |
| Type | m_type { Type::System } |
| std::string | m_model_filename |
| BoundingBoxf3 | m_extended_bounding_box |
| BoundingBoxf3 | m_printable_bounding_box |
| GLModel | m_triangles |
| GLModel | m_model |
| Vec3d | m_model_offset { Vec3d::Zero() } |
| GLModel | m_gravity_arrow |
| float | m_gravity_arrow_length { 0.f } |
| Axes | m_axes |
| float | m_scale_factor { 1.0f } |
| Vec2d | m_position { Vec2d::Zero() } |
| std::vector< Vec2d > | m_bed_shape |
| std::vector< std::vector< Vec2d > > | m_extruder_shapes |
| std::vector< double > | m_extruder_heights |
| bool | m_is_dark = false |
|
strong |
| Enumerator | |
|---|---|
| System | |
| Custom | |
|
default |
|
default |
References Slic3r::printable_area(), and Slic3r::printable_height().
|
inline |
References m_build_volume.
|
inline |
References m_build_volume.
Referenced by Slic3r::GUI::Plater::priv::load_files(), Slic3r::GUI::Plater::priv::load_model_objects(), Slic3r::GUI::Plater::priv::scale_selection_to_fit_print_volume(), Slic3r::GUI::Plater::priv::update(), and update_bed_triangles().
|
private |
References Slic3r::BoundingBoxBase< PointType, std::vector< PointType > >::defined, m_model, m_model_offset, m_printable_bounding_box, Slic3r::BoundingBox3Base< PointType >::merge(), and Slic3r::BoundingBox3Base< PointType >::translate().
Referenced by update_bed_triangles(), and update_model_offset().
|
private |
References Slic3r::GUI::Bed3D::Axes::DefaultTipRadius, Slic3r::BoundingBoxBase< PointType, std::vector< PointType > >::defined, GROUND_Z, m_axes, m_build_volume, m_position, Slic3r::BoundingBoxBase< PointType, std::vector< PointType > >::max, Slic3r::BoundingBox3Base< PointType >::merge(), Slic3r::BoundingBoxBase< PointType, std::vector< PointType > >::min, Slic3r::offset(), and Slic3r::BoundingBox3Base< PointType >::size().
Referenced by update_bed_triangles(), and update_model_offset().
| bool Slic3r::GUI::Bed3D::contains | ( | const Point & | point | ) | const |
|
staticprivate |
References Slic3r::Preset::config, Custom, Slic3r::ConfigOptionResolver::has(), Slic3r::Preset::is_system, Slic3r::make_counter_clockwise(), Slic3r::GUI::model_filename, Slic3r::DynamicConfig::opt(), Slic3r::ConfigBase::option(), System, Slic3r::PresetUtils::system_printer_bed_model(), and Slic3r::ConfigOptionVector< T >::values.
Referenced by set_shape().
|
inline |
References m_extended_bounding_box.
|
inline |
References m_build_volume.
|
inline |
References m_position.
|
inline |
|
static |
References AXIS_X_COLOR, AXIS_Y_COLOR, AXIS_Z_COLOR, Slic3r::RenderColor::colors, RenderCol_Axis_X, RenderCol_Axis_Y, RenderCol_Axis_Z, and Slic3r::GUI::ImGuiWrapper::to_ImVec4().
Referenced by Slic3r::GUI::GLCanvas3D::init().
| void Slic3r::GUI::Bed3D::on_change_color_mode | ( | bool | is_dark | ) |
|
inline |
References m_printable_bounding_box.
| void Slic3r::GUI::Bed3D::render | ( | GLCanvas3D & | canvas, |
| const Transform3d & | view_matrix, | ||
| const Transform3d & | projection_matrix, | ||
| bool | bottom, | ||
| float | scale_factor, | ||
| bool | show_axes ) |
References render_internal().
|
private |
References m_axes, and m_build_volume.
Referenced by render_internal().
|
private |
References m_model_filename, render_default(), and render_model().
Referenced by render_internal().
|
private |
References DEFAULT_MODEL_COLOR, DEFAULT_MODEL_COLOR_DARK, GL_BLEND, GL_DEPTH_TEST, GL_FALSE, GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA, GL_TRUE, glBlendFunc, glDepthMask, glDisable, glEnable, glsafe, m_is_dark, m_model, m_triangles, Slic3r::GLShaderProgram::set_uniform(), Slic3r::GLShaderProgram::start_using(), Slic3r::GLShaderProgram::stop_using(), and update_bed_triangles().
Referenced by render_custom().
|
private |
References Slic3r::angle(), Slic3r::GUI::build_plate_tilt_up_direction(), Slic3r::dot(), Slic3r::GUI::Camera::get_projection_matrix(), Slic3r::GUI::Camera::get_view_matrix(), GL_DEPTH_TEST, glEnable, glsafe, Slic3r::length(), m_axes, m_gravity_arrow, m_gravity_arrow_length, M_PI, Slic3r::GLShaderProgram::set_uniform(), Slic3r::GUI::smooth_cylinder(), Slic3r::GLShaderProgram::start_using(), and Slic3r::GLShaderProgram::stop_using().
Referenced by render_internal().
|
private |
References Custom, DEFAULT_MODEL_COLOR, DEFAULT_MODEL_COLOR_DARK, GL_DEPTH_TEST, glDisable, glEnable, glsafe, m_is_dark, m_model, m_scale_factor, m_type, render_axes(), render_custom(), render_gravity_arrow(), render_system(), and System.
Referenced by render().
|
private |
References Slic3r::Geometry::assemble_transform(), Slic3r::BuildVolume::BuildSharedVolume::data, DEFAULT_MODEL_COLOR, DEFAULT_MODEL_COLOR_DARK, Slic3r::GUI::Camera::get_projection_matrix(), Slic3r::GUI::Camera::get_view_matrix(), m_build_volume, m_is_dark, m_model, m_model_filename, m_model_offset, Slic3r::GLShaderProgram::set_uniform(), Slic3r::GLShaderProgram::start_using(), Slic3r::GLShaderProgram::stop_using(), Slic3r::BuildVolume::BuildSharedVolume::type, update_model_offset(), and Slic3r::BuildVolume::BuildSharedVolume::zs.
Referenced by render_custom(), and render_system().
|
private |
References render_model().
Referenced by render_internal().
| void Slic3r::GUI::Bed3D::set_axes_mode | ( | bool | origin | ) |
References GROUND_Z, m_axes, and m_position.
|
inline |
| void Slic3r::GUI::Bed3D::set_position | ( | Vec2d & | position | ) |
References m_bed_shape, m_build_volume, m_extruder_heights, m_extruder_shapes, m_model_filename, and set_shape().
| bool Slic3r::GUI::Bed3D::set_shape | ( | const Pointfs & | printable_area, |
| const double | printable_height, | ||
| std::vector< Pointfs > | extruder_areas, | ||
| std::vector< double > | extruder_heights, | ||
| const std::string & | custom_model, | ||
| bool | force_as_custom = false, | ||
| const Vec2d | position = Vec2d::Zero(), | ||
| bool | with_reset = true ) |
References Custom, detect_type(), GROUND_Z, m_axes, m_bed_shape, m_build_volume, m_extruder_heights, m_extruder_shapes, m_model, m_model_filename, m_position, m_triangles, m_type, Slic3r::GUI::model_filename, Slic3r::printable_area(), Slic3r::printable_height(), and update_model_offset().
Referenced by set_position().
|
private |
References build_volume(), calc_extended_bounding_box(), calc_printable_bounding_box(), Slic3r::get_extents(), GROUND_Z, Slic3r::GUI::init_model_from_poly(), m_bed_shape, m_build_volume, m_extended_bounding_box, m_model_offset, m_printable_bounding_box, m_triangles, and Slic3r::Polygon::new_scale().
Referenced by render_default().
|
private |
References calc_extended_bounding_box(), calc_printable_bounding_box(), GROUND_Z, m_bed_shape, m_build_volume, m_extended_bounding_box, m_model_filename, m_model_offset, m_printable_bounding_box, and m_triangles.
Referenced by render_model(), and set_shape().
|
static |
References AXIS_X_COLOR, AXIS_Y_COLOR, AXIS_Z_COLOR, Slic3r::RenderColor::colors, Slic3r::GUI::ImGuiWrapper::from_ImVec4(), RenderCol_Axis_X, RenderCol_Axis_Y, and RenderCol_Axis_Z.
Referenced by Slic3r::GUI::GLCanvas3D::_render_style_editor().
|
static |
Referenced by load_render_colors(), Slic3r::GUI::Bed3D::Axes::render(), and update_render_colors().
|
static |
Referenced by load_render_colors(), Slic3r::GUI::Bed3D::Axes::render(), and update_render_colors().
|
static |
Referenced by load_render_colors(), Slic3r::GUI::Bed3D::Axes::render(), and update_render_colors().
Referenced by render_default(), render_internal(), render_model(), and Slic3r::GUI::Bed_2D::repaint().
Referenced by render_default(), render_internal(), render_model(), and Slic3r::GUI::Bed_2D::repaint().
|
private |
Referenced by calc_printable_bounding_box(), render_axes(), render_gravity_arrow(), set_axes_mode(), set_axes_origin(), and set_shape().
|
private |
Referenced by set_position(), set_shape(), update_bed_triangles(), and update_model_offset().
|
private |
|
private |
Referenced by extended_bounding_box(), update_bed_triangles(), and update_model_offset().
|
private |
Referenced by set_position(), and set_shape().
|
private |
Referenced by set_position(), and set_shape().
|
private |
Referenced by render_gravity_arrow().
|
private |
Referenced by render_gravity_arrow().
|
private |
Referenced by on_change_color_mode(), render_default(), render_internal(), and render_model().
|
private |
Referenced by calc_extended_bounding_box(), render_default(), render_internal(), render_model(), and set_shape().
|
private |
Referenced by render_custom(), render_model(), set_position(), set_shape(), and update_model_offset().
|
private |
Referenced by calc_extended_bounding_box(), render_model(), update_bed_triangles(), and update_model_offset().
|
private |
Referenced by calc_printable_bounding_box(), get_position(), set_axes_mode(), and set_shape().
|
private |
Referenced by calc_extended_bounding_box(), printable_bounding_box(), update_bed_triangles(), and update_model_offset().
|
private |
Referenced by render_internal().
|
private |
Referenced by render_default(), set_shape(), update_bed_triangles(), and update_model_offset().
|
private |
Referenced by get_type(), is_custom(), render_internal(), and set_shape().