SDK multi callbacks still have problems
-
sm_jamieson
- Member
- Posts: 559
- Contact:
Following problem still exist in the SDK multit touch support:
The Usine multitouch parameters provide an event each for X, Y and mouseDown (0=up, 1=down). This means you can always track a touchpoint, and it always has the same index in the event arrays.
The sdk mouseUp and mouseDown callbacks do not provide a mouseUp / mouseDown event array, only X and Y. That means that you know one of the touch points has had Down or Up, but you cannot tell which one !
Also, if I touch two points at once, I never get two X/Y events in the mouseDown callback, always one Down, and then the second point shows on the Move callback.
I hope this can be fixed at least in HH3 SDK.
Thanks,
Simon.
The Usine multitouch parameters provide an event each for X, Y and mouseDown (0=up, 1=down). This means you can always track a touchpoint, and it always has the same index in the event arrays.
The sdk mouseUp and mouseDown callbacks do not provide a mouseUp / mouseDown event array, only X and Y. That means that you know one of the touch points has had Down or Up, but you cannot tell which one !
Also, if I touch two points at once, I never get two X/Y events in the mouseDown callback, always one Down, and then the second point shows on the Move callback.
I hope this can be fixed at least in HH3 SDK.
Thanks,
Simon.
do you use
MouseMoveMulti
MouseDownMulti
MouseUpMulti
procedures ?
you should get precise info with those procedures.
MouseMoveMulti
MouseDownMulti
MouseUpMulti
procedures ?
you should get precise info with those procedures.
Olivier Sens
www.brainmodular.com
www.brainmodular.com
but it seems DnwMulti and Upmulti don't provides arrays but single events for mousedwn/up boutton info, means no way to know wich of the n touch is up/dwn
I'll check it, normally it should work.
Olivier Sens
www.brainmodular.com
www.brainmodular.com
-
sm_jamieson
- Member
- Posts: 559
- Contact:
The other issue I mentioned before:
Using the touch screen, I am getting continuous mouse multi callbacks, up to 8 per bloc, where the touch point has not moved at all, up to the maximum precision of "float". These can be filtered out, but it is not very efficient.
Using the touch screen, I am getting continuous mouse multi callbacks, up to 8 per bloc, where the touch point has not moved at all, up to the maximum precision of "float". These can be filtered out, but it is not very efficient.
-
sm_jamieson
- Member
- Posts: 559
- Contact:
This is still the case in HH3. The SDK has not been changed.
For example,
virtual void onMouseUpMulti (TMouseButton MouseButton, TShiftState Shift, UsineEventPtr X, UsineEventPtr Y)
The X and Y are arrays with an entry for each touch point that is being tracked.
But MouseButton is just left, right or middle button.
So you know a touch point has Up, but not which one.
Similar problem for onMouseDownMulti.
A MouseDown array event needs to be added so we know the up/down state of each of the touch points.
It could really be a new callback such as:
onMouseButtonMulti(UsineEventPtr UpDownArray, TShiftState Shift, UsineEventPtr X, UsineEventPtr Y)
The user can track which touchpoint's button has changed state by storing the previous values.
Note that several buttons may have changed state at the same time, so it should not be assumed that each callback is only informing about 1 button.
If the callback is to indicate which button is pressed you need 3 state arrays, one for each button. Note that the module parameters do no distinguish between the buttons.
Alternatively the SDK could guarantee to callback separately for each button changed, and just indicate the touchpoint number and state of the button that has been pressed. Then arrays would not be required.
Anyway, please can this be fixed soon.
Simon.
For example,
virtual void onMouseUpMulti (TMouseButton MouseButton, TShiftState Shift, UsineEventPtr X, UsineEventPtr Y)
The X and Y are arrays with an entry for each touch point that is being tracked.
But MouseButton is just left, right or middle button.
So you know a touch point has Up, but not which one.
Similar problem for onMouseDownMulti.
A MouseDown array event needs to be added so we know the up/down state of each of the touch points.
It could really be a new callback such as:
onMouseButtonMulti(UsineEventPtr UpDownArray, TShiftState Shift, UsineEventPtr X, UsineEventPtr Y)
The user can track which touchpoint's button has changed state by storing the previous values.
Note that several buttons may have changed state at the same time, so it should not be assumed that each callback is only informing about 1 button.
If the callback is to indicate which button is pressed you need 3 state arrays, one for each button. Note that the module parameters do no distinguish between the buttons.
Alternatively the SDK could guarantee to callback separately for each button changed, and just indicate the touchpoint number and state of the button that has been pressed. Then arrays would not be required.
Anyway, please can this be fixed soon.
Simon.
ok,
I'll implement some changes in the SDK, especially in the
onMouseUpMulti, onMouseMoveMulti,onMouseDownMulti
for example :
onMouseUpMulti (TMouseButton MouseButton, TShiftState Shift, UsineEventPtr X, UsineEventPtr Y, UsineEventPtr MouseDownArray)
It will do the trick and keep the backward compatibility.
I'll implement some changes in the SDK, especially in the
onMouseUpMulti, onMouseMoveMulti,onMouseDownMulti
for example :
onMouseUpMulti (TMouseButton MouseButton, TShiftState Shift, UsineEventPtr X, UsineEventPtr Y, UsineEventPtr MouseDownArray)
It will do the trick and keep the backward compatibility.
Olivier Sens
www.brainmodular.com
www.brainmodular.com
Who is online
Users browsing this forum: No registered users and 14 guests
