#include <map_canvas.h>
Public Slots | |
void | setFrameRate (const double fps) |
Signals | |
void | Hover (double x, double y, double scale) |
Public Member Functions | |
void | AddPlugin (MapvizPluginPtr plugin, int order) |
void | CaptureFrame (bool force=false) |
void | CaptureFrames (bool enabled) |
bool | CopyCaptureBuffer (uchar *buffer) |
bool | CopyCaptureBuffer (std::vector< uint8_t > &buffer) |
QPointF | FixedFrameToMapGlCoord (const QPointF &point) |
double | frameRate () const |
void | InitializeTf (boost::shared_ptr< tf::TransformListener > tf) |
MapCanvas (QWidget *parent=0) | |
QPointF | MapGlCoordToFixedFrame (const QPointF &point) |
float | OffsetX () const |
float | OffsetY () const |
void | RemovePlugin (MapvizPluginPtr plugin) |
void | ReorderDisplays () |
void | ResetLocation () |
void | SetBackground (const QColor &color) |
void | SetFixedFrame (const std::string &frame) |
void | SetOffsetX (float x) |
void | SetOffsetY (float y) |
void | SetTargetFrame (const std::string &frame) |
void | SetViewScale (float scale) |
void | ToggleEnableAntialiasing (bool on) |
void | ToggleFixOrientation (bool on) |
void | ToggleRotate90 (bool on) |
void | ToggleUseLatestTransforms (bool on) |
void | UpdateView () |
float | ViewScale () const |
~MapCanvas () | |
Protected Member Functions | |
void | initGlBlending () |
void | initializeGL () |
void | InitializePixelBuffers () |
void | keyPressEvent (QKeyEvent *e) |
void | leaveEvent (QEvent *e) |
void | mouseMoveEvent (QMouseEvent *e) |
void | mousePressEvent (QMouseEvent *e) |
void | mouseReleaseEvent (QMouseEvent *e) |
void | paintEvent (QPaintEvent *event) |
void | popGlMatrices () |
void | pushGlMatrices () |
void | Recenter () |
void | resizeGL (int w, int h) |
void | TransformTarget (QPainter *painter) |
void | wheelEvent (QWheelEvent *e) |
void | Zoom (float factor) |
Protected Attributes | |
QColor | bg_color_ |
std::vector< uint8_t > | capture_buffer_ |
bool | capture_frames_ |
double | drag_x_ |
double | drag_y_ |
bool | enable_antialiasing_ |
bool | fix_orientation_ |
std::string | fixed_frame_ |
QTimer | frame_rate_timer_ |
bool | has_pixel_buffers_ |
bool | initialized_ |
Qt::MouseButton | mouse_button_ |
int | mouse_hover_x_ |
int | mouse_hover_y_ |
bool | mouse_hovering_ |
bool | mouse_pressed_ |
int | mouse_previous_y_ |
int | mouse_x_ |
int | mouse_y_ |
double | offset_x_ |
double | offset_y_ |
GLuint | pixel_buffer_ids_ [2] |
int32_t | pixel_buffer_index_ |
int32_t | pixel_buffer_size_ |
std::list< MapvizPluginPtr > | plugins_ |
QTransform | qtransform_ |
bool | rotate_90_ |
float | scene_bottom_ |
float | scene_left_ |
float | scene_right_ |
float | scene_top_ |
std::string | target_frame_ |
boost::shared_ptr < tf::TransformListener > | tf_ |
tf::StampedTransform | transform_ |
float | view_bottom_ |
float | view_center_x_ |
float | view_center_y_ |
float | view_left_ |
float | view_right_ |
float | view_scale_ |
float | view_top_ |
Definition at line 57 of file map_canvas.h.
mapviz::MapCanvas::MapCanvas | ( | QWidget * | parent = 0 | ) | [explicit] |
Definition at line 48 of file map_canvas.cpp.
Definition at line 93 of file map_canvas.cpp.
void mapviz::MapCanvas::AddPlugin | ( | MapvizPluginPtr | plugin, |
int | order | ||
) |
Definition at line 458 of file map_canvas.cpp.
void mapviz::MapCanvas::CaptureFrame | ( | bool | force = false | ) |
Definition at line 181 of file map_canvas.cpp.
void mapviz::MapCanvas::CaptureFrames | ( | bool | enabled | ) | [inline] |
Definition at line 111 of file map_canvas.h.
bool mapviz::MapCanvas::CopyCaptureBuffer | ( | uchar * | buffer | ) | [inline] |
Copies the current capture buffer into the target buffer. The target buffer must already be initialized to a size of: height * width * 4
buffer | An initialize buffer to copy data into |
Definition at line 124 of file map_canvas.h.
bool mapviz::MapCanvas::CopyCaptureBuffer | ( | std::vector< uint8_t > & | buffer | ) | [inline] |
Resizes a vector to be large enough to hold the current capture buffer and then copies the capture buffer into it.
buffer | A vector to copy the capture buffer into. |
Definition at line 141 of file map_canvas.h.
QPointF mapviz::MapCanvas::FixedFrameToMapGlCoord | ( | const QPointF & | point | ) |
Definition at line 344 of file map_canvas.cpp.
double mapviz::MapCanvas::frameRate | ( | ) | const |
Definition at line 611 of file map_canvas.cpp.
void mapviz::MapCanvas::Hover | ( | double | x, |
double | y, | ||
double | scale | ||
) | [signal] |
void mapviz::MapCanvas::initGlBlending | ( | ) | [protected] |
Definition at line 168 of file map_canvas.cpp.
void mapviz::MapCanvas::initializeGL | ( | ) | [protected] |
Definition at line 131 of file map_canvas.cpp.
void mapviz::MapCanvas::InitializePixelBuffers | ( | ) | [protected] |
Definition at line 106 of file map_canvas.cpp.
void mapviz::MapCanvas::InitializeTf | ( | boost::shared_ptr< tf::TransformListener > | tf | ) |
Definition at line 101 of file map_canvas.cpp.
void mapviz::MapCanvas::keyPressEvent | ( | QKeyEvent * | e | ) | [protected] |
Definition at line 329 of file map_canvas.cpp.
void mapviz::MapCanvas::leaveEvent | ( | QEvent * | e | ) | [protected] |
Definition at line 403 of file map_canvas.cpp.
QPointF mapviz::MapCanvas::MapGlCoordToFixedFrame | ( | const QPointF & | point | ) |
Definition at line 338 of file map_canvas.cpp.
void mapviz::MapCanvas::mouseMoveEvent | ( | QMouseEvent * | e | ) | [protected] |
Definition at line 359 of file map_canvas.cpp.
void mapviz::MapCanvas::mousePressEvent | ( | QMouseEvent * | e | ) | [protected] |
Definition at line 318 of file map_canvas.cpp.
void mapviz::MapCanvas::mouseReleaseEvent | ( | QMouseEvent * | e | ) | [protected] |
Definition at line 349 of file map_canvas.cpp.
float mapviz::MapCanvas::OffsetX | ( | ) | const [inline] |
Definition at line 84 of file map_canvas.h.
float mapviz::MapCanvas::OffsetY | ( | ) | const [inline] |
Definition at line 85 of file map_canvas.h.
void mapviz::MapCanvas::paintEvent | ( | QPaintEvent * | event | ) | [protected] |
Definition at line 217 of file map_canvas.cpp.
void mapviz::MapCanvas::popGlMatrices | ( | ) | [protected] |
Definition at line 294 of file map_canvas.cpp.
void mapviz::MapCanvas::pushGlMatrices | ( | ) | [protected] |
Definition at line 283 of file map_canvas.cpp.
void mapviz::MapCanvas::Recenter | ( | ) | [protected] |
Definition at line 592 of file map_canvas.cpp.
void mapviz::MapCanvas::RemovePlugin | ( | MapvizPluginPtr | plugin | ) |
Definition at line 463 of file map_canvas.cpp.
void mapviz::MapCanvas::ReorderDisplays | ( | ) |
Definition at line 587 of file map_canvas.cpp.
void mapviz::MapCanvas::ResetLocation | ( | ) |
Definition at line 581 of file map_canvas.cpp.
void mapviz::MapCanvas::resizeGL | ( | int | w, |
int | h | ||
) | [protected] |
Definition at line 176 of file map_canvas.cpp.
void mapviz::MapCanvas::SetBackground | ( | const QColor & | color | ) | [inline] |
Definition at line 105 of file map_canvas.h.
void mapviz::MapCanvas::SetFixedFrame | ( | const std::string & | frame | ) |
Definition at line 409 of file map_canvas.cpp.
void mapviz::MapCanvas::setFrameRate | ( | const double | fps | ) | [slot] |
Definition at line 601 of file map_canvas.cpp.
void mapviz::MapCanvas::SetOffsetX | ( | float | x | ) | [inline] |
Definition at line 93 of file map_canvas.h.
void mapviz::MapCanvas::SetOffsetY | ( | float | y | ) | [inline] |
Definition at line 99 of file map_canvas.h.
void mapviz::MapCanvas::SetTargetFrame | ( | const std::string & | frame | ) |
Definition at line 419 of file map_canvas.cpp.
void mapviz::MapCanvas::SetViewScale | ( | float | scale | ) | [inline] |
Definition at line 87 of file map_canvas.h.
void mapviz::MapCanvas::ToggleEnableAntialiasing | ( | bool | on | ) |
Definition at line 439 of file map_canvas.cpp.
void mapviz::MapCanvas::ToggleFixOrientation | ( | bool | on | ) |
Definition at line 429 of file map_canvas.cpp.
void mapviz::MapCanvas::ToggleRotate90 | ( | bool | on | ) |
Definition at line 434 of file map_canvas.cpp.
void mapviz::MapCanvas::ToggleUseLatestTransforms | ( | bool | on | ) |
Definition at line 449 of file map_canvas.cpp.
void mapviz::MapCanvas::TransformTarget | ( | QPainter * | painter | ) | [protected] |
Definition at line 469 of file map_canvas.cpp.
void mapviz::MapCanvas::UpdateView | ( | ) |
Definition at line 565 of file map_canvas.cpp.
float mapviz::MapCanvas::ViewScale | ( | ) | const [inline] |
Definition at line 83 of file map_canvas.h.
void mapviz::MapCanvas::wheelEvent | ( | QWheelEvent * | e | ) | [protected] |
Definition at line 305 of file map_canvas.cpp.
void mapviz::MapCanvas::Zoom | ( | float | factor | ) | [protected] |
Definition at line 312 of file map_canvas.cpp.
QColor mapviz::MapCanvas::bg_color_ [protected] |
Definition at line 196 of file map_canvas.h.
std::vector<uint8_t> mapviz::MapCanvas::capture_buffer_ [protected] |
Definition at line 244 of file map_canvas.h.
bool mapviz::MapCanvas::capture_frames_ [protected] |
Definition at line 187 of file map_canvas.h.
double mapviz::MapCanvas::drag_x_ [protected] |
Definition at line 214 of file map_canvas.h.
double mapviz::MapCanvas::drag_y_ [protected] |
Definition at line 215 of file map_canvas.h.
bool mapviz::MapCanvas::enable_antialiasing_ [protected] |
Definition at line 192 of file map_canvas.h.
bool mapviz::MapCanvas::fix_orientation_ [protected] |
Definition at line 190 of file map_canvas.h.
std::string mapviz::MapCanvas::fixed_frame_ [protected] |
Definition at line 236 of file map_canvas.h.
QTimer mapviz::MapCanvas::frame_rate_timer_ [protected] |
Definition at line 194 of file map_canvas.h.
bool mapviz::MapCanvas::has_pixel_buffers_ [protected] |
Definition at line 183 of file map_canvas.h.
bool mapviz::MapCanvas::initialized_ [protected] |
Definition at line 189 of file map_canvas.h.
Qt::MouseButton mapviz::MapCanvas::mouse_button_ [protected] |
Definition at line 198 of file map_canvas.h.
int mapviz::MapCanvas::mouse_hover_x_ [protected] |
Definition at line 206 of file map_canvas.h.
int mapviz::MapCanvas::mouse_hover_y_ [protected] |
Definition at line 207 of file map_canvas.h.
bool mapviz::MapCanvas::mouse_hovering_ [protected] |
Definition at line 205 of file map_canvas.h.
bool mapviz::MapCanvas::mouse_pressed_ [protected] |
Definition at line 199 of file map_canvas.h.
int mapviz::MapCanvas::mouse_previous_y_ [protected] |
Definition at line 203 of file map_canvas.h.
int mapviz::MapCanvas::mouse_x_ [protected] |
Definition at line 200 of file map_canvas.h.
int mapviz::MapCanvas::mouse_y_ [protected] |
Definition at line 201 of file map_canvas.h.
double mapviz::MapCanvas::offset_x_ [protected] |
Definition at line 210 of file map_canvas.h.
double mapviz::MapCanvas::offset_y_ [protected] |
Definition at line 211 of file map_canvas.h.
GLuint mapviz::MapCanvas::pixel_buffer_ids_[2] [protected] |
Definition at line 185 of file map_canvas.h.
int32_t mapviz::MapCanvas::pixel_buffer_index_ [protected] |
Definition at line 186 of file map_canvas.h.
int32_t mapviz::MapCanvas::pixel_buffer_size_ [protected] |
Definition at line 184 of file map_canvas.h.
std::list<MapvizPluginPtr> mapviz::MapCanvas::plugins_ [protected] |
Definition at line 242 of file map_canvas.h.
QTransform mapviz::MapCanvas::qtransform_ [protected] |
Definition at line 241 of file map_canvas.h.
bool mapviz::MapCanvas::rotate_90_ [protected] |
Definition at line 191 of file map_canvas.h.
float mapviz::MapCanvas::scene_bottom_ [protected] |
Definition at line 234 of file map_canvas.h.
float mapviz::MapCanvas::scene_left_ [protected] |
Definition at line 231 of file map_canvas.h.
float mapviz::MapCanvas::scene_right_ [protected] |
Definition at line 232 of file map_canvas.h.
float mapviz::MapCanvas::scene_top_ [protected] |
Definition at line 233 of file map_canvas.h.
std::string mapviz::MapCanvas::target_frame_ [protected] |
Definition at line 237 of file map_canvas.h.
boost::shared_ptr<tf::TransformListener> mapviz::MapCanvas::tf_ [protected] |
Definition at line 239 of file map_canvas.h.
tf::StampedTransform mapviz::MapCanvas::transform_ [protected] |
Definition at line 240 of file map_canvas.h.
float mapviz::MapCanvas::view_bottom_ [protected] |
Definition at line 228 of file map_canvas.h.
float mapviz::MapCanvas::view_center_x_ [protected] |
Definition at line 218 of file map_canvas.h.
float mapviz::MapCanvas::view_center_y_ [protected] |
Definition at line 219 of file map_canvas.h.
float mapviz::MapCanvas::view_left_ [protected] |
Definition at line 225 of file map_canvas.h.
float mapviz::MapCanvas::view_right_ [protected] |
Definition at line 226 of file map_canvas.h.
float mapviz::MapCanvas::view_scale_ [protected] |
Definition at line 222 of file map_canvas.h.
float mapviz::MapCanvas::view_top_ [protected] |
Definition at line 227 of file map_canvas.h.