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:157
float slowmousespeed_
Definition: dragcontroller.h:79
double prevdragval_
Definition: dragcontroller.h:91
int prevdragtime_
Definition: dragcontroller.h:84
float slowmindragtomouseratio_
Definition: dragcontroller.h:77
float fastmousespeed_
Definition: dragcontroller.h:78
float fastmindragtomouseratio_
Definition: dragcontroller.h:76
float linearbackdragfrac_
Definition: dragcontroller.h:80
double prevtransval_
Definition: dragcontroller.h:92
3D point or vector
Definition: commontypes.h:57
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:270
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
bool screendragmode_
Definition: dragcontroller.h:86
Coord3d Coord3
Definition: commontypes.h:84
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
2D point or vector class.
Definition: commontypes.h:58
float screendragfactor_
Definition: dragcontroller.h:87