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