Open SimpleImageViewer-using-MatrixTransform.wrl
Open SimpleImageViewer-using-MatrixTransform-ifc2.wrl
Open SimpleImageViewer-using-regular-Transform.wrl
Open SimpleImageViewer-using-regular-Transform-ifc2.wrl


Uses multitouch events to scale, rotate and pan an image. All three operations can be performed
at the same time. There are 4 versions of the file, with no visual difference, but with slightly
different way of processing.

The 'ifc2' versions of the file use 'touchpoints' events of the Browser.Event node, which benefit
from a slight preprocessing of the touches by BS Contact. The versions of the file which do
not contain 'ifc2' in their name use 'touchevents' events of the Browser.Event node. These follow the
way usually used to provide multitouch information to an application. The application has to check
IDs and associate them with the respective touch, in order to see which touch has been moved or
released. This step is already done with the 'touchpoints' events.

The information gathered from the two touch points describe the transformation in form of a
2D matrix and therefore can easily be applied to a MatrixTransform. This is done in the versions of
the file that contain 'using-MatrixTransform' in their name. The other two versions, containing
'using-regular-Transform' in their name extract scale, rotation and shift from the movements of the
touches and apply them to a normal Transform node.