87 virtual double zPos2Zoom(
double zPos)
const;
122 void move(
int xdiff,
int ydiff);
125 void zoom(
double factor);
A class that stores a 2D geometrical boundary.
bool myMoveOnClick
Information whether the user has moved the cursor while pressing a mouse button.
virtual double getRotation() const
Returns the rotation of the canvas stored in this changer.
void changeCanvasSizeLeft(int change)
FXTime myDragDelay
avoid flicker
void onRightBtnPress(void *data)
called when user press right button
int myMouseButtonState
the current mouse state
void onMiddleBtnPress(void *data)
called when user press middle button
virtual double getYPos() const
Returns the y-offset of the field to show stored in this changer.
virtual double getZoom() const
Returns the zoom factor computed stored in this changer.
void onMouseWheel(void *data)
called when user changes mouse wheel
virtual double zoom2ZPos(double zoom) const
Returns the camera height at which the given zoom level is reached.
void onMouseMove(void *data)
called when user moves mouse
double myOrigWidth
the original viewport dimensions in m which serve as the reference point for 100% zoom
virtual double getZPos() const
Returns the camera height corresponding to the current zoom factor.
virtual double getXPos() const
Returns the x-offset of the field to show stored in this changer.
bool onMiddleBtnRelease(void *data)
called when user releases middle button
~GUIDanielPerspectiveChanger()
Destructor.
void centerTo(const Position &pos, double radius, bool applyZoom=true)
Centers the view to the given position, setting it to a size that covers the radius.
void setRotation(double rotation)
Sets the rotation.
Position myZoomBase
the network location on which to zoom using right click+drag
double myRotation
the current rotation
void rotate(int diff)
Performs the rotation of the view.
void move(int xdiff, int ydiff)
bool onLeftBtnRelease(void *data)
called when user releases left button
void setDragDelay(FXTime delay)
bool onRightBtnRelease(void *data)
called when user releases right button
GUIDanielPerspectiveChanger(const GUIDanielPerspectiveChanger &)
Invalidated copy constructor.
GUIDanielPerspectiveChanger & operator=(const GUIDanielPerspectiveChanger &)
Invalidated assignment operator.
void onLeftBtnPress(void *data)
mouse functions
void zoom(double factor)
Performs the zooming of the view.
void setViewport(double zoom, double xPos, double yPos)
Sets the viewport.
long onKeyPress(void *data)
called when user press a key
virtual double zPos2Zoom(double zPos) const
Returns the zoom level that is achieved at a given camera height.
void setViewportFrom(double xPos, double yPos, double zPos)
Alternative method for setting the viewport.
A point in 2D or 3D with translation and scaling methods.