[x3d-public] v4 proposed MultitouchSensor

GPU Group gpugroup at gmail.com
Mon May 25 14:11:56 PDT 2020


My experience implementing (v4 proposed) MultitouchSensor in freewrl:

Results:

http://dug9.users.sourceforge.net/web3d/tests/sensors/DragCascade_MultitouchSensor.mp4

http://dug9.users.sourceforge.net/web3d/tests/sensors/DragCascade_MultitouchSensor.x3d


Method:
freewrl has had a multitouch emulator built in for serveral years.
- a command line option turns it on, then it uses the mouse differently
-- a RMB click creates a new drag -with a touchID
-- a LMB click near an existing drag will grab it, and LMB drag will drag it
-- another RMB click on an existing drag will delete it
- and then whereever we are passing around mouse coordinates and button
status, we pass an additional touchID.
-- I verified the touch emulator approach with another emulator that puts
touches into the windows desktop from a 2nd computer, and inhales the
touches via windows events.
But all we did was drag 2 separate dragsensors with 2 separate touches.

This new spec node adds a node that will take 2+ touches and do something
interesting - output a rotation and scale, along with the usual planesensor
type translation.
So I started by copying the Planesensor and hacking it to count active
drags, and when it has only one, it acts like a PlaneSensor, and when it
has 2+ it uses the first 2 to compute rotation and scale

Time:
Took 2.5 days. fiddly hard to understand code in freewrl. Hope other
browsers are more organized.

And of the 2.5 days I spent 1/2 day reviewing a least_squares option which
I didn't use, but could be used with 3+ points to compute a best-fit affine
(6 parameter - 2 scales, 1 shear, 1 rotation, and xy 2 translations)

-Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200525/6d2cd0e9/attachment.html>


More information about the x3d-public mailing list