1 #ifndef dragcontroller_h 2 #define dragcontroller_h 30 void init(
const Coord& mousepos,
double scalefactor=1.0,
33 void setFastMaxDragToMouseRatio(
float distanceperpixel);
34 float getFastMaxDragToMouseRatio()
const;
36 void setSlowMaxDragToMouseRatio(
float distanceperpixel);
37 float getSlowMaxDragToMouseRatio()
const;
39 void setFastMinDragToMouseRatio(
float distanceperpixel);
40 float getFastMinDragToMouseRatio()
const;
42 void setSlowMinDragToMouseRatio(
float distanceperpixel);
43 float getSlowMinDragToMouseRatio()
const;
45 void setFastMouseSpeed(
float pixelspersecond);
46 float getFastMouseSpeed()
const;
48 void setSlowMouseSpeed(
float pixelspersecond);
49 float getSlowMouseSpeed()
const;
51 void setLinearBackDragFrac(
float fraction);
52 float getLinearBackDragFrac()
const;
57 void transform(
double& dragval,
const Coord& mousepos,
58 double maxdragdist=
mUdf(
double));
59 void transform(
Coord3& dragvec,
const Coord& mousepos,
60 double maxdragdist=
mUdf(
double));
62 void dragInScreenSpace(
bool fromstart,
const Coord& projvec);
66 void reInit(
const Coord& mousepos);
68 void manageScreenDragging(
double& dragval,
69 const Coord& mousepos);
71 double absTransform(
double dragval,
const Coord& mousepos,
72 double maxdragdist=
mUdf(
double));
#define mExpClass(module)
Definition: commondefs.h:160
float slowmousespeed_
Definition: dragcontroller.h:79
double prevdragval_
Definition: dragcontroller.h:91
int prevdragtime_
Definition: dragcontroller.h:84
float slowmindragtomouseratio_
Definition: dragcontroller.h:77
A cartesian coordinate in 2D space.
Definition: coord.h:25
float fastmousespeed_
Definition: dragcontroller.h:78
float fastmindragtomouseratio_
Definition: dragcontroller.h:76
float linearbackdragfrac_
Definition: dragcontroller.h:80
double prevtransval_
Definition: dragcontroller.h:92
int dragsign_
Definition: dragcontroller.h:94
Coord initmousepos_
Definition: dragcontroller.h:82
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
float slowmaxdragtomouseratio_
Definition: dragcontroller.h:75
Auxiliary class to control dragger speed. The idea is that slowly moving the mouse forces the dragger...
Definition: dragcontroller.h:24
A cartesian coordinate in 3D space.
Definition: coord.h:72
bool screendragmode_
Definition: dragcontroller.h:86
float fastmaxdragtomouseratio_
Definition: dragcontroller.h:74
Coord3 dragdir_
Definition: dragcontroller.h:83
double maxdragval_
Definition: dragcontroller.h:93
double scalefactor_
Definition: dragcontroller.h:95
Coord prevmousepos_
Definition: dragcontroller.h:90
Coord screendragprojvec_
Definition: dragcontroller.h:88
float screendragfactor_
Definition: dragcontroller.h:87