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