1 #ifndef _NETWORK_VIEWER_HPP_
2 #define _NETWORK_VIEWER_HPP_
4 #include "utility/libraries.hpp"
5 #include "utility/constants.hpp"
6 #include "core/Network.hpp"
10 class NetworkViewer :
public QGLWidget
19 double right_distance;
20 double forward_distance;
21 double backward_distance;
30 NetworkViewer( Network * network
31 , QWidget * parent = 0
32 ,
const QGLWidget* shareWidget = 0
33 , Qt::WindowFlags f = 0
43 split_horizontally(
unsigned int view_index = 0
44 ,
unsigned int width_factor = 2
48 split_vertically(
unsigned int view_index = 0
49 ,
unsigned int height_factor = 2
53 home(
unsigned int index = 0);
56 forward(
double distance
57 ,
unsigned int index = 0
60 backward(
double distance
61 ,
unsigned int index = 0
65 ,
unsigned int index = 0
68 right(
double distance
69 ,
unsigned int index = 0
74 ,
unsigned int index = 0
79 ,
unsigned int index = 0
84 ,
unsigned int index = 0
89 ,
unsigned int index = 0
94 ,
unsigned int index = 0
99 ,
unsigned int index = 0
113 virtual void paintEvent( QPaintEvent* paintEvent );
114 virtual void paintGL();
115 virtual void resizeGL(
int width,
int height );
117 virtual void keyPressEvent( QKeyEvent* event );
118 virtual void keyReleaseEvent( QKeyEvent* event );
120 virtual void mouseMoveEvent( QMouseEvent* event );
121 virtual void mousePressEvent( QMouseEvent* event );
122 virtual void mouseReleaseEvent( QMouseEvent* event );
123 virtual void wheelEvent( QWheelEvent* event );
125 virtual bool event( QEvent* event );
129 _get_transformation(
unsigned int index
131 , osg::Vec3d & center
139 _set_transformation(
unsigned int index
140 ,
const osg::Vec3d & eye
141 ,
const osg::Vec3d & center
142 ,
const osg::Vec3d & up
146 _get_view_index_with_focus();
152 onResize(
int width,
int height);
161 getEventQueue()
const;
163 osg::ref_ptr<osgViewer::GraphicsWindowEmbedded> _graphics_window;
164 osg::ref_ptr<osgViewer::CompositeViewer> _viewer;
167 int _previous_height;
169 string capture_location;
170 string capture_format;