Welcome to %s forums

BrainModular Users Forum

Login Register

SDK multi callbacks still have problems

Tell us what you'd like Usine to do
Post Reply
sm_jamieson
Member
Posts: 559
Contact:

Unread post by sm_jamieson » 08 Dec 2016, 11:43

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.


User avatar
senso
Site Admin
Posts: 4425
Location: France
Contact:

Unread post by senso » 21 Dec 2016, 15:31

do you use
MouseMoveMulti
MouseDownMulti
MouseUpMulti

procedures ?

you should get precise info with those procedures.

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 21 Dec 2016, 16:24

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

User avatar
senso
Site Admin
Posts: 4425
Location: France
Contact:

Unread post by senso » 21 Dec 2016, 17:19

I'll check it, normally it should work.

sm_jamieson
Member
Posts: 559
Contact:

Unread post by sm_jamieson » 22 Dec 2016, 15:39

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.

sm_jamieson
Member
Posts: 559
Contact:

Unread post by sm_jamieson » 15 Jul 2017, 03:18

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.

User avatar
senso
Site Admin
Posts: 4425
Location: France
Contact:

Unread post by senso » 20 Sep 2017, 11:31

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests