mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-06 12:03:33 +00:00
Follow-up to previous commits on gizmo grabbers picking (use of centralized static constant for ids and added comments)
This commit is contained in:
@@ -35,6 +35,11 @@ class ImGuiWrapper;
|
||||
|
||||
class GLGizmoBase
|
||||
{
|
||||
public:
|
||||
// Starting value for ids to avoid clashing with ids used by GLVolumes
|
||||
// (254 is choosen to leave some space for forward compatibility)
|
||||
static const unsigned int BASE_ID = 255 * 255 * 254;
|
||||
|
||||
protected:
|
||||
struct Grabber
|
||||
{
|
||||
@@ -175,6 +180,8 @@ protected:
|
||||
virtual void on_render_input_window(float x, float y, float bottom_limit, const GLCanvas3D::Selection& selection) {}
|
||||
#endif // ENABLE_IMGUI
|
||||
|
||||
// Returns the picking color for the given id, based on the BASE_ID constant
|
||||
// No check is made for clashing with other picking color (i.e. GLVolumes)
|
||||
std::array<float, 3> picking_color_component(unsigned int id) const;
|
||||
void render_grabbers(const BoundingBoxf3& box) const;
|
||||
void render_grabbers(float size) const;
|
||||
|
||||
Reference in New Issue
Block a user