Libpointing
An open-source cross-platform library to get raw events from pointing devices and master transfer functions.
NaiveConstantFunction.h
1 /* -*- mode: c++ -*-
2  *
3  * pointing/transferfunctions/NaiveConstantFunction.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 NaiveConstantFunction_h
17 #define NaiveConstantFunction_h
18 
19 #include <pointing/transferfunctions/TransferFunction.h>
20 
21 namespace pointing {
22 
29 
30  private:
31 
35  float gain ;
36 
37  public:
38 
39  NaiveConstantFunction(URI &uri, PointingDevice* input, DisplayDevice* output);
40 
41  void clearState(void) {}
42 
43  void applyi(int dxMickey, int dyMickey, int *dxPixel, int *dyPixel,
44  TimeStamp::inttime timestamp=TimeStamp::undef) ;
45 
46  void applyd(int dxMickey, int dyMickey, double *dxPixel, double *dyPixel,
47  TimeStamp::inttime timestamp=TimeStamp::undef) ;
48 
49  URI getURI(bool expanded=false) const ;
50 
52 
53  } ;
54 
55 }
56 
57 #endif
URI getURI(bool expanded=false) const
getURI The method constructs URI corresponding to the type and parameters of the transfer function...
Definition: NaiveConstantFunction.cpp:51
The NaiveConstantFunction class implements a transfer function which simply multilies the input trans...
Definition: NaiveConstantFunction.h:28
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: NaiveConstantFunction.cpp:30
The TransferFunction class is an abstract class that creates an object of its concrete subclasses...
Definition: TransferFunction.h:38
Definition: DummyPointingDevice.cpp:23
void clearState(void)
Method which clears the current state of the device to be the default one (without any remainders or ...
Definition: NaiveConstantFunction.h:41
The PointingDevice class is used to represent Pointing Devices connected to the computer or pseudo-de...
Definition: PointingDevice.h:35
DisplayDevice class is used to represent the displays connected to the computer.
Definition: DisplayDevice.h:31
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.
Definition: NaiveConstantFunction.cpp:44