22 #ifndef GUIPerspectiveChanger_h
23 #define GUIPerspectiveChanger_h
virtual void setViewport(SUMOReal zoom, SUMOReal xPos, SUMOReal yPos)=0
Sets the viewport Used for: Adapting a new viewport.
virtual void changeCanvassLeft(int change)=0
virtual SUMOReal getZoom() const =0
Returns the zoom factor computed stored in this changer.
GUIPerspectiveChanger & operator=(const GUIPerspectiveChanger &)
Invalidated assignment operator.
virtual void setViewportFrom(SUMOReal xPos, SUMOReal yPos, SUMOReal zPos)=0
Alternative method for setting the viewport.
A class that stores a 2D geometrical boundary.
Boundary patchedViewPort()
patched viewPort with the same aspect ratio as the canvas
virtual SUMOReal getXPos() const =0
Returns the x-offset of the field to show stored in this changer.
A point in 2D or 3D with translation and scaling methods.
virtual SUMOReal zPos2Zoom(SUMOReal zPos) const =0
Returns the zoom level that is achieved at a given camera height.
virtual bool onLeftBtnRelease(void *data)
called when user releases left button
virtual bool onRightBtnRelease(void *data)
called when user releases right button
GUISUMOAbstractView & myCallback
The parent window (canvas to scale)
virtual void onLeftBtnPress(void *data)
mouse functions
virtual SUMOReal getZPos() const =0
Returns the camera height corresponding to the current zoom factor.
Boundary getViewport(bool fixRatio=true)
get viewport
FXint getMouseXPosition() const
Returns the last mouse x-position an event occured at.
Boundary myViewPort
the intended viewport
virtual void onMouseWheel(void *data)
called when user changes mouse wheel
virtual long onKeyPress(void *data)
called when user press a key
FXint getMouseYPosition() const
Returns the last mouse y-position an event occured at.
GUIPerspectiveChanger(GUISUMOAbstractView &callBack, const Boundary &viewPort)
Constructor.
virtual void centerTo(const Position &pos, SUMOReal radius, bool applyZoom=true)=0
Centers the view to the given position, setting it to a size that covers the radius. Used for: Centering of vehicles and junctions */.
virtual void onDoubleClicked(void *data)
called when user click two times
virtual void onMouseMove(void *data)
called when user moves mouse
virtual void onRightBtnPress(void *data)
called when user press right button
FXint myMouseXPosition
the current mouse position
virtual SUMOReal getYPos() const =0
Returns the y-offset of the field to show stored in this changer.
virtual long onKeyRelease(void *data)
called when user releases a key
virtual SUMOReal zoom2ZPos(SUMOReal zoom) const =0
Returns the camera height at which the given zoom level is reached.
virtual ~GUIPerspectiveChanger()
Destructor.
virtual SUMOReal getRotation() const =0
Returns the rotation of the canvas stored in this changer.