Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mapviz::MapCanvas Class Reference

#include <map_canvas.h>

Inheritance diagram for mapviz::MapCanvas:
Inheritance graph
[legend]

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)
 
void leaveEvent (QEvent *e)
 
 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 setCanvasAbleToMove (bool assigning)
 
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 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_
 
bool canvas_able_to_move_ = true
 
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< MapvizPluginPtrplugins_
 
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::TransformListenertf_
 
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_
 

Detailed Description

Definition at line 57 of file map_canvas.h.

Constructor & Destructor Documentation

mapviz::MapCanvas::MapCanvas ( QWidget *  parent = 0)
explicit

Definition at line 50 of file map_canvas.cpp.

mapviz::MapCanvas::~MapCanvas ( )

Definition at line 95 of file map_canvas.cpp.

Member Function Documentation

void mapviz::MapCanvas::AddPlugin ( MapvizPluginPtr  plugin,
int  order 
)

Definition at line 460 of file map_canvas.cpp.

void mapviz::MapCanvas::CaptureFrame ( bool  force = false)

Definition at line 183 of file map_canvas.cpp.

void mapviz::MapCanvas::CaptureFrames ( bool  enabled)
inline

Definition at line 119 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

Parameters
bufferAn initialize buffer to copy data into
Returns
false if the current capture buffer is empty

Definition at line 132 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.

Parameters
bufferA vector to copy the capture buffer into.
Returns
false if the current capture buffer is empty

Definition at line 149 of file map_canvas.h.

QPointF mapviz::MapCanvas::FixedFrameToMapGlCoord ( const QPointF &  point)

Definition at line 346 of file map_canvas.cpp.

double mapviz::MapCanvas::frameRate ( ) const

Definition at line 615 of file map_canvas.cpp.

void mapviz::MapCanvas::Hover ( double  x,
double  y,
double  scale 
)
signal
void mapviz::MapCanvas::initGlBlending ( )
protected

Definition at line 170 of file map_canvas.cpp.

void mapviz::MapCanvas::initializeGL ( )
protected

Definition at line 133 of file map_canvas.cpp.

void mapviz::MapCanvas::InitializePixelBuffers ( )
protected

Definition at line 108 of file map_canvas.cpp.

void mapviz::MapCanvas::InitializeTf ( boost::shared_ptr< tf::TransformListener tf)

Definition at line 103 of file map_canvas.cpp.

void mapviz::MapCanvas::keyPressEvent ( QKeyEvent *  e)
protected

Definition at line 331 of file map_canvas.cpp.

void mapviz::MapCanvas::leaveEvent ( QEvent *  e)

Definition at line 405 of file map_canvas.cpp.

QPointF mapviz::MapCanvas::MapGlCoordToFixedFrame ( const QPointF &  point)

Definition at line 340 of file map_canvas.cpp.

void mapviz::MapCanvas::mouseMoveEvent ( QMouseEvent *  e)
protected

Definition at line 361 of file map_canvas.cpp.

void mapviz::MapCanvas::mousePressEvent ( QMouseEvent *  e)
protected

Definition at line 320 of file map_canvas.cpp.

void mapviz::MapCanvas::mouseReleaseEvent ( QMouseEvent *  e)
protected

Definition at line 351 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 219 of file map_canvas.cpp.

void mapviz::MapCanvas::popGlMatrices ( )
protected

Definition at line 296 of file map_canvas.cpp.

void mapviz::MapCanvas::pushGlMatrices ( )
protected

Definition at line 285 of file map_canvas.cpp.

void mapviz::MapCanvas::Recenter ( )
protected

Definition at line 596 of file map_canvas.cpp.

void mapviz::MapCanvas::RemovePlugin ( MapvizPluginPtr  plugin)

Definition at line 465 of file map_canvas.cpp.

void mapviz::MapCanvas::ReorderDisplays ( )

Definition at line 591 of file map_canvas.cpp.

void mapviz::MapCanvas::ResetLocation ( )

Definition at line 585 of file map_canvas.cpp.

void mapviz::MapCanvas::resizeGL ( int  w,
int  h 
)
protected

Definition at line 178 of file map_canvas.cpp.

void mapviz::MapCanvas::SetBackground ( const QColor &  color)
inline

Definition at line 113 of file map_canvas.h.

void mapviz::MapCanvas::setCanvasAbleToMove ( bool  assigning)
inline

Definition at line 88 of file map_canvas.h.

void mapviz::MapCanvas::SetFixedFrame ( const std::string &  frame)

Definition at line 411 of file map_canvas.cpp.

void mapviz::MapCanvas::setFrameRate ( const double  fps)
slot

Definition at line 605 of file map_canvas.cpp.

void mapviz::MapCanvas::SetOffsetX ( float  x)
inline

Definition at line 101 of file map_canvas.h.

void mapviz::MapCanvas::SetOffsetY ( float  y)
inline

Definition at line 107 of file map_canvas.h.

void mapviz::MapCanvas::SetTargetFrame ( const std::string &  frame)

Definition at line 421 of file map_canvas.cpp.

void mapviz::MapCanvas::SetViewScale ( float  scale)
inline

Definition at line 95 of file map_canvas.h.

void mapviz::MapCanvas::ToggleEnableAntialiasing ( bool  on)

Definition at line 441 of file map_canvas.cpp.

void mapviz::MapCanvas::ToggleFixOrientation ( bool  on)

Definition at line 431 of file map_canvas.cpp.

void mapviz::MapCanvas::ToggleRotate90 ( bool  on)

Definition at line 436 of file map_canvas.cpp.

void mapviz::MapCanvas::ToggleUseLatestTransforms ( bool  on)

Definition at line 451 of file map_canvas.cpp.

void mapviz::MapCanvas::TransformTarget ( QPainter *  painter)
protected

Definition at line 473 of file map_canvas.cpp.

void mapviz::MapCanvas::UpdateView ( )

Definition at line 569 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 307 of file map_canvas.cpp.

void mapviz::MapCanvas::Zoom ( float  factor)
protected

Definition at line 314 of file map_canvas.cpp.

Member Data Documentation

QColor mapviz::MapCanvas::bg_color_
protected

Definition at line 204 of file map_canvas.h.

bool mapviz::MapCanvas::canvas_able_to_move_ = true
protected

Definition at line 190 of file map_canvas.h.

std::vector<uint8_t> mapviz::MapCanvas::capture_buffer_
protected

Definition at line 252 of file map_canvas.h.

bool mapviz::MapCanvas::capture_frames_
protected

Definition at line 195 of file map_canvas.h.

double mapviz::MapCanvas::drag_x_
protected

Definition at line 222 of file map_canvas.h.

double mapviz::MapCanvas::drag_y_
protected

Definition at line 223 of file map_canvas.h.

bool mapviz::MapCanvas::enable_antialiasing_
protected

Definition at line 200 of file map_canvas.h.

bool mapviz::MapCanvas::fix_orientation_
protected

Definition at line 198 of file map_canvas.h.

std::string mapviz::MapCanvas::fixed_frame_
protected

Definition at line 244 of file map_canvas.h.

QTimer mapviz::MapCanvas::frame_rate_timer_
protected

Definition at line 202 of file map_canvas.h.

bool mapviz::MapCanvas::has_pixel_buffers_
protected

Definition at line 191 of file map_canvas.h.

bool mapviz::MapCanvas::initialized_
protected

Definition at line 197 of file map_canvas.h.

Qt::MouseButton mapviz::MapCanvas::mouse_button_
protected

Definition at line 206 of file map_canvas.h.

int mapviz::MapCanvas::mouse_hover_x_
protected

Definition at line 214 of file map_canvas.h.

int mapviz::MapCanvas::mouse_hover_y_
protected

Definition at line 215 of file map_canvas.h.

bool mapviz::MapCanvas::mouse_hovering_
protected

Definition at line 213 of file map_canvas.h.

bool mapviz::MapCanvas::mouse_pressed_
protected

Definition at line 207 of file map_canvas.h.

int mapviz::MapCanvas::mouse_previous_y_
protected

Definition at line 211 of file map_canvas.h.

int mapviz::MapCanvas::mouse_x_
protected

Definition at line 208 of file map_canvas.h.

int mapviz::MapCanvas::mouse_y_
protected

Definition at line 209 of file map_canvas.h.

double mapviz::MapCanvas::offset_x_
protected

Definition at line 218 of file map_canvas.h.

double mapviz::MapCanvas::offset_y_
protected

Definition at line 219 of file map_canvas.h.

GLuint mapviz::MapCanvas::pixel_buffer_ids_[2]
protected

Definition at line 193 of file map_canvas.h.

int32_t mapviz::MapCanvas::pixel_buffer_index_
protected

Definition at line 194 of file map_canvas.h.

int32_t mapviz::MapCanvas::pixel_buffer_size_
protected

Definition at line 192 of file map_canvas.h.

std::list<MapvizPluginPtr> mapviz::MapCanvas::plugins_
protected

Definition at line 250 of file map_canvas.h.

QTransform mapviz::MapCanvas::qtransform_
protected

Definition at line 249 of file map_canvas.h.

bool mapviz::MapCanvas::rotate_90_
protected

Definition at line 199 of file map_canvas.h.

float mapviz::MapCanvas::scene_bottom_
protected

Definition at line 242 of file map_canvas.h.

float mapviz::MapCanvas::scene_left_
protected

Definition at line 239 of file map_canvas.h.

float mapviz::MapCanvas::scene_right_
protected

Definition at line 240 of file map_canvas.h.

float mapviz::MapCanvas::scene_top_
protected

Definition at line 241 of file map_canvas.h.

std::string mapviz::MapCanvas::target_frame_
protected

Definition at line 245 of file map_canvas.h.

boost::shared_ptr<tf::TransformListener> mapviz::MapCanvas::tf_
protected

Definition at line 247 of file map_canvas.h.

tf::StampedTransform mapviz::MapCanvas::transform_
protected

Definition at line 248 of file map_canvas.h.

float mapviz::MapCanvas::view_bottom_
protected

Definition at line 236 of file map_canvas.h.

float mapviz::MapCanvas::view_center_x_
protected

Definition at line 226 of file map_canvas.h.

float mapviz::MapCanvas::view_center_y_
protected

Definition at line 227 of file map_canvas.h.

float mapviz::MapCanvas::view_left_
protected

Definition at line 233 of file map_canvas.h.

float mapviz::MapCanvas::view_right_
protected

Definition at line 234 of file map_canvas.h.

float mapviz::MapCanvas::view_scale_
protected

Definition at line 230 of file map_canvas.h.

float mapviz::MapCanvas::view_top_
protected

Definition at line 235 of file map_canvas.h.


The documentation for this class was generated from the following files:


mapviz
Author(s): Marc Alban
autogenerated on Fri Mar 19 2021 02:44:25