mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-07-29 12:54:31 +03:00
3D gizmos' grabber size as a function of selected objects size
This commit is contained in:
@@ -22,7 +22,8 @@ class GLGizmoBase
|
||||
protected:
|
||||
struct Grabber
|
||||
{
|
||||
static const float HalfSize;
|
||||
static const float SizeFactor;
|
||||
static const float MinHalfSize;
|
||||
static const float DraggingScaleFactor;
|
||||
|
||||
Vec3d center;
|
||||
@@ -33,11 +34,11 @@ protected:
|
||||
|
||||
Grabber();
|
||||
|
||||
void render(bool hover) const;
|
||||
void render_for_picking() const { render(color, false); }
|
||||
void render(bool hover, const BoundingBoxf3& box) const;
|
||||
void render_for_picking(const BoundingBoxf3& box) const { render(box, color, false); }
|
||||
|
||||
private:
|
||||
void render(const float* render_color, bool use_lighting) const;
|
||||
void render(const BoundingBoxf3& box, const float* render_color, bool use_lighting) const;
|
||||
void render_face(float half_size) const;
|
||||
};
|
||||
|
||||
@@ -109,8 +110,8 @@ protected:
|
||||
virtual void on_render_for_picking(const BoundingBoxf3& box) const = 0;
|
||||
|
||||
float picking_color_component(unsigned int id) const;
|
||||
void render_grabbers() const;
|
||||
void render_grabbers_for_picking() const;
|
||||
void render_grabbers(const BoundingBoxf3& box) const;
|
||||
void render_grabbers_for_picking(const BoundingBoxf3& box) const;
|
||||
|
||||
void set_tooltip(const std::string& tooltip) const;
|
||||
std::string format(float value, unsigned int decimals) const;
|
||||
@@ -163,7 +164,7 @@ private:
|
||||
void render_snap_radii() const;
|
||||
void render_reference_radius() const;
|
||||
void render_angle() const;
|
||||
void render_grabber() const;
|
||||
void render_grabber(const BoundingBoxf3& box) const;
|
||||
|
||||
void transform_to_local() const;
|
||||
// returns the intersection of the mouse ray with the plane perpendicular to the gizmo axis, in local coordinate
|
||||
|
||||
Reference in New Issue
Block a user