Public Member Functions | Private Types | Private Attributes | List of all members
rviz::MeasureTool Class Reference

#include <measure_tool.h>

Inheritance diagram for rviz::MeasureTool:
Inheritance graph
[legend]

Public Member Functions

void activate () override
 
void deactivate () override
 
 MeasureTool ()
 
void onInitialize () override
 
int processMouseEvent (ViewportMouseEvent &event) override
 
 ~MeasureTool () override
 
- Public Member Functions inherited from rviz::Tool
bool accessAllKeys ()
 
virtual QString getClassId () const
 Return the class identifier which was used to create this instance. This version just returns whatever was set with setClassId(). More...
 
const QCursor & getCursor ()
 Get current cursor of this tool. More...
 
QString getDescription () const
 Set the description of the tool. This is called by ToolManager during tool initialization. More...
 
const QIcon & getIcon ()
 Get the icon of this tool. More...
 
QString getName () const
 
virtual PropertygetPropertyContainer () const
 Return the container for properties of this Tool. More...
 
char getShortcutKey ()
 
void initialize (DisplayContext *context)
 
virtual void load (const Config &config)
 Load properties from the given Config. More...
 
virtual int processKeyEvent (QKeyEvent *event, RenderPanel *panel)
 
virtual void save (Config config) const
 Save this entire tool into the given Config node. More...
 
virtual void setClassId (const QString &class_id)
 Set the class identifier used to create this instance. Typically this will be set by the factory object which created it. More...
 
void setCursor (const QCursor &cursor)
 Set the cursor for this tool. More...
 
void setDescription (const QString &description)
 
void setIcon (const QIcon &icon)
 Set the toolbar icon for this tool (will also set its cursor). More...
 
void setName (const QString &name)
 Set the name of the tool. More...
 
void setStatus (const QString &message)
 
 Tool ()
 
virtual void update (float wall_dt, float ros_dt)
 
 ~Tool () override
 

Private Types

enum  { START, END }
 

Private Attributes

Ogre::Vector3 end_
 
QCursor hit_cursor_
 
float length_
 
Lineline_
 
Ogre::Vector3 start_
 
enum rviz::MeasureTool:: { ... }  state_
 
QCursor std_cursor_
 

Additional Inherited Members

- Public Types inherited from rviz::Tool
enum  { Render = 1, Finished = 2 }
 
- Signals inherited from rviz::Tool
void close ()
 
void nameChanged (const QString &name)
 
- Protected Attributes inherited from rviz::Tool
bool access_all_keys_
 
DisplayContextcontext_
 
QCursor cursor_
 
QIcon icon_
 
Ogre::SceneManager * scene_manager_
 
char shortcut_key_
 

Detailed Description

Definition at line 47 of file measure_tool.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
START 
END 

Definition at line 62 of file measure_tool.h.

Constructor & Destructor Documentation

◆ MeasureTool()

rviz::MeasureTool::MeasureTool ( )

Definition at line 50 of file measure_tool.cpp.

◆ ~MeasureTool()

rviz::MeasureTool::~MeasureTool ( )
override

Definition at line 54 of file measure_tool.cpp.

Member Function Documentation

◆ activate()

void rviz::MeasureTool::activate ( )
overridevirtual

Implements rviz::Tool.

Definition at line 67 of file measure_tool.cpp.

◆ deactivate()

void rviz::MeasureTool::deactivate ( )
overridevirtual

Implements rviz::Tool.

Definition at line 72 of file measure_tool.cpp.

◆ onInitialize()

void rviz::MeasureTool::onInitialize ( )
overridevirtual

Override onInitialize to do any setup needed after the DisplayContext has been set. This is called by Tool::initialize(). The base implementation here does nothing.

Reimplemented from rviz::Tool.

Definition at line 59 of file measure_tool.cpp.

◆ processMouseEvent()

int rviz::MeasureTool::processMouseEvent ( ViewportMouseEvent event)
overridevirtual

Process a mouse event. This is the central function of all the tools, as it defines how the mouse is used.

Reimplemented from rviz::Tool.

Definition at line 76 of file measure_tool.cpp.

Member Data Documentation

◆ end_

Ogre::Vector3 rviz::MeasureTool::end_
private

Definition at line 70 of file measure_tool.h.

◆ hit_cursor_

QCursor rviz::MeasureTool::hit_cursor_
private

Definition at line 74 of file measure_tool.h.

◆ length_

float rviz::MeasureTool::length_
private

Definition at line 71 of file measure_tool.h.

◆ line_

Line* rviz::MeasureTool::line_
private

Definition at line 68 of file measure_tool.h.

◆ start_

Ogre::Vector3 rviz::MeasureTool::start_
private

Definition at line 69 of file measure_tool.h.

◆ state_

enum { ... } rviz::MeasureTool::state_

◆ std_cursor_

QCursor rviz::MeasureTool::std_cursor_
private

Definition at line 73 of file measure_tool.h.


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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Aug 2 2024 08:43:11