Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ResetOperation to fix IsOver() reporting #352

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ImGuizmo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2645,6 +2645,11 @@ namespace IMGUIZMO_NAMESPACE
return radius < pixelRadius;
}

void ResetOperation(OPERATION operation)
{
gContext.mOperation = operation;
}

bool Manipulate(const float* view, const float* projection, OPERATION operation, MODE mode, float* matrix, float* deltaMatrix, const float* snap, const float* localBounds, const float* boundsSnap)
{
gContext.mDrawList->PushClipRect (ImVec2 (gContext.mX, gContext.mY), ImVec2 (gContext.mX + gContext.mWidth, gContext.mY + gContext.mHeight), false);
Expand Down
3 changes: 3 additions & 0 deletions ImGuizmo.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ namespace IMGUIZMO_NAMESPACE
// translation is applied in world space
enum OPERATION
{
OP_NONE = 0,
TRANSLATE_X = (1u << 0),
TRANSLATE_Y = (1u << 1),
TRANSLATE_Z = (1u << 2),
Expand Down Expand Up @@ -212,6 +213,8 @@ namespace IMGUIZMO_NAMESPACE
WORLD
};

IMGUI_API void ResetOperation(OPERATION operation = OP_NONE);

IMGUI_API bool Manipulate(const float* view, const float* projection, OPERATION operation, MODE mode, float* matrix, float* deltaMatrix = NULL, const float* snap = NULL, const float* localBounds = NULL, const float* boundsSnap = NULL);
//
// Please note that this cubeview is patented by Autodesk : https://patents.google.com/patent/US7782319B2/en
Expand Down