OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
SurfaceDrag.hpp File Reference
#include "libslic3r/Model.hpp"
#include <optional>
#include "libslic3r/Point.hpp"
#include "slic3r/Utils/RaycastManager.hpp"
#include "wx/event.h"
#include <functional>
Include dependency graph for SurfaceDrag.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Slic3r::GUI::SurfaceDrag

Namespaces

namespace  Slic3r
 |/ Copyright (c) Prusa Research 2020 - 2023 Enrico Turri @enricoturri1966 |/ |/ PrusaSlicer is released under the terms of the AGPLv3 or higher |/
namespace  Slic3r::GUI

Functions

bool Slic3r::GUI::on_mouse_surface_drag (const wxMouseEvent &mouse_event, const Camera &camera, std::optional< SurfaceDrag > &surface_drag, GLCanvas3D &canvas, RaycastManager &raycast_manager, const std::optional< double > &up_limit={})
 Mouse event handler, when move(drag&drop) volume over model surface NOTE: Dragged volume has to be selected. And also has to be hovered on start of dragging.
std::optional< Vec3d > Slic3r::GUI::calc_surface_offset (const Selection &selection, RaycastManager &raycast_manager)
 Calculate translation of volume onto surface of model.
std::optional< float > Slic3r::GUI::calc_distance (const GLVolume &gl_volume, RaycastManager &raycaster, GLCanvas3D &canvas)
 Calculate distance by ray to surface of object in emboss direction.
std::optional< float > Slic3r::GUI::calc_distance (const GLVolume &gl_volume, const RaycastManager &raycaster, const RaycastManager::ISkip *condition, const std::optional< Slic3r::Transform3d > &fix)
std::optional< float > Slic3r::GUI::calc_angle (const Selection &selection)
 Calculate up vector angle.
Transform3d Slic3r::GUI::world_matrix_fixed (const GLVolume &gl_volume, const ModelObjectPtrs &objects)
 Get transformation to world.
Transform3d Slic3r::GUI::world_matrix_fixed (const Selection &selection)
 Get transformation to world.
void Slic3r::GUI::selection_transform (Selection &selection, const std::function< void()> &selection_transformation_fnc)
 Wrap function around selection transformation to apply fix transformation Fix transformation is needed because of (store/load) volume (to/from) 3mf.
bool Slic3r::GUI::face_selected_volume_to_camera (const Camera &camera, GLCanvas3D &canvas, const std::optional< double > &wanted_up_limit={})
 Apply camera direction for emboss direction.
void Slic3r::GUI::do_local_z_rotate (Selection &selection, double relative_angle)
 Rotation around z Axis(emboss direction).
void Slic3r::GUI::do_local_z_move (Selection &selection, double relative_move)
 Translation along local z Axis (emboss direction).
TransformationType Slic3r::GUI::get_drag_transformation_type (const Selection &selection)
 Distiguish between object and volume Differ in possible transformation type.
void Slic3r::GUI::dragging_rotate_gizmo (double gizmo_angle, std::optional< float > &current_angle, std::optional< float > &start_angle, Selection &selection)
 On dragging rotate gizmo func Transform GLVolume from selection.

Variables

constexpr double Slic3r::GUI::UP_LIMIT = 0.9

Class Documentation

◆ Slic3r::GUI::SurfaceDrag

struct Slic3r::GUI::SurfaceDrag
Collaboration diagram for Slic3r::GUI::SurfaceDrag:
Class Members
AllowVolumes condition
bool exist_hit = true
GLVolume * gl_volume
Transform3d instance_inv
Vec2d mouse_offset
Vec2d mouse_offset_without_sla_shift
optional< float > start_angle
optional< float > start_distance
Transform3d world