Libpointing
An open-source cross-platform library to get raw events from pointing devices and master transfer functions.
|
The SigmoidFunction class implements the transfer function which is an discrete approximation of the sigmoid function. More...
#include <SigmoidFunction.h>
Public Member Functions | |
SigmoidFunction (URI &uri, PointingDevice *input, DisplayDevice *output) | |
void | clearState (void) |
Method which clears the current state of the device to be the default one (without any remainders or previous data). | |
void | applyi (int dxMickey, int dyMickey, int *dxPixel, int *dyPixel, TimeStamp::inttime timestamp=TimeStamp::undef) |
apply The main method of the class which applies the transfer function. More... | |
void | applyd (int dxMickey, int dyMickey, double *dxPixel, double *dyPixel, TimeStamp::inttime timestamp=TimeStamp::undef) |
apply The main method of the class which applies the transfer function. More... | |
URI | getURI (bool expanded=false) const |
getURI The method constructs URI corresponding to the type and parameters of the transfer function. More... | |
![]() | |
virtual void | setDebugLevel (int) |
Sets the level of information for debugging purposes (default = 0). | |
virtual void | debug (std::ostream &) const |
Additional Inherited Members | |
![]() | |
static std::list< std::string > | schemes (void) |
static TransferFunction * | create (const char *function_uri, PointingDevice *input, DisplayDevice *output) |
Static method to instantiate an object of a sub-class. More... | |
static TransferFunction * | create (std::string function_uri, PointingDevice *input, DisplayDevice *output) |
static TransferFunction * | create (URI &function_uri, PointingDevice *input, DisplayDevice *output) |
![]() | |
void | normalizeInput (int *dx, int *dy, PointingDevice *input) const |
normalizeInput Normalizes input to a transfer function with respect to the given PointingDevice. For example, to prevent fast movements of the cursor for high resolution mice. dx and dy are changed according to the input->getResolution() More... | |
void | normalizeOutput (int *dx, int *dy, DisplayDevice *output) const |
normalizeOutput Normalizes output of a transfer function with respect to the given DisplayDevice. For example, to prevent slow movements of the cursor for high resolution display. dx and dy are changed according to the output->getResolution() More... | |
The SigmoidFunction class implements the transfer function which is an discrete approximation of the sigmoid function.
In this case 2 mouse speeds are used as boundaries which are mapped onto 2 gain boundaries such that if the mouse speed is in-between 2 speed boundaries, then the corresponding gain value is computed by interpolating min and max gain values. Otherwise, minimum or maximum gain value is chosen.
|
virtual |
apply The main method of the class which applies the transfer function.
dxMickey | Translation in dots of the input device along x direction. |
dyMickey | Translation in dots of the input device along y direction. |
dxPixel | (Double) Computed translation in pixels of the output device along x direction. |
dyPixel | (Double) Computed translation in pixels of the output device along y direction. |
timestamp |
Implements pointing::TransferFunction.
|
virtual |
apply The main method of the class which applies the transfer function.
dxMickey | Translation in dots of the input device along x direction. |
dyMickey | Translation in dots of the input device along y direction. |
dxPixel | (Integer) Computed translation in pixels of the output device along x direction. |
dyPixel | (Integer) Computed translation in pixels of the output device along y direction. |
timestamp |
Implements pointing::TransferFunction.
|
virtual |
getURI The method constructs URI corresponding to the type and parameters of the transfer function.
expanded | Indicates whether all parameters must be included in URI. |
Implements pointing::TransferFunction.