27 #if (((QGLVIEWER_VERSION & 0xff0000) >> 16) >= 2 && ((QGLVIEWER_VERSION & 0x00ff00) >> 8) >= 6) 28 #define qglv_real qreal 30 #define qglv_real float 35 #if (((QGLVIEWER_VERSION & 0xff0000) >> 16) >= 2 && ((QGLVIEWER_VERSION & 0x00ff00) >> 8) >= 5) 36 #define QGLVIEWER_DEPRECATED_MOUSEBINDING 40 #include <OpenGL/gl.h> 56 class StandardCamera :
public qglviewer::Camera
65 return Camera::zNear();
73 return Camera::zFar();
77 void setStandard(
bool s) {
_standard = s;}
85 G2oQGLViewer::G2oQGLViewer(QWidget* parent,
const QGLWidget* shareWidget, Qt::WindowFlags flags) :
86 QGLViewer(parent, shareWidget, flags),
87 graph(0), _drawActions(0), _drawList(0)
89 setAxisIsDrawn(
false);
113 glNewList(
_drawList, GL_COMPILE_AND_EXECUTE);
127 setBackgroundColor(QColor::fromRgb(51, 51, 51));
130 glEnable(GL_LINE_SMOOTH);
132 glEnable(GL_DEPTH_TEST);
133 glEnable(GL_NORMALIZE);
135 glShadeModel(GL_FLAT);
137 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
142 setStateFileName(QString::null);
145 #ifdef QGLVIEWER_DEPRECATED_MOUSEBINDING 146 setMouseBinding(Qt::NoModifier, Qt::RightButton, CAMERA, ZOOM);
147 setMouseBinding(Qt::NoModifier, Qt::MidButton, CAMERA, TRANSLATE);
149 setMouseBinding(Qt::RightButton, CAMERA, ZOOM);
150 setMouseBinding(Qt::MidButton, CAMERA, TRANSLATE);
154 setShortcut(CAMERA_MODE, 0);
155 setShortcut(EXIT_VIEWER, 0);
159 qglviewer::Camera* oldcam = camera();
160 qglviewer::Camera* cam =
new StandardCamera();
162 cam->setPosition(qglviewer::Vec(0., 0., 75.));
163 cam->setUpVector(qglviewer::Vec(0., 1., 0.));
164 cam->lookAt(qglviewer::Vec(0., 0., 0.));
void applyAction(HyperGraph *graph, HyperGraphElementAction *action, HyperGraphElementAction::Parameters *params, const std::string &typeName)
HyperGraphElementAction * _drawActions
bool updateDisplay() const
void setUpdateDisplay(bool updateDisplay)
static HyperGraphActionLibrary * instance()
return the single instance of the HyperGraphActionLibrary
HyperGraphElementAction * actionByName(const std::string &name)
Protocol The SLAM executable accepts such as solving the and retrieving or vertices in the graph
DrawAction::Parameters * _drawActionParameters