public void update(int mouseX, int mouseY) { float mx = mouseX / radius; float my = mouseY / radius; boolean buttonState = Mouse.isButtonDown(mouseButton); if (!isDragging && buttonState) { isDragging = true; target.startDrag(mx, my); } else if (isDragging && !buttonState) { isDragging = false; target.endDrag(mx, my); } target.applyTransform(mx, my, isDragging); }
public void setTransform(Matrix4f transform) { target.lastTransform = transform; }