mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-06 13:34:05 -06:00
Tech ENABLE_RAYCAST_PICKING - Rendering for rectangle selection made only inside the rectangle, on systems supporting framebuffers
Various other refactorings & fixes (cherry picked from commit prusa3d/PrusaSlicer@39b1222b22)
This commit is contained in:
parent
f0199159e7
commit
d2d77456ac
12 changed files with 289 additions and 105 deletions
|
@ -104,7 +104,7 @@ PickingModel &GLGizmoBase::Grabber::get_cube()
|
|||
return s_cube;
|
||||
}
|
||||
|
||||
void GLGizmoBase::Grabber::register_raycasters_for_picking(PickingId id)
|
||||
void GLGizmoBase::Grabber::register_raycasters_for_picking(int id)
|
||||
{
|
||||
picking_id = id;
|
||||
// registration will happen on next call to render()
|
||||
|
|
|
@ -87,7 +87,7 @@ protected:
|
|||
ColorRGBA hover_color{GRABBER_HOVER_COL};
|
||||
EGrabberExtension extensions{ EGrabberExtension::None };
|
||||
// the picking id shared by all the elements
|
||||
PickingId picking_id{ -1 };
|
||||
int picking_id{ -1 };
|
||||
std::array<std::shared_ptr<SceneRaycasterItem>, GRABBER_ELEMENTS_MAX_COUNT> raycasters = { nullptr };
|
||||
|
||||
Grabber() = default;
|
||||
|
@ -99,7 +99,7 @@ protected:
|
|||
float get_dragging_half_size(float size) const;
|
||||
PickingModel &get_cube();
|
||||
|
||||
void register_raycasters_for_picking(PickingId id);
|
||||
void register_raycasters_for_picking(int id);
|
||||
void unregister_raycasters_for_picking();
|
||||
|
||||
private:
|
||||
|
|
|
@ -26,7 +26,7 @@ private:
|
|||
PickingModel vbo;
|
||||
Vec3d normal;
|
||||
float area;
|
||||
PickingId picking_id{ -1 };
|
||||
int picking_id{ -1 };
|
||||
};
|
||||
|
||||
// This holds information to decide whether recalculation is necessary:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue