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