OpendTect
7.0
|
Auxiliary class to control dragger speed. The idea is that slowly moving the mouse forces the dragger to move only one inl/crl/z per (few) pixel(s), while moving it fast can have it cover many lines per pixel. More...
Public Member Functions | |
DragController () | |
~DragController () | |
void | dragInScreenSpace (bool fromstart, const Coord &projvec) |
float | getFastMaxDragToMouseRatio () const |
float | getFastMinDragToMouseRatio () const |
float | getFastMouseSpeed () const |
float | getLinearBackDragFrac () const |
float | getSlowMaxDragToMouseRatio () const |
float | getSlowMinDragToMouseRatio () const |
float | getSlowMouseSpeed () const |
void | init (const Coord &mousepos, double scalefactor=1.0, const Coord3 &dragdir=Coord3(0.0, 0.0, 0.0)) |
void | setFastMaxDragToMouseRatio (float distanceperpixel) |
void | setFastMinDragToMouseRatio (float distanceperpixel) |
void | setFastMouseSpeed (float pixelspersecond) |
void | setLinearBackDragFrac (float fraction) |
void | setSlowMaxDragToMouseRatio (float distanceperpixel) |
void | setSlowMinDragToMouseRatio (float distanceperpixel) |
void | setSlowMouseSpeed (float pixelspersecond) |
void | transform (Coord3 &dragvec, const Coord &mousepos, double maxdragdist=mUdf(double)) |
void | transform (double &dragval, const Coord &mousepos, double maxdragdist=mUdf(double)) |
Protected Member Functions | |
double | absTransform (double dragval, const Coord &mousepos, double maxdragdist=mUdf(double)) |
void | manageScreenDragging (double &dragval, const Coord &mousepos) |
void | reInit (const Coord &mousepos) |
Protected Attributes | |
Coord3 | dragdir_ |
int | dragsign_ |
float | fastmaxdragtomouseratio_ |
float | fastmindragtomouseratio_ |
float | fastmousespeed_ |
Coord | initmousepos_ |
float | linearbackdragfrac_ |
double | maxdragval_ |
int | prevdragtime_ |
double | prevdragval_ |
Coord | prevmousepos_ |
double | prevtransval_ |
double | scalefactor_ |
float | screendragfactor_ |
bool | screendragmode_ |
Coord | screendragprojvec_ |
float | slowmaxdragtomouseratio_ |
float | slowmindragtomouseratio_ |
float | slowmousespeed_ |
Auxiliary class to control dragger speed. The idea is that slowly moving the mouse forces the dragger to move only one inl/crl/z per (few) pixel(s), while moving it fast can have it cover many lines per pixel.
<>
DragController::DragController | ( | ) |
DragController::~DragController | ( | ) |
|
protected |
void DragController::dragInScreenSpace | ( | bool | fromstart, |
const Coord & | projvec | ||
) |
float DragController::getFastMaxDragToMouseRatio | ( | ) | const |
float DragController::getFastMinDragToMouseRatio | ( | ) | const |
float DragController::getFastMouseSpeed | ( | ) | const |
float DragController::getLinearBackDragFrac | ( | ) | const |
If moving back towards initial position, 'fraction' defines where the dragger starts acting linear to reach its origin at the same time as the mouse pointer.
float DragController::getSlowMaxDragToMouseRatio | ( | ) | const |
float DragController::getSlowMinDragToMouseRatio | ( | ) | const |
float DragController::getSlowMouseSpeed | ( | ) | const |
void DragController::init | ( | const Coord & | mousepos, |
double | scalefactor = 1.0 , |
||
const Coord3 & | dragdir = Coord3(0.0, 0.0, 0.0) |
||
) |
|
protected |
|
protected |
void DragController::setFastMaxDragToMouseRatio | ( | float | distanceperpixel | ) |
void DragController::setFastMinDragToMouseRatio | ( | float | distanceperpixel | ) |
void DragController::setFastMouseSpeed | ( | float | pixelspersecond | ) |
void DragController::setLinearBackDragFrac | ( | float | fraction | ) |
void DragController::setSlowMaxDragToMouseRatio | ( | float | distanceperpixel | ) |
void DragController::setSlowMinDragToMouseRatio | ( | float | distanceperpixel | ) |
void DragController::setSlowMouseSpeed | ( | float | pixelspersecond | ) |
void DragController::transform | ( | Coord3 & | dragvec, |
const Coord & | mousepos, | ||
double | maxdragdist = mUdf(double) |
||
) |
void DragController::transform | ( | double & | dragval, |
const Coord & | mousepos, | ||
double | maxdragdist = mUdf(double) |
||
) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024