19 #ifndef GUIDanielPerspectiveChanger_h 20 #define GUIDanielPerspectiveChanger_h 88 virtual double zPos2Zoom(
double zPos)
const;
94 void setViewport(
double zoom,
double xPos,
double yPos);
123 void move(
int xdiff,
int ydiff);
126 void zoom(
double factor);
double myRotation
the current rotation
virtual double getXPos() const
Returns the x-offset of the field to show stored in this changer.
virtual double getZoom() const
Returns the zoom factor computed stored in this changer.
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
void zoom(double factor)
Performs the zooming of the view.
Position myZoomBase
the network location on which to zoom using right click+drag
void setViewport(double zoom, double xPos, double yPos)
Sets the viewport.
void rotate(int diff)
Performs the rotation of the view.
void setViewportFrom(double xPos, double yPos, double zPos)
Alternative method for setting the viewport.
GUIDanielPerspectiveChanger & operator=(const GUIDanielPerspectiveChanger &)
Invalidated assignment operator.
virtual double getYPos() const
Returns the y-offset of the field to show stored in this changer.
void onLeftBtnPress(void *data)
mouse functions
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)
double myOrigWidth
the original viewport dimensions in m which serve as the reference point for 100% zoom ...
void setRotation(double rotation)
Sets the rotation.
FXTime myDragDelay
avoid flicker
A point in 2D or 3D with translation and scaling methods.
void changeCanvasSizeLeft(int change)
int myMouseButtonState
the current mouse state
void onMouseMove(void *data)
called when user moves mouse
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 getZPos() const
Returns the camera height corresponding to the current zoom factor.
virtual double zoom2ZPos(double zoom) const
Returns the camera height at which the given zoom level is reached.
void setDragDelay(FXTime delay)
virtual double getRotation() const
Returns the rotation of the canvas stored in this changer.
virtual double zPos2Zoom(double zPos) const
Returns the zoom level that is achieved at a given camera height.