Libpointing
An open-source cross-platform library to get raw events from pointing devices and master transfer functions.
ConstantFunction.h
1 /* -*- mode: c++ -*-
2  *
3  * pointing/transferfunctions/ConstantFunction.h --
4  *
5  * Initial software
6  * Authors: Géry Casiez, Nicolas Roussel
7  * Copyright © Inria
8  *
9  * http://libpointing.org/
10  *
11  * This software may be used and distributed according to the terms of
12  * the GNU General Public License version 2 or any later version.
13  *
14  */
15 
16 #ifndef ConstantFunction_h
17 #define ConstantFunction_h
18 
19 #include <pointing/transferfunctions/TransferFunction.h>
20 
21 namespace pointing {
22 
29 
30  private:
31 
32  float CDGain;
33  bool disableSubPixelation;
34 
35  int previousMouseRawX;
36  int previousMouseRawY;
37  float previousMouseXRemainder;
38  float previousMouseYRemainder;
39 
40  PointingDevice* pointingDevice;
41  DisplayDevice* displayDevice;
42 
43  public:
44 
45  ConstantFunction(URI &uri, PointingDevice* input, DisplayDevice* output);
46 
47  void clearState(void) ;
48  void applyi(int dxMickey, int dyMickey, int *dxPixel, int *dyPixel,
49  TimeStamp::inttime timestamp=TimeStamp::undef) ;
50  void applyd(int dxMickey, int dyMickey, double *dxPixel, double *dyPixel,
51  TimeStamp::inttime =TimeStamp::undef) ;
52 
53  URI getURI(bool expanded=false) const ;
54 
55  ~ConstantFunction() {}
56 
57  } ;
58 
59 }
60 
61 #endif
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.
Definition: ConstantFunction.cpp:64
void applyd(int dxMickey, int dyMickey, double *dxPixel, double *dyPixel, TimeStamp::inttime=TimeStamp::undef)
apply The main method of the class which applies the transfer function.
Definition: ConstantFunction.cpp:105
The TransferFunction class is an abstract class that creates an object of its concrete subclasses...
Definition: TransferFunction.h:38
Definition: DummyPointingDevice.cpp:23
URI getURI(bool expanded=false) const
getURI The method constructs URI corresponding to the type and parameters of the transfer function...
Definition: ConstantFunction.cpp:115
The PointingDevice class is used to represent Pointing Devices connected to the computer or pseudo-de...
Definition: PointingDevice.h:35
The ConstantFunction class implements the transfer function with a constant gain factor computed taki...
Definition: ConstantFunction.h:28
DisplayDevice class is used to represent the displays connected to the computer.
Definition: DisplayDevice.h:31
void clearState(void)
Method which clears the current state of the device to be the default one (without any remainders or ...
Definition: ConstantFunction.cpp:56