Skip to content
Izzatbek Mukhanov edited this page Jun 17, 2016 · 7 revisions

Frequently asked questions


What is the main purpose of libpointing?

Libpointing is a cross-platform library, the main purpose of which is to work with pointing transfer functions.


What is a pointing transfer function?

Simply put, it is the relationship between speed of a mouse and the display cursor.


So, how to use a transfer function?

In order to use a transfer function, you need to create PointingDevice, DisplayDevice and relate them calling TransferFunction::create(URI, input, output). The best place to apply a transfer function is inside the Pointing callback function (when there is a message from the input device). Thus, call applyi or applyd inside the pointing callback function.


Can I build my own transfer functions?

Indeed


What do applyi and applyd output?

Those are the main functions used to apply a transfer function, where the input parameters are relative displacements in mouse counts and output parameters are corresponding displacements in display pixels. applyi outputs pixels in integers, whereas applyd in floating coordinates.


Why would I need pixels expressed in floating coordinates?

  • To have precise results. In many cases remainders of computed transfer functions ignored. Taking them into account may increase the precision in pointing tasks.
  • To have subpixel interaction.

I installed libpointing and run the minimalistic example, but when I move my mouse nothing happens.

Most likely it is because of any:. If you have more then one pointing device, libpointing uses the first available, try moving other pointing devices or put a concrete device URI instead of any:. The list of available devices are output if debugLevel=1 is in the URI. If you specified the correct URI and you do not receive any input, please open new issue.


Why sometimes the URI of the same device changes if I replug it?

The URI of a device is unique only with regard to other devices connected to the same machine at that moment. That means, if you plug the same device into another USB port or another machine or if you use it under a different OS, it may change. For pointing devices, see the next question.


Can I use the same pointing device and always have the same corresponding URI?

Yes. You can use URI such as any:?vendor=0xXXXX&product=0xXXXX to specify the product or/and vendor identifiers of the device. This way, you can work with the same device without changing URIs.


How can I see the list of devices?

You can see them if you put flag debugLevel=1 in corresponfing URIs. If you want to obtain them in your code, you can use PointingDeviceManager or DisplayDeviceManager.