![]() |
Prusa Slicer 2.6.0
|
#include <src/slic3r/GUI/3DScene.hpp>
Collaboration diagram for Slic3r::GLVolumeCollection:Classes | |
| struct | PrintVolume |
| struct | Slope |
Public Types | |
| enum class | ERenderType : unsigned char { Opaque , Transparent , All } |
Public Member Functions | |
| GLVolumeCollection () | |
| ~GLVolumeCollection () | |
| std::vector< int > | load_object (const ModelObject *model_object, int obj_idx, const std::vector< int > &instance_idxs) |
| int | load_object_volume (const ModelObject *model_object, int obj_idx, int volume_idx, int instance_idx) |
| int | load_wipe_tower_preview (float pos_x, float pos_y, float width, float depth, const std::vector< std::pair< float, float > > &z_and_depth_pairs, float height, float cone_angle, float rotation_angle, bool size_unknown, float brim_width) |
| void | load_object_auxiliary (const SLAPrintObject *print_object, int obj_idx, const std::vector< std::pair< size_t, size_t > > &instances, SLAPrintObjectStep milestone, size_t timestamp) |
| GLVolume * | new_toolpath_volume (const ColorRGBA &rgba) |
| GLVolume * | new_nontoolpath_volume (const ColorRGBA &rgba) |
| void | render (ERenderType type, bool disable_cullface, const Transform3d &view_matrix, const Transform3d &projection_matrix, std::function< bool(const GLVolume &)> filter_func=std::function< bool(const GLVolume &)>()) const |
| void | clear () |
| bool | empty () const |
| void | set_range (double low, double high) |
| void | set_use_raycasters (bool value) |
| void | set_print_volume (const PrintVolume &print_volume) |
| void | set_z_range (float min_z, float max_z) |
| void | set_clipping_plane (const std::array< double, 4 > &coeffs) |
| const std::array< float, 2 > & | get_z_range () const |
| const std::array< double, 4 > & | get_clipping_plane () const |
| void | set_use_color_clip_plane (bool use) |
| void | set_color_clip_plane (const Vec3d &cp_normal, double offset) |
| void | set_color_clip_plane_colors (const std::array< ColorRGBA, 2 > &colors) |
| bool | is_slope_active () const |
| void | set_slope_active (bool active) |
| float | get_slope_normal_z () const |
| void | set_slope_normal_z (float normal_z) |
| void | set_default_slope_normal_z () |
| void | set_show_sinking_contours (bool show) |
| void | set_show_non_manifold_edges (bool show) |
| void | reset_outside_state () |
| void | update_colors_by_extruder (const DynamicPrintConfig *config) |
| std::vector< double > | get_current_print_zs (bool active_only) const |
| size_t | cpu_memory_used () const |
| size_t | gpu_memory_used () const |
| size_t | total_memory_used () const |
| std::string | log_memory_info () const |
Public Attributes | |
| GLVolumePtrs | volumes |
Private Member Functions | |
| GLVolumeCollection (const GLVolumeCollection &other) | |
| GLVolumeCollection & | operator= (const GLVolumeCollection &) |
Private Attributes | |
| PrintVolume | m_print_volume |
| std::array< float, 2 > | m_z_range |
| std::array< double, 4 > | m_clipping_plane |
| std::array< double, 4 > | m_color_clip_plane |
| bool | m_use_color_clip_plane { false } |
| std::array< ColorRGBA, 2 > | m_color_clip_plane_colors { ColorRGBA::RED(), ColorRGBA::BLUE() } |
| Slope | m_slope |
| bool | m_show_sinking_contours { false } |
| bool | m_show_non_manifold_edges { true } |
| bool | m_use_raycasters { true } |
| struct Slic3r::GLVolumeCollection::PrintVolume |
|
strong |
| Enumerator | |
|---|---|
| Opaque | |
| Transparent | |
| All | |
|
inline |
References set_default_slope_normal_z().
Here is the call graph for this function:
|
inline |
|
private |
|
inline |
References volumes.
Referenced by ~GLVolumeCollection(), Slic3r::GUI::GCodeViewer::reset(), Slic3r::GUI::GLCanvas3D::reset_volumes(), and Slic3r::GUI::GLGizmoSlaBase::update_volumes().
Here is the caller graph for this function:| size_t Slic3r::GLVolumeCollection::cpu_memory_used | ( | ) | const |
References volumes.
Referenced by log_memory_info(), and total_memory_used().
Here is the caller graph for this function:
|
inline |
References volumes.
Referenced by Slic3r::GUI::GLCanvas3D::check_volumes_outside_state(), Slic3r::GUI::GLCanvas3D::on_char(), Slic3r::GUI::GLCanvas3D::reload_scene(), Slic3r::GUI::GLCanvas3D::render(), Slic3r::GUI::GCodeViewer::render_shells(), and Slic3r::GUI::GLCanvas3D::reset_volumes().
Here is the caller graph for this function:
|
inline |
References m_clipping_plane.
| std::vector< double > Slic3r::GLVolumeCollection::get_current_print_zs | ( | bool | active_only | ) | const |
References Slic3r::append(), EPSILON, and volumes.
Referenced by Slic3r::GUI::GLCanvas3D::get_volumes_print_zs().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References m_slope, and Slic3r::GLVolumeCollection::Slope::normal_z.
|
inline |
References m_z_range.
| size_t Slic3r::GLVolumeCollection::gpu_memory_used | ( | ) | const |
References volumes.
Referenced by log_memory_info(), and total_memory_used().
Here is the caller graph for this function:
|
inline |
References Slic3r::GLVolumeCollection::Slope::active, and m_slope.
Referenced by Slic3r::GUI::GLCanvas3D::Slope::is_used().
Here is the caller graph for this function:| std::vector< int > Slic3r::GLVolumeCollection::load_object | ( | const ModelObject * | model_object, |
| int | obj_idx, | ||
| const std::vector< int > & | instance_idxs | ||
| ) |
References Slic3r::ModelObject::volumes.
Referenced by Slic3r::GUI::GLCanvas3D::load_object(), and Slic3r::GUI::GCodeViewer::load_shells().
Here is the caller graph for this function:| void Slic3r::GLVolumeCollection::load_object_auxiliary | ( | const SLAPrintObject * | print_object, |
| int | obj_idx, | ||
| const std::vector< std::pair< size_t, size_t > > & | instances, | ||
| SLAPrintObjectStep | milestone, | ||
| size_t | timestamp | ||
| ) |
References Slic3r::GLVolume::composite_id, Slic3r::TriangleMesh::convex_hull_3d(), Slic3r::TriangleMesh::empty(), Slic3r::GLVolume::geometry_id, Slic3r::SLAPrintObject::get_mesh_to_print(), Slic3r::SLAPrintObject::get_parts_to_slice(), Slic3r::GUI::GLModel::init_from(), Slic3r::ModelObject::instances, Eigen::Transform< _Scalar, _Dim, _Mode, _Options >::inverse(), Slic3r::GLVolume::mesh_raycaster, Slic3r::GLVolume::model, Slic3r::GLVolume::MODEL_COLOR, Slic3r::PrintObjectBase::model_object(), Slic3r::SLAPrintObject::pad_mesh(), Slic3r::GUI::GLModel::set_color(), Slic3r::GLVolume::set_convex_hull(), Slic3r::GLVolume::set_instance_transformation(), Slic3r::GLVolume::SLA_PAD_COLOR, Slic3r::GLVolume::SLA_SUPPORT_COLOR, Slic3r::slaposDrillHoles, Slic3r::slaposPad, Slic3r::slaposSupportTree, Slic3r::SLAPrintObject::support_mesh(), Slic3r::SLAPrintObject::trafo(), Slic3r::TriangleMesh::transform(), and volumes.
Referenced by Slic3r::GUI::GLCanvas3D::reload_scene().
Here is the call graph for this function:
Here is the caller graph for this function:| int Slic3r::GLVolumeCollection::load_object_volume | ( | const ModelObject * | model_object, |
| int | obj_idx, | ||
| int | volume_idx, | ||
| int | instance_idx | ||
| ) |
References Slic3r::color_from_model_volume(), Slic3r::GLVolume::composite_id, Slic3r::ModelVolume::extruder_id(), Slic3r::GLVolume::extruder_id, Slic3r::ModelVolume::get_convex_hull_shared_ptr(), Slic3r::ModelVolume::get_transformation(), Slic3r::ModelInstance::get_transformation(), Slic3r::GUI::GLModel::init_from(), Slic3r::ModelObject::instances, Slic3r::ModelVolume::is_model_part(), m_use_raycasters, Slic3r::ModelVolume::mesh_ptr(), Slic3r::GLVolume::mesh_raycaster, Slic3r::GLVolume::model, Slic3r::ModelInstance::printable, Slic3r::GLVolume::set_color(), Slic3r::GLVolume::set_convex_hull(), Slic3r::GLVolume::set_instance_transformation(), Slic3r::GLVolume::set_volume_transformation(), Slic3r::ModelObject::volumes, and volumes.
Referenced by Slic3r::GUI::GLCanvas3D::reload_scene().
Here is the call graph for this function:
Here is the caller graph for this function:| int Slic3r::GLVolumeCollection::load_wipe_tower_preview | ( | float | pos_x, |
| float | pos_y, | ||
| float | width, | ||
| float | depth, | ||
| const std::vector< std::pair< float, float > > & | z_and_depth_pairs, | ||
| float | height, | ||
| float | cone_angle, | ||
| float | rotation_angle, | ||
| bool | size_unknown, | ||
| float | brim_width | ||
| ) |
References Slic3r::GLVolume::composite_id, Slic3r::TriangleMesh::convex_hull_3d(), Slic3r::ColorRGBA::DARK_YELLOW(), Slic3r::ColorRGBA::g(), Slic3r::GLVolume::geometry_id, Slic3r::WipeTower::get_wipe_tower_cone_base(), Slic3r::ObjectID::id, indexed_triangle_set::indices, Slic3r::GUI::GLModel::init_from(), Slic3r::its_make_cone(), Slic3r::its_make_cylinder(), M_PI, Slic3r::make_cube(), Slic3r::TriangleMesh::merge(), Slic3r::GLVolume::mesh_raycaster, Slic3r::GLVolume::model, Slic3r::ColorRGBA::r(), Slic3r::TriangleMesh::scale(), Slic3r::GUI::GLModel::set_color(), Slic3r::GLVolume::set_convex_hull(), Slic3r::GLVolume::set_volume_offset(), Slic3r::GLVolume::set_volume_rotation(), Slic3r::TriangleMesh::translate(), indexed_triangle_set::vertices, and Slic3r::wipe_tower_instance_id().
Referenced by Slic3r::GUI::GCodeViewer::load_shells(), and Slic3r::GUI::GLCanvas3D::reload_scene().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Slic3r::GLVolumeCollection::log_memory_info | ( | ) | const |
References cpu_memory_used(), Slic3r::format_memsize_MB(), and gpu_memory_used().
Here is the call graph for this function:References volumes.
Referenced by new_toolpath_volume().
Here is the caller graph for this function:References new_nontoolpath_volume().
Here is the call graph for this function:
|
private |
| void Slic3r::GLVolumeCollection::render | ( | GLVolumeCollection::ERenderType | type, |
| bool | disable_cullface, | ||
| const Transform3d & | view_matrix, | ||
| const Transform3d & | projection_matrix, | ||
| std::function< bool(const GLVolume &)> | filter_func = std::function<bool(const GLVolume&)>() |
||
| ) | const |
References Slic3r::GLVolumeCollection::Slope::active, Slic3r::GLVolumeCollection::PrintVolume::data, Slic3r::GUI::OpenGLManager::get_gl_info(), glcheck, glsafe, Slic3r::GLVolume::HS_None, Slic3r::GUI::OpenGLManager::GLInfo::is_core_profile(), m_clipping_plane, m_color_clip_plane, m_color_clip_plane_colors, m_print_volume, m_show_non_manifold_edges, m_show_sinking_contours, m_slope, m_use_color_clip_plane, m_z_range, Eigen::Transform< _Scalar, _Dim, _Mode, _Options >::matrix(), Slic3r::GLVolumeCollection::Slope::normal_z, Slic3r::GLShaderProgram::set_uniform(), Slic3r::GLShaderProgram::start_using(), Slic3r::GLShaderProgram::stop_using(), Transparent, Slic3r::GLVolumeCollection::PrintVolume::type, volumes, Slic3r::volumes_to_render(), and Slic3r::GLVolumeCollection::PrintVolume::zs.
Referenced by Slic3r::GUI::GCodeViewer::render_shells(), and Slic3r::GUI::GLGizmoSlaBase::render_volumes().
Here is the call graph for this function:
Here is the caller graph for this function:| void Slic3r::GLVolumeCollection::reset_outside_state | ( | ) |
|
inline |
References m_clipping_plane.
Referenced by Slic3r::GUI::GLGizmoSlaBase::render_volumes().
Here is the caller graph for this function:
|
inline |
References m_color_clip_plane, and Slic3r::offset().
Referenced by Slic3r::GUI::GLCanvas3D::set_color_clip_plane().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References m_color_clip_plane_colors.
Referenced by Slic3r::GUI::GLCanvas3D::set_color_clip_plane_colors().
Here is the caller graph for this function:
|
inline |
References cos(), Slic3r::Geometry::deg2rad(), m_slope, and Slic3r::GLVolumeCollection::Slope::normal_z.
Referenced by GLVolumeCollection().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References m_print_volume.
|
inline |
References volumes.
Referenced by Slic3r::GUI::GLCanvas3D::set_volumes_z_range().
Here is the caller graph for this function:
|
inline |
References m_show_non_manifold_edges.
|
inline |
References m_show_sinking_contours.
|
inline |
References Slic3r::GLVolumeCollection::Slope::active, and m_slope.
Referenced by Slic3r::GUI::GLCanvas3D::Slope::use().
Here is the caller graph for this function:
|
inline |
References m_slope, and Slic3r::GLVolumeCollection::Slope::normal_z.
Referenced by Slic3r::GUI::GLCanvas3D::Slope::set_normal_angle().
Here is the caller graph for this function:
|
inline |
References m_use_color_clip_plane.
Referenced by Slic3r::GUI::GLCanvas3D::set_use_color_clip_plane().
Here is the caller graph for this function:
|
inline |
References m_use_raycasters.
Referenced by Slic3r::GUI::GCodeViewer::GCodeViewer().
Here is the caller graph for this function:
|
inline |
|
inline |
| void Slic3r::GLVolumeCollection::update_colors_by_extruder | ( | const DynamicPrintConfig * | config | ) |
References Slic3r::decode_color(), Slic3r::ConfigDef::get(), Slic3r::ConfigOptionDef::get_default_value(), Slic3r::ConfigBase::opt_int(), Slic3r::ConfigBase::opt_string(), Slic3r::ConfigBase::option(), Slic3r::print_config_def, Slic3r::ptSLA, Slic3r::to_rgba(), Slic3r::ConfigOptionVector< T >::values, and volumes.
Referenced by Slic3r::GUI::GCodeViewer::update_shells_color_by_extruder(), and Slic3r::GUI::GLCanvas3D::update_volumes_colors_by_extruder().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Referenced by get_clipping_plane(), render(), and set_clipping_plane().
|
private |
Referenced by render(), and set_color_clip_plane().
|
private |
Referenced by render(), and set_color_clip_plane_colors().
|
private |
Referenced by render(), and set_print_volume().
|
private |
Referenced by render(), and set_show_non_manifold_edges().
|
private |
Referenced by render(), and set_show_sinking_contours().
|
private |
Referenced by get_slope_normal_z(), is_slope_active(), render(), set_default_slope_normal_z(), set_slope_active(), and set_slope_normal_z().
|
private |
Referenced by render(), and set_use_color_clip_plane().
|
private |
Referenced by load_object_volume(), and set_use_raycasters().
|
private |
Referenced by get_z_range(), render(), and set_z_range().
| GLVolumePtrs Slic3r::GLVolumeCollection::volumes |
Referenced by Slic3r::GUI::GLCanvas3D::GLCanvas3D(), Slic3r::GUI::GLCanvas3D::_picking_pass(), Slic3r::GUI::GLCanvas3D::_rectangular_selection_picking_pass(), Slic3r::GUI::GLCanvas3D::_render_thumbnail_internal(), Slic3r::GUI::GLCanvas3D::check_volumes_outside_state(), clear(), cpu_memory_used(), Slic3r::GUI::create_meshes(), Slic3r::GUI::GLCanvas3D::detect_sla_view_type(), Slic3r::GUI::GLCanvas3D::do_mirror(), Slic3r::GUI::GLCanvas3D::do_move(), Slic3r::GUI::GLCanvas3D::do_reset_skew(), Slic3r::GUI::GLCanvas3D::do_rotate(), Slic3r::GUI::GLCanvas3D::do_scale(), empty(), Slic3r::GUI::GLCanvas3D::ensure_on_bed(), Slic3r::GUI::generate_thumbnail_from_model(), get_current_print_zs(), Slic3r::GUI::get_first_hovered_gl_volume(), Slic3r::GUI::get_selected_gl_volume(), Slic3r::GUI::GLCanvas3D::get_volumes_count(), Slic3r::GUI::GLCanvas3D::get_wipe_tower_info(), gpu_memory_used(), Slic3r::GUI::GLCanvas3D::is_object_sinking(), load_object_auxiliary(), load_object_volume(), Slic3r::GUI::GCodeViewer::load_shells(), new_nontoolpath_volume(), Slic3r::GUI::GLCanvas3D::on_mouse(), Slic3r::GUI::GLGizmoEmboss::on_mouse_change_selection(), Slic3r::GUI::on_mouse_surface_drag(), Slic3r::GUI::GLGizmoSlaBase::register_volume_raycasters_for_picking(), Slic3r::GUI::GLCanvas3D::reload_scene(), Slic3r::GUI::GLCanvas3D::Labels::render(), render(), Slic3r::GUI::GLGizmoSlaBase::render_volumes(), Slic3r::GUI::GLCanvas3D::LayersEditing::render_volumes(), reset_outside_state(), set_range(), Slic3r::GUI::GLCanvas3D::set_sla_view_type(), Slic3r::GUI::GLCanvas3D::set_sla_view_type(), Slic3r::GUI::GLCanvas3D::toggle_model_objects_visibility(), Slic3r::GUI::GLCanvas3D::toggle_sla_auxiliaries_visibility(), Slic3r::GUI::GLGizmoSlaBase::unproject_on_mesh(), update_colors_by_extruder(), Slic3r::GUI::GLCanvas3D::update_instance_printable_state_for_object(), Slic3r::GUI::GLCanvas3D::update_sequential_clearance(), Slic3r::GUI::GLGizmoSlaBase::update_volumes(), and Slic3r::GUI::GLCanvas3D::volumes_bounding_box().