74 #pragma GCC diagnostic push 75 #pragma GCC diagnostic ignored "-Wpedantic" 77 #include <gdal_priv.h> 79 #pragma GCC diagnostic pop 115 FXIMPLEMENT_ABSTRACT(
GUISUMOAbstractView, FXGLCanvas, GUISUMOAbstractViewMap, ARRAYNUMBER(GUISUMOAbstractViewMap))
122 FXGLCanvas(p, glVis, share, p,
MID_GLCANVAS, LAYOUT_SIDE_TOP | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0),
127 myMouseHotspotX(app.getDefaultCursor()->getHotX()),
128 myMouseHotspotY(app.getDefaultCursor()->getHotY()),
130 myUseToolTips(false),
131 myAmInitialised(false),
132 myViewportChooser(0),
133 myWindowCursorPositionX(getWidth() / 2),
134 myWindowCursorPositionY(getHeight() / 2),
135 myVisualizationChanger(0),
136 myApplicationSnapshots(0),
137 myApplicationSnapshotsLock(0) {
140 flags |= FLAG_ENABLED;
141 myInEditMode =
false;
145 myVisualizationSettings->
gaming = myApp->isGaming();
158 for (std::vector<GUISUMOAbstractView::Decal>::iterator it =
myDecals.begin(); it !=
myDecals.end(); ++it) {
207 double xNet = bound.
xmin() + bound.
getWidth() * x / getWidth();
209 double yNet = bound.
ymin() + bound.
getHeight() * (getHeight() - y) / getHeight();
260 if (getWidth() == 0 || getHeight() == 0) {
279 glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
280 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
285 glDisable(GL_DITHER);
289 glEnable(GL_POLYGON_SMOOTH);
290 glEnable(GL_LINE_SMOOTH);
293 glDisable(GL_POLYGON_SMOOTH);
294 glDisable(GL_LINE_SMOOTH);
319 const double SENSITIVITY = 0.1;
322 selection.
grow(SENSITIVITY);
327 for (std::vector<GUIGlID>::const_iterator it = ids.begin(); it != ids.end(); it++) {
339 double layer = (double)type;
344 layer =
dynamic_cast<Shape*
>(o)->getLayer();
351 if (layer > maxLayer) {
366 selection.
grow(radius);
368 std::vector<GUIGlID> result;
370 for (std::vector<GUIGlID>::const_iterator it = ids.begin(); it != ids.end(); it++) {
382 result.push_back(
id);
392 const int NB_HITS_MAX = 1024 * 1024;
394 static GUIGlID hits[NB_HITS_MAX];
395 static GLint nb_hits = 0;
396 glSelectBuffer(NB_HITS_MAX, hits);
408 nb_hits = glRenderMode(GL_RENDER);
412 std::vector<GUIGlID> result;
415 for (
int i = 0; i < nb_hits; ++i) {
418 for (
int j = 0; j < (int)numNames; j++) {
419 result.push_back(*ptr);
449 glEnable(GL_DEPTH_TEST);
464 glTranslated(0, 0, .55);
465 glColor3d(0.5, 0.5, 0.5);
468 while (ypos <= ymax) {
469 glVertex2d(xmin, ypos);
470 glVertex2d(xmax, ypos);
474 while (xpos <= xmax) {
475 glVertex2d(xpos, ymin);
476 glVertex2d(xpos, ymax);
480 glTranslated(0, 0, -.55);
489 const std::string
text(
"10000000000");
491 int pixelSize = (int)
m2p((
double) length);
492 while (pixelSize <= 20) {
495 if (noDigits > (
int)text.length()) {
498 pixelSize = (int)
m2p((
double) length);
502 glMatrixMode(GL_PROJECTION);
505 glMatrixMode(GL_MODELVIEW);
510 glDisable(GL_TEXTURE_2D);
511 glDisable(GL_ALPHA_TEST);
513 glEnable(GL_DEPTH_TEST);
515 double len = (double) pixelSize / (
double)(getWidth() - 1) * (
double) 2.0;
517 double o = double(15) / double(getHeight());
519 double oo = double(5) / double(getHeight());
522 glVertex2d(-.98, -1. + o);
523 glVertex2d(-.98 + len, -1. + o);
525 glVertex2d(-.98, -1. + o);
526 glVertex2d(-.98, -1. + o2);
528 glVertex2d(-.98 + len, -1. + o);
529 glVertex2d(-.98 + len, -1. + o2);
532 double w = double(35) / double(getWidth());
533 double h = double(35) / double(getHeight());
536 glRotated(180, 1, 0, 0);
538 glRotated(-180, 1, 0, 0);
541 glRotated(180, 1, 0, 0);
543 glRotated(-180, 1, 0, 0);
546 glMatrixMode(GL_PROJECTION);
548 glMatrixMode(GL_MODELVIEW);
574 if (o != 0 && dynamic_cast<GUIGlObject*>(o) != 0) {
575 if (applyZoom && zoomDist < 0) {
611 FXbool ret = FXGLCanvas::makeCurrent();
619 glViewport(0, 0, getWidth() - 1, getHeight() - 1);
658 FXEvent* e = (FXEvent*) data;
660 if ((e->state & CONTROLMASK) != 0) {
678 if (e->click_count == 2) {
679 handle(
this, FXSEL(SEL_DOUBLECLICKED, 0), data);
784 myApp->getCursorPosition(x, y, b);
799 FXGLCanvas::onKeyPress(o, sel, data);
806 FXGLCanvas::onKeyRelease(o, sel, data);
814 #ifdef DEBUG_SNAPSHOT 815 std::cout <<
"add snappshot time=" << time <<
" file=" << file <<
"\n";
829 std::string errorMessage;
830 FXString ext = FXPath::extension(destFile.c_str());
831 const bool useGL2PS = ext ==
"ps" || ext ==
"eps" || ext ==
"pdf" || ext ==
"svg" || ext ==
"tex" || ext ==
"pgf";
833 const bool useVideo = destFile ==
"" || ext ==
"h264" || ext ==
"hevc";
844 glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
845 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
850 glDisable(GL_DITHER);
854 glEnable(GL_POLYGON_SMOOTH);
855 glEnable(GL_LINE_SMOOTH);
858 glDisable(GL_POLYGON_SMOOTH);
859 glDisable(GL_LINE_SMOOTH);
868 }
else if (ext ==
"eps") {
870 }
else if (ext ==
"pdf") {
872 }
else if (ext ==
"tex") {
874 }
else if (ext ==
"svg") {
876 }
else if (ext ==
"pgf") {
879 return "Could not save '" + destFile +
"'.\n Unrecognized format '" + std::string(ext.text()) +
"'.";
881 FILE* fp = fopen(destFile.c_str(),
"wb");
883 return "Could not save '" + destFile +
"'.\n Could not open file for writing";
887 glGetIntegerv(GL_VIEWPORT, viewport);
889 buffsize += 1024 * 1024;
892 GL_RGBA, 0, NULL, 0, 0, 0, buffsize, fp,
"out.eps");
893 glMatrixMode(GL_MODELVIEW);
895 glDisable(GL_TEXTURE_2D);
896 glDisable(GL_ALPHA_TEST);
898 glEnable(GL_DEPTH_TEST);
908 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
910 const float minB[2] = { (float)viewPort.
xmin(), (float)viewPort.
ymin() };
911 const float maxB[2] = { (float)viewPort.
xmax(), (float)viewPort.
ymax() };
913 glEnable(GL_POLYGON_OFFSET_FILL);
914 glEnable(GL_POLYGON_OFFSET_LINE);
932 FXMALLOC(&buf, FXColor, getWidth()*getHeight());
934 glReadBuffer(GL_BACK);
936 glReadPixels(0, 0, getWidth(), getHeight(), GL_RGBA, GL_UNSIGNED_BYTE, (GLvoid*)buf);
940 int mwidth = getWidth();
941 int mheight = getHeight();
943 FXColor* pbb = buf + mwidth * (mheight - 1);
960 errorMessage =
"video";
961 }
catch (std::runtime_error& err) {
962 errorMessage = err.what();
967 errorMessage =
"Could not save '" + destFile +
"'.";
970 errorMessage =
"Could not save '" + destFile +
"'.\n" + e.what();
988 #ifdef DEBUG_SNAPSHOT 989 std::cout <<
"check snappshots time=" << time <<
" registeredTimes=" <<
mySnapshots.size() <<
"\n";
992 std::map<SUMOTime, std::vector<std::string> >::iterator snapIt =
mySnapshots.find(time);
993 std::vector<std::string> files;
995 files = snapIt->second;
1000 for (
auto file : files) {
1001 #ifdef DEBUG_SNAPSHOT 1002 std::cout <<
"make snappshot time=" << time <<
" file=" << file <<
"\n";
1010 if (!files.empty()) {
1017 #ifdef DEBUG_SNAPSHOT 1152 GDALDataset* poDataset = (GDALDataset*)GDALOpen(d.
filename.c_str(), GA_ReadOnly);
1153 if (poDataset == 0) {
1156 const int xSize = poDataset->GetRasterXSize();
1157 const int ySize = poDataset->GetRasterYSize();
1159 if (d.
width <= 0.) {
1160 double adfGeoTransform[6];
1161 if (poDataset->GetGeoTransform(adfGeoTransform) == CE_None) {
1162 Position topLeft(adfGeoTransform[0], adfGeoTransform[3]);
1163 const double horizontalSize = xSize * adfGeoTransform[1];
1164 const double verticalSize = ySize * adfGeoTransform[5];
1165 Position bottomRight(topLeft.
x() + horizontalSize, topLeft.
y() + verticalSize);
1167 d.
width = bottomRight.x() - topLeft.
x();
1168 d.
height = topLeft.
y() - bottomRight.y();
1169 d.
centerX = (topLeft.
x() + bottomRight.x()) / 2;
1170 d.
centerY = (topLeft.
y() + bottomRight.y()) / 2;
1178 if (d.
width <= 0.) {
1185 const int picSize = xSize * ySize;
1187 if (!FXMALLOC(&result, FXColor, picSize)) {
1191 for (
int j = 0; j < picSize; j++) {
1192 result[j] = FXRGB(0, 0, 0);
1195 for (
int i = 1; i <= poDataset->GetRasterCount(); i++) {
1196 GDALRasterBand* poBand = poDataset->GetRasterBand(i);
1198 if (poBand->GetColorInterpretation() == GCI_RedBand) {
1200 }
else if (poBand->GetColorInterpretation() == GCI_GreenBand) {
1202 }
else if (poBand->GetColorInterpretation() == GCI_BlueBand) {
1204 }
else if (poBand->GetColorInterpretation() == GCI_AlphaBand) {
1211 assert(xSize == poBand->GetXSize() && ySize == poBand->GetYSize());
1212 if (poBand->RasterIO(GF_Read, 0, 0, xSize, ySize, ((
unsigned char*)result) + shift, xSize, ySize, GDT_Byte, 4, 4 * xSize) == CE_Failure) {
1217 GDALClose(poDataset);
1219 return new FXImage(getApp(), result, IMAGE_OWNED | IMAGE_KEEP | IMAGE_SHMI | IMAGE_SHMP, xSize, ySize);
1231 for (std::vector<GUISUMOAbstractView::Decal>::iterator l =
myDecals.begin(); l !=
myDecals.end(); ++l) {
1254 glTranslated(center.
x(), center.
y(), d.
layer);
1258 glRotated(d.
rot, 0, 0, 1);
1260 double halfWidth = d.
width / 2.;
1261 double halfHeight = d.
height / 2.;
1263 halfWidth =
p2m(halfWidth);
1264 halfHeight =
p2m(halfHeight);
1316 glMatrixMode(GL_PROJECTION);
1321 glOrtho(0, getWidth(), 0, getHeight(), -
GLO_MAX - 1,
GLO_MAX + 1);
1322 glMatrixMode(GL_MODELVIEW);
1324 double scaleX = (double)getWidth() / bound.
getWidth();
1325 double scaleY = (double)getHeight() / bound.
getHeight();
1326 glScaled(scaleX, scaleY, 1);
1327 glTranslated(-bound.
xmin(), -bound.
ymin(), 0);
1357 screenRelative(false),
GUIDialog_EditViewport * getViewportEditor()
get the viewport and create it on first access
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
void paintGLGrid()
paints a grid
A decal (an image) that can be shown.
GL2PSDLL_API GLint gl2psBeginPage(const char *title, const char *producer, GLint viewport[4], GLint format, GLint sort, GLint options, GLint colormode, GLint colorsize, GL2PSrgba *colormap, GLint nr, GLint ng, GLint nb, GLint buffersize, FILE *stream, const char *filename)
virtual long onConfigure(FXObject *, FXSelector, void *)
mouse functions
double xmax() const
Returns maximum x-coordinate.
void showToolTips(bool val)
show tool tips
int pfDrawString(const char *c)
double z() const
Returns the z-position.
std::vector< GUIGlID > getObjectsAtPosition(Position pos, double radius)
returns the ids of the object at position within the given (rectangular) radius using GL_SELECT ...
GUICompleteSchemeStorage gSchemeStorage
bool showSizeLegend
Information whether the size legend shall be drawn.
void cartesian2geo(Position &cartesian) const
Converts the given cartesian (shifted) position to its geo (lat/long) representation.
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. Used for: Centering of vehicles and junctions */.
double scale
information about a lane's width (temporary, used for a single view)
FXImage * checkGDALImage(Decal &d)
check whether we can read image data or position with gdal
FXImage * image
The image pointer for later cleanup.
virtual double getDelay() const
Returns the delay (should be overwritten by subclasses if applicable)
virtual double getXPos() const =0
Returns the x-offset of the field to show stored in this changer.
virtual long onDoubleClicked(FXObject *, FXSelector, void *)
void setDefault(const std::string &name)
Makes the scheme with the given name the default.
virtual void setViewportFromTo(const Position &lookFrom, const Position &lookAt)
applies the given viewport settings
Position getCenter() const
Returns the center of the boundary.
bool myAmInitialised
Internal information whether doInit() was called.
void add(const Position &pos)
Adds the given position to this one.
virtual void recenterView()
recenters the view
FXint myWindowCursorPositionY
SUMORTree * myGrid
The visualization speed-up.
static GUIGlID add(FXImage *i)
Adds a texture to use.
void toggleSelection(GUIGlID id)
Toggles selection of an object.
bool gaming
whether the application is in gaming mode or not
virtual long onMouseMove(FXObject *, FXSelector, void *)
const std::string & getFullName() const
double ymax() const
Returns maximum y-coordinate.
double x() const
Returns the x-position.
virtual long onMiddleBtnPress(FXObject *, FXSelector, void *)
Stores the information about how to visualize structures.
The dialog to change the view (gui) settings.
static GeoConvHelper & getProcessing()
the coordinate transformation to use for input conversion and processing
void setDelay(double delay)
Sets the delay of the parent application.
const double SUMO_const_laneWidth
void displayLegend()
a line with ticks, and the length information.
bool x2cartesian(Position &from, bool includeInBoundary=true)
void remove(GUIDialog_EditViewport *)
remove viewport
GUIMainWindow * myApp
The application.
#define GL2PS_DRAW_BACKGROUND
void addSnapshot(SUMOTime time, const std::string &file)
Sets the snapshot time to file map.
virtual void saveFrame(const std::string &destFile, FXColor *buf)
Adds a frame to a video snapshot which will be initialized if neccessary.
MFXMutex myDecalsLock
The mutex to use before accessing the decals list in order to avoid thread conficts.
double centerX
The center of the image in x-direction (net coordinates, in m)
bool screenRelative
Whether this image should be skipped in 2D-views.
virtual long onLeftBtnPress(FXObject *, FXSelector, void *)
void image(float x, float y, GLboolean opaque)
bool myInEditMode
Information whether too-tip informations shall be generated.
virtual void openObjectDialog()
virtual long onKeyRelease(FXObject *o, FXSelector sel, void *data)
GUIGlObject * getNetObject() const
Returns the network object.
void saveViewport(const double x, const double y, const double z)
Makes the given viewport the default.
bool addAdditionalGLVisualisation(const GUIGlObject *const which)
Adds an object to call its additional visualisation method.
void pfSetPosition(double x, double y)
int glID
whether the decal shall be drawn in screen coordinates, rather than network coordinates ...
static const RGBColor BLACK
virtual void copyViewportTo(GUISUMOAbstractView *view)
copy the viewport to the given view
Position snapToActiveGrid(const Position &pos) const
Returns a position that is mapped to the closest grid point if the grid is active.
virtual void onGamingClick(Position)
on gaming click
GUIDialog_ViewSettings * myVisualizationChanger
Visualization changer.
std::map< SUMOTime, std::vector< std::string > > mySnapshots
Snapshots.
virtual void stopTrack()
stop track
bool isGaming() const
return whether the gui is in gaming mode
GUIDialog_EditViewport * myViewportChooser
viewport chooser
virtual void setDelay(double)
Sets the delay of the parent application.
A RT-tree for efficient storing of SUMO's GL-objects.
bool dither
Information whether dithering shall be enabled.
double height
The height of the image (net coordinates in y-direction, in m)
GUIGlID getGlID() const
Returns the numerical id of the object.
#define UNUSED_PARAMETER(x)
double getDelay() const
Returns the delay of the parent application.
A class that stores a 2D geometrical boundary.
int myMouseHotspotX
Offset to the mouse-hotspot from the mouse position.
void addDecals(const std::vector< Decal > &decals)
add decals
bool removeAdditionalGLVisualisation(const GUIGlObject *const which)
Removes an object from the list of objects that show additional things.
#define WRITE_WARNING(msg)
Position screenPos2NetPos(int x, int y) const
Translate screen position to network position.
double layer
The layer of the image.
std::map< const GUIGlObject *, int > myAdditionallyDrawn
List of objects for which GUIGlObject::drawGLAdditional is called.
virtual GUIGlID getTrackedID() const
get tracked id
unsigned char blue() const
Returns the blue-amount of the color.
FXLabel & getCartesianLabel()
double getGridHeight() const
get grid Height
GUIVisualizationSizeSettings addSize
std::vector< Decal > myDecals
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
GUIGlID getObjectAtPosition(Position pos)
returns the id of the object at position using GL_SELECT
static FXbool scalePower2(FXImage *image, int maxSize=(2<< 29))
virtual void startTrack(int)
star track
double getWidth() const
Returns the width of the boudary (x-axis)
double getExaggeration(const GUIVisualizationSettings &s, double factor=20) const
return the drawing size including exaggeration and constantSize values
virtual long onPaint(FXObject *, FXSelector, void *)
std::string name
The name of this setting.
double gridXSize
Information about the grid spacings.
void showToolTipFor(const GUIGlID id)
invokes the tooltip for the given object
Boundary getVisibleBoundary() const
get visible boundary
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
virtual void setStatusBarText(const std::string &)
virtual long onKeyPress(FXObject *o, FXSelector sel, void *data)
keyboard functions
static void sleep(long ms)
virtual void setViewport(double zoom, double xPos, double yPos)=0
Sets the viewport Used for: Adapting a new viewport.
bool isInEditMode()
returns true, if the edit button was pressed
void show()
show view settings dialog
double getHeight() const
Returns the height of the boundary (y-axis)
A point in 2D or 3D with translation and scaling methods.
double m2p(double meter) const
meter-to-pixels conversion method
void setx(double x)
set position x
double p2m(double pixel) const
pixels-to-meters conversion method
#define GL2PS_USE_CURRENT_VIEWPORT
double getGridWidth() const
get grid width
virtual GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)=0
Returns an own popup-menu.
FXComboBox & getColoringSchemesCombo()
GL2PSDLL_API GLint gl2psEndPage(void)
unsigned char alpha() const
Returns the alpha-amount of the color.
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
double rot
The rotation of the image in the ground plane (in degrees)
virtual void centerTo(GUIGlID id, bool applyZoom, double zoomDist=20)
centers to the chosen artifact
double y() const
Returns the y-position.
virtual bool onLeftBtnRelease(void *data)
called when user releases left button
FXComboBox & getColoringSchemesCombo()
get coloring schemes combo
bool initialised
Whether this image was initialised (inserted as a texture)
virtual bool onRightBtnRelease(void *data)
called when user releases right button
virtual void doInit()
doInit
double centerY
The center of the image in y-direction (net coordinates, in m)
Boundary & grow(double by)
extends the boundary by the given amount
virtual long onMouseWheel(FXObject *, FXSelector, void *)
virtual void checkSnapshots()
Checks whether it is time for a snapshot.
virtual ~GUISUMOAbstractView()
destructor
std::string filename
The path to the file the image is located at.
virtual int doPaintGL(int, const Boundary &)
paint GL
static FXbool saveImage(const std::string &file, int width, int height, FXColor *data)
void updatePositionInformation() const
update position information
#define GL2PS_SIMPLE_SORT
GUIPerspectiveChanger * myChanger
The perspective changer.
bool myUseToolTips
use tool tips
std::string makeSnapshot(const std::string &destFile)
Takes a snapshots and writes it into the given file.
virtual void onLeftBtnPress(void *data)
mouse functions
GUIGLObjectPopupMenu * myPopup
The current popup-menu.
RGBColor backgroundColor
The background color to use.
FXMutex * myApplicationSnapshotsLock
void destroyPopup()
destoys the popup
bool antialiase
Information whether antialiase shall be enabled.
FXint myWindowCursorPositionX
Position of the cursor relative to the window.
virtual long onMiddleBtnRelease(FXObject *, FXSelector, void *)
Boundary getViewport(bool fixRatio=true)
get viewport
double width
The width of the image (net coordinates in x-direction, in m)
virtual bool setColorScheme(const std::string &)
set color scheme
void unlock()
release mutex lock
virtual void showViewportEditor()
show viewport editor
FXbool makeCurrent()
A reimplementation due to some internal reasons.
void applyGLTransform(bool fixRatio=true)
applies gl-transformations to fit the Boundary given by myChanger onto the canvas. If fixRatio is true, this boundary will be enlarged to prevent anisotropic stretching. (this should be set to false when doing selections)
virtual long onLeftBtnRelease(FXObject *, FXSelector, void *)
GUIVisualizationSettings & getDefault()
Returns the default scheme.
static void drawTextBox(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &txtColor=RGBColor::BLACK, const RGBColor &bgColor=RGBColor::WHITE, const RGBColor &borderColor=RGBColor::BLACK, const double angle=0)
draw Text box with given parameters
void setViewport(GUISUMOAbstractView *view)
Sets the default viewport.
GUIVisualizationSettings * myVisualizationSettings
visualization settings
virtual void onMouseWheel(void *data)
called when user changes mouse wheel
double xmin() const
Returns minimum x-coordinate.
void paintGL()
performs the painting of the simulation
virtual long onKeyPress(void *data)
called when user press a key
virtual SUMOTime getCurrentTimeStep() const
get the current simulation time
void sety(double y)
set position y
void setWindowCursorPosition(FXint x, FXint y)
Returns the information whether rotation is allowd.
void setCurrent(GUIVisualizationSettings *settings)
Sets current settings (called if reopened)
virtual double getZoom() const =0
Returns the zoom factor computed stored in this changer.
void show()
overload show function to focus always in OK Button
static const GUIGlID INVALID_ID
static FXImage * loadImage(FXApp *a, const std::string &file)
virtual double getYPos() const =0
Returns the y-offset of the field to show stored in this changer.
MFXMutex mySnapshotsLock
The mutex to use before accessing the decals list in order to avoid thread conficts.
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
double ymin() const
Returns minimum y-coordinate.
bool showGrid
Information whether a grid shall be shown.
void drawDecals()
Draws the stored decals.
static int getMaxTextureSize()
return maximum number of pixels in x and y direction
bool isAdditionalGLVisualisationEnabled(GUIGlObject *const which) const
Check if an object is added in the additional GL visualitation.
GUIPerspectiveChanger & getChanger() const
get changer
virtual int Search(const float a_min[2], const float a_max[2], const GUIVisualizationSettings &c) const
Find all within search rectangle.
GUIVisualizationSettings * getVisualisationSettings() const
get visualitation settings
bool skip2D
Whether this image should be skipped in 2D-views.
unsigned char green() const
Returns the green-amount of the color.
virtual void onMouseMove(void *data)
called when user moves mouse
void updateToolTip()
A method that updates the tooltip.
A dialog to change the viewport.
void setValues(double zoom, double xoff, double yoff)
Sets the given values into the dialog.
virtual void onRightBtnPress(void *data)
called when user press right button
void unblockObject(GUIGlID id)
Marks an object as unblocked.
static bool UseMesoSim
this should be set at the same time as MSGlobals::gUseMesoSim
virtual void setViewportFrom(double xPos, double yPos, double zPos)=0
Alternative method for setting the viewport.
void showViewschemeEditor()
show viewsscheme editor
virtual long onRightBtnPress(FXObject *, FXSelector, void *)
bool haveGrabbed() const
Returns the information whether one of the spin dialers is grabbed.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
virtual long onMouseLeft(FXObject *, FXSelector, void *)
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
GUIGlID getObjectUnderCursor()
returns the id of the object under the cursor using GL_SELECT
bool drawForSelecting
whether drawing is performed for the purpose of selecting objects
#define WRITE_MESSAGE(msg)
GUIGlObject * getObjectBlocking(GUIGlID id)
Returns the object from the container locking it.
virtual long onKeyRelease(void *data)
called when user releases a key
unsigned char red() const
Returns the red-amount of the color.
GUISelectedStorage gSelected
A global holder of selected objects.
void pfSetScaleXY(double sx, double sy)
FXDEFMAP(GUISUMOAbstractView) GUISUMOAbstractViewMap[]
virtual Boundary getCenteringBoundary() const =0
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
GUIGlChildWindow * myParent
The parent window.
virtual long onRightBtnRelease(FXObject *, FXSelector, void *)
std::set< SUMOTime > * myApplicationSnapshots
static const Position INVALID
used to indicate that a position is valid
std::vector< GUIGlID > getObjectsInBoundary(const Boundary &bound)
returns the ids of all objects in the given boundary
void setOldValues(const Position &lookFrom, const Position &lookAt)
Resets old values.
virtual double getZPos() const =0
Returns the camera height corresponding to the current zoom factor.