Public Member Functions | Static Public Attributes | Private Slots | Private Member Functions | Private Attributes | List of all members
rviz_mesh_plugin::FaceSelectionTool Class Reference

#include <face_selection_tool.h>

Inheritance diagram for rviz_mesh_plugin::FaceSelectionTool:
Inheritance graph
[legend]

Public Member Functions

virtual void activate ()
 
bool areFacesSelected ()
 
void clearSelection ()
 
virtual void deactivate ()
 
 FaceSelectionTool ()
 
void getSelectedFaces (size_t goalSection, std::string regionLabel, mesh_msgs::TriangleMesh &meshMsg)
 
virtual void onInitialize ()
 
virtual int processKeyEvent (QKeyEvent *event, rviz::RenderPanel *panel)
 
virtual int processMouseEvent (rviz::ViewportMouseEvent &event)
 
 ~FaceSelectionTool ()
 
- Public Member Functions inherited from rviz::Tool
bool accessAllKeys ()
 
virtual QString getClassId () const
 
const QCursor & getCursor ()
 
QString getDescription () const
 
const QIcon & getIcon ()
 
QString getName () const
 
virtual PropertygetPropertyContainer () const
 
char getShortcutKey ()
 
void initialize (DisplayContext *context)
 
virtual void load (const Config &config)
 
virtual void save (Config config) const
 
virtual void setClassId (const QString &class_id)
 
void setCursor (const QCursor &cursor)
 
void setDescription (const QString &description)
 
void setIcon (const QIcon &icon)
 
void setName (const QString &name)
 
void setStatus (const QString &message)
 
 Tool ()
 
virtual void update (float wall_dt, float ros_dt)
 
 ~Tool () override
 

Static Public Attributes

static const float BOX_SIZE_TOLERANCE = 0.0001
 
static const size_t MAXIMUM_PICKED_FACES = 10000
 

Private Slots

void updateTopic ()
 

Private Member Functions

void deselectSingleFace (rviz::ViewportMouseEvent &event)
 
void getIdentityOfSingleFace (Ogre::ManualObject *mesh, Ogre::Ray &ray, size_t &goalSection, size_t &goalIndex, Ogre::Real &dist)
 
void getRawManualObjectData (Ogre::ManualObject *mesh, size_t sectionNumber, size_t &vertexCount, Ogre::Vector3 *&vertices, size_t &indexCount, unsigned long *&indices)
 
void getSegmentMesh (mesh_msgs::TriangleMesh &mesh)
 
void initNode ()
 
void initOgre ()
 
void meshCb (const mesh_msgs::TriangleMeshStamped::ConstPtr &mesh)
 
void selectSingleFace (rviz::ViewportMouseEvent &event)
 
void setReferenceMesh (mesh_msgs::TriangleMesh mesh)
 
void setTransform (const mesh_msgs::TriangleMeshStamped &mesh)
 
bool singleRayQuery (rviz::ViewportMouseEvent &event, int num_results, Ogre::Ray &ray)
 
void updateSelectionMesh ()
 

Private Attributes

ros::Publisher goal_pub
 
bool has_mesh
 
ros::Publisher id_pub
 
std::map< size_t, std::vector< size_t > > m_goalFaces
 
bool m_singleDeselect
 
bool m_singleSelect
 
ros::Publisher mesh_pub
 
ros::Subscriber mesh_sub
 
rviz::RosTopicPropertymesh_topic
 
ros::NodeHandle n
 
int num_results
 
float reference_color_a = 0.5
 
int reference_color_b = 155
 
int reference_color_g = 155
 
int reference_color_r = 0
 
Ogre::ManualObject * reference_mesh
 
Ogre::MaterialPtr reference_mesh_material
 
Ogre::SceneManager * scene_manager
 
Ogre::SceneNode * scene_node
 
float segment_color_a = 0.75
 
int segment_color_b = 255
 
int segment_color_g = 0
 
int segment_color_r = 0
 
Ogre::ManualObject * segment_mesh
 
Ogre::MaterialPtr segment_mesh_material
 

Additional Inherited Members

- Signals inherited from rviz::Tool
void close ()
 
- Public Attributes inherited from rviz::Tool
 Finished
 
 Render
 
- 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 119 of file face_selection_tool.h.

Constructor & Destructor Documentation

◆ FaceSelectionTool()

FaceSelectionTool::FaceSelectionTool ( )

Definition at line 62 of file face_selection_tool.cpp.

◆ ~FaceSelectionTool()

FaceSelectionTool::~FaceSelectionTool ( )

Definition at line 81 of file face_selection_tool.cpp.

Member Function Documentation

◆ activate()

void FaceSelectionTool::activate ( )
virtual

Implements rviz::Tool.

Definition at line 180 of file face_selection_tool.cpp.

◆ areFacesSelected()

bool FaceSelectionTool::areFacesSelected ( )

Definition at line 268 of file face_selection_tool.cpp.

◆ clearSelection()

void FaceSelectionTool::clearSelection ( )

Definition at line 258 of file face_selection_tool.cpp.

◆ deactivate()

void FaceSelectionTool::deactivate ( )
virtual

Implements rviz::Tool.

Definition at line 184 of file face_selection_tool.cpp.

◆ deselectSingleFace()

void FaceSelectionTool::deselectSingleFace ( rviz::ViewportMouseEvent event)
private

Definition at line 458 of file face_selection_tool.cpp.

◆ getIdentityOfSingleFace()

void FaceSelectionTool::getIdentityOfSingleFace ( Ogre::ManualObject *  mesh,
Ogre::Ray &  ray,
size_t &  goalSection,
size_t &  goalIndex,
Ogre::Real &  dist 
)
private

Definition at line 488 of file face_selection_tool.cpp.

◆ getRawManualObjectData()

void FaceSelectionTool::getRawManualObjectData ( Ogre::ManualObject *  mesh,
size_t  sectionNumber,
size_t &  vertexCount,
Ogre::Vector3 *&  vertices,
size_t &  indexCount,
unsigned long *&  indices 
)
private

Definition at line 534 of file face_selection_tool.cpp.

◆ getSegmentMesh()

void FaceSelectionTool::getSegmentMesh ( mesh_msgs::TriangleMesh &  mesh)
private

Definition at line 223 of file face_selection_tool.cpp.

◆ getSelectedFaces()

void rviz_mesh_plugin::FaceSelectionTool::getSelectedFaces ( size_t  goalSection,
std::string  regionLabel,
mesh_msgs::TriangleMesh &  meshMsg 
)

◆ initNode()

void FaceSelectionTool::initNode ( )
private

Definition at line 160 of file face_selection_tool.cpp.

◆ initOgre()

void FaceSelectionTool::initOgre ( )
private

Definition at line 116 of file face_selection_tool.cpp.

◆ meshCb()

void FaceSelectionTool::meshCb ( const mesh_msgs::TriangleMeshStamped::ConstPtr &  mesh)
private

Definition at line 170 of file face_selection_tool.cpp.

◆ onInitialize()

void FaceSelectionTool::onInitialize ( )
virtual

Reimplemented from rviz::Tool.

Definition at line 107 of file face_selection_tool.cpp.

◆ processKeyEvent()

int FaceSelectionTool::processKeyEvent ( QKeyEvent *  event,
rviz::RenderPanel panel 
)
virtual

Reimplemented from rviz::Tool.

Definition at line 312 of file face_selection_tool.cpp.

◆ processMouseEvent()

int FaceSelectionTool::processMouseEvent ( rviz::ViewportMouseEvent event)
virtual

Reimplemented from rviz::Tool.

Definition at line 349 of file face_selection_tool.cpp.

◆ selectSingleFace()

void FaceSelectionTool::selectSingleFace ( rviz::ViewportMouseEvent event)
private

Definition at line 414 of file face_selection_tool.cpp.

◆ setReferenceMesh()

void FaceSelectionTool::setReferenceMesh ( mesh_msgs::TriangleMesh  mesh)
private

Definition at line 205 of file face_selection_tool.cpp.

◆ setTransform()

void FaceSelectionTool::setTransform ( const mesh_msgs::TriangleMeshStamped &  mesh)
private

Definition at line 188 of file face_selection_tool.cpp.

◆ singleRayQuery()

bool FaceSelectionTool::singleRayQuery ( rviz::ViewportMouseEvent event,
int  num_results,
Ogre::Ray &  ray 
)
private

Definition at line 392 of file face_selection_tool.cpp.

◆ updateSelectionMesh()

void FaceSelectionTool::updateSelectionMesh ( )
private

Definition at line 273 of file face_selection_tool.cpp.

◆ updateTopic

void FaceSelectionTool::updateTopic ( )
privateslot

Definition at line 94 of file face_selection_tool.cpp.

Member Data Documentation

◆ BOX_SIZE_TOLERANCE

const float FaceSelectionTool::BOX_SIZE_TOLERANCE = 0.0001
static

Definition at line 132 of file face_selection_tool.h.

◆ goal_pub

ros::Publisher rviz_mesh_plugin::FaceSelectionTool::goal_pub
private

Definition at line 184 of file face_selection_tool.h.

◆ has_mesh

bool rviz_mesh_plugin::FaceSelectionTool::has_mesh
private

Definition at line 186 of file face_selection_tool.h.

◆ id_pub

ros::Publisher rviz_mesh_plugin::FaceSelectionTool::id_pub
private

Definition at line 183 of file face_selection_tool.h.

◆ m_goalFaces

std::map<size_t, std::vector<size_t> > rviz_mesh_plugin::FaceSelectionTool::m_goalFaces
private

Definition at line 175 of file face_selection_tool.h.

◆ m_singleDeselect

bool rviz_mesh_plugin::FaceSelectionTool::m_singleDeselect
private

Definition at line 178 of file face_selection_tool.h.

◆ m_singleSelect

bool rviz_mesh_plugin::FaceSelectionTool::m_singleSelect
private

Definition at line 177 of file face_selection_tool.h.

◆ MAXIMUM_PICKED_FACES

const size_t FaceSelectionTool::MAXIMUM_PICKED_FACES = 10000
static

Definition at line 133 of file face_selection_tool.h.

◆ mesh_pub

ros::Publisher rviz_mesh_plugin::FaceSelectionTool::mesh_pub
private

Definition at line 182 of file face_selection_tool.h.

◆ mesh_sub

ros::Subscriber rviz_mesh_plugin::FaceSelectionTool::mesh_sub
private

Definition at line 181 of file face_selection_tool.h.

◆ mesh_topic

rviz::RosTopicProperty* rviz_mesh_plugin::FaceSelectionTool::mesh_topic
private

Definition at line 173 of file face_selection_tool.h.

◆ n

ros::NodeHandle rviz_mesh_plugin::FaceSelectionTool::n
private

Definition at line 180 of file face_selection_tool.h.

◆ num_results

int rviz_mesh_plugin::FaceSelectionTool::num_results
private

Definition at line 185 of file face_selection_tool.h.

◆ reference_color_a

float rviz_mesh_plugin::FaceSelectionTool::reference_color_a = 0.5
private

Definition at line 191 of file face_selection_tool.h.

◆ reference_color_b

int rviz_mesh_plugin::FaceSelectionTool::reference_color_b = 155
private

Definition at line 190 of file face_selection_tool.h.

◆ reference_color_g

int rviz_mesh_plugin::FaceSelectionTool::reference_color_g = 155
private

Definition at line 189 of file face_selection_tool.h.

◆ reference_color_r

int rviz_mesh_plugin::FaceSelectionTool::reference_color_r = 0
private

Definition at line 188 of file face_selection_tool.h.

◆ reference_mesh

Ogre::ManualObject* rviz_mesh_plugin::FaceSelectionTool::reference_mesh
private

Definition at line 167 of file face_selection_tool.h.

◆ reference_mesh_material

Ogre::MaterialPtr rviz_mesh_plugin::FaceSelectionTool::reference_mesh_material
private

Definition at line 168 of file face_selection_tool.h.

◆ scene_manager

Ogre::SceneManager* rviz_mesh_plugin::FaceSelectionTool::scene_manager
private

Definition at line 166 of file face_selection_tool.h.

◆ scene_node

Ogre::SceneNode* rviz_mesh_plugin::FaceSelectionTool::scene_node
private

Definition at line 171 of file face_selection_tool.h.

◆ segment_color_a

float rviz_mesh_plugin::FaceSelectionTool::segment_color_a = 0.75
private

Definition at line 196 of file face_selection_tool.h.

◆ segment_color_b

int rviz_mesh_plugin::FaceSelectionTool::segment_color_b = 255
private

Definition at line 195 of file face_selection_tool.h.

◆ segment_color_g

int rviz_mesh_plugin::FaceSelectionTool::segment_color_g = 0
private

Definition at line 194 of file face_selection_tool.h.

◆ segment_color_r

int rviz_mesh_plugin::FaceSelectionTool::segment_color_r = 0
private

Definition at line 193 of file face_selection_tool.h.

◆ segment_mesh

Ogre::ManualObject* rviz_mesh_plugin::FaceSelectionTool::segment_mesh
private

Definition at line 169 of file face_selection_tool.h.

◆ segment_mesh_material

Ogre::MaterialPtr rviz_mesh_plugin::FaceSelectionTool::segment_mesh_material
private

Definition at line 170 of file face_selection_tool.h.


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


rviz_mesh_plugin
Author(s): Sebastian Pütz , Henning Deeken , Marcel Mrozinski , Kristin Schmidt , Jan Philipp Vogtherr
autogenerated on Fri Feb 12 2021 04:03:57