These constants should be used in InputEvent and only movements bigger than MOUSEMOVE_DELTA_TABLET or MOUSEMOVE_DELTA_MOUSE should be processed.
Here is an example from the material preview:
{
}
{
...
Float rTotalDeltaX = 0, rTotalDeltaY = 0;
while (
MouseDrag(&rDeltaX, &rDeltaY,
nullptr)==MOUSEDRAGRESULT_CONTINUE)
{
rTotalDeltaX += rDeltaX;
rTotalDeltaY += rDeltaY;
if ((rDeltaX == 0 && rDeltaY == 0) ||
(!bRotated &&
Abs(rTotalDeltaX) < rMinDelta &&
Abs(rTotalDeltaY) < rMinDelta))
{
continue;
}
...
bRotated = true;
bRestart = true;
}
}
void GeSleep(Int32 milliseconds)
Float GetMouseMoveDelta()
Definition: c4d_basecontainer.h:47
MOUSEDRAGRESULT MouseDrag(Float *mx, Float *my, BaseContainer *channels)
maxon::Bool Bool
Definition: ge_sys_math.h:55
maxon::Float Float
Definition: ge_sys_math.h:66
#define MOUSEMOVE_DELTA_MOUSE
Mouse movement threshold.
Definition: c4d_gui.h:937
#define MOUSEMOVE_DELTA_TABLET
Tablet movement threshold.
Definition: c4d_gui.h:936
Float32 Abs(Float32 val)
Definition: apibasemath.h:195
const char const char * msg
Definition: object.h:438
◆ MOUSEMOVE_DELTA_TABLET
#define MOUSEMOVE_DELTA_TABLET |
Tablet movement threshold.
◆ MOUSEMOVE_DELTA_MOUSE
#define MOUSEMOVE_DELTA_MOUSE |
Mouse movement threshold.