Public Member Functions | Private Member Functions | Private Attributes | List of all members
rviz_mesh_plugin::TriangleMeshVisual Class Reference

Class to display mesh data in the main panel of rviz. More...

#include <trianglemesh_visual.h>

Public Member Functions

void reset ()
 Clears whole stored data. More...
 
void setFrameOrientation (const Ogre::Quaternion &orientation)
 Sets the orientation of the coordinate frame the message refers to. More...
 
void setFramePosition (const Ogre::Vector3 &position)
 Sets the pose of the coordinate frame the message refers to. More...
 
void setMessage (const mesh_msgs::TriangleMeshStamped::ConstPtr &meshMsg)
 Extracts data from the ros-messages and creates meshes. More...
 
 TriangleMeshVisual (rviz::DisplayContext *context, size_t displayID, size_t meshID, size_t randomID)
 Constructor. More...
 
void updateMaterial (bool showWireframe, Ogre::ColourValue wireframeColor, float wireframeAlpha, bool showFaces, Ogre::ColourValue facesColor, float facesAlpha, bool useVertexColors, bool useTriangleColors, bool showTextures, bool showNormals, Ogre::ColourValue normalsColor, float normalsAlpha, float normalsScallingFactor)
 Updates the visible parts of the mesh depending on input from the rviz display. More...
 
void updateNormals (float scallingFactor)
 Updates the size of the normals dynamically. More...
 
virtual ~TriangleMeshVisual ()
 Destructor. More...
 

Private Member Functions

void enteringColoredTriangleMesh (const mesh_msgs::TriangleMesh &mesh)
 
void enteringGeneralTriangleMesh (const mesh_msgs::TriangleMesh &mesh)
 
void enteringNormals (const mesh_msgs::TriangleMesh &mesh)
 
void showFaces (Ogre::Pass *pass, Ogre::ColourValue facesColor, float facesAlpha, bool useVertexColors)
 
void showNormals (Ogre::Pass *pass, Ogre::ColourValue normalsColor, float normalsAlpha)
 
void showTextures (Ogre::Pass *pass)
 
void showWireframe (Ogre::Pass *pass, Ogre::ColourValue wireframeColor, float wireframeAlpha)
 

Private Attributes

rviz::DisplayContextm_displayContext
 The context that contains the display information. More...
 
std::map< size_t, Ogre::ColourValue > m_fakeTextures
 Map of fake textures (size = 1x1 = only a color) More...
 
bool m_hasTextures
 Is the mesh textured? More...
 
Ogre::ManualObject * m_mesh
 The mesh-object to display. More...
 
Ogre::MaterialPtr m_meshColoredTrianglesMaterial
 The material for the colored triangle mesh. More...
 
Ogre::MaterialPtr m_meshGeneralMaterial
 The material for the general mesh. More...
 
Ogre::MaterialPtr m_normalMaterial
 The material of the normals. More...
 
float m_normalsScalingFactor
 Factor the normal-size is multiplied with. More...
 
size_t m_postfix
 Second ID of the created mesh. More...
 
size_t m_prefix
 First ID of the created mesh. More...
 
size_t m_random
 Random ID of the created mesh. More...
 
Ogre::SceneNode * m_sceneNode
 Ogre Scenenode. More...
 
bool m_texture_coords_enabled
 
size_t m_textureCounter
 Counter for textures. More...
 
bool m_triangle_colors_enabled
 
bool m_vertex_colors_enabled
 
bool m_vertex_normals_enabled
 

Detailed Description

Class to display mesh data in the main panel of rviz.

Definition at line 81 of file trianglemesh_visual.h.

Constructor & Destructor Documentation

◆ TriangleMeshVisual()

rviz_mesh_plugin::TriangleMeshVisual::TriangleMeshVisual ( rviz::DisplayContext context,
size_t  displayID,
size_t  meshID,
size_t  randomID 
)

Constructor.

Parameters
contextThe context that contains the display information.
displayIDThe display id
meshIDThe mesh id
randomIDrandom number that will be used as part of the meshes UID

Definition at line 17 of file trianglemesh_visual.cpp.

◆ ~TriangleMeshVisual()

rviz_mesh_plugin::TriangleMeshVisual::~TriangleMeshVisual ( )
virtual

Destructor.

Definition at line 59 of file trianglemesh_visual.cpp.

Member Function Documentation

◆ enteringColoredTriangleMesh()

void rviz_mesh_plugin::TriangleMeshVisual::enteringColoredTriangleMesh ( const mesh_msgs::TriangleMesh &  mesh)
private

Definition at line 336 of file trianglemesh_visual.cpp.

◆ enteringGeneralTriangleMesh()

void rviz_mesh_plugin::TriangleMeshVisual::enteringGeneralTriangleMesh ( const mesh_msgs::TriangleMesh &  mesh)
private

Definition at line 399 of file trianglemesh_visual.cpp.

◆ enteringNormals()

void rviz_mesh_plugin::TriangleMeshVisual::enteringNormals ( const mesh_msgs::TriangleMesh &  mesh)
private

Definition at line 466 of file trianglemesh_visual.cpp.

◆ reset()

void rviz_mesh_plugin::TriangleMeshVisual::reset ( )

Clears whole stored data.

Definition at line 72 of file trianglemesh_visual.cpp.

◆ setFrameOrientation()

void rviz_mesh_plugin::TriangleMeshVisual::setFrameOrientation ( const Ogre::Quaternion &  orientation)

Sets the orientation of the coordinate frame the message refers to.

Parameters
orientationThe orientation of the coordinate frame

Definition at line 596 of file trianglemesh_visual.cpp.

◆ setFramePosition()

void rviz_mesh_plugin::TriangleMeshVisual::setFramePosition ( const Ogre::Vector3 &  position)

Sets the pose of the coordinate frame the message refers to.

Parameters
positionThe pose of the coordinate frame

Definition at line 591 of file trianglemesh_visual.cpp.

◆ setMessage()

void rviz_mesh_plugin::TriangleMeshVisual::setMessage ( const mesh_msgs::TriangleMeshStamped::ConstPtr &  meshMsg)

Extracts data from the ros-messages and creates meshes.

Parameters
meshMsgMessage containing the mesh

Definition at line 496 of file trianglemesh_visual.cpp.

◆ showFaces()

void rviz_mesh_plugin::TriangleMeshVisual::showFaces ( Ogre::Pass *  pass,
Ogre::ColourValue  facesColor,
float  facesAlpha,
bool  useVertexColors 
)
private

Definition at line 148 of file trianglemesh_visual.cpp.

◆ showNormals()

void rviz_mesh_plugin::TriangleMeshVisual::showNormals ( Ogre::Pass *  pass,
Ogre::ColourValue  normalsColor,
float  normalsAlpha 
)
private

Definition at line 179 of file trianglemesh_visual.cpp.

◆ showTextures()

void rviz_mesh_plugin::TriangleMeshVisual::showTextures ( Ogre::Pass *  pass)
private

Definition at line 203 of file trianglemesh_visual.cpp.

◆ showWireframe()

void rviz_mesh_plugin::TriangleMeshVisual::showWireframe ( Ogre::Pass *  pass,
Ogre::ColourValue  wireframeColor,
float  wireframeAlpha 
)
private

Definition at line 118 of file trianglemesh_visual.cpp.

◆ updateMaterial()

void rviz_mesh_plugin::TriangleMeshVisual::updateMaterial ( bool  showWireframe,
Ogre::ColourValue  wireframeColor,
float  wireframeAlpha,
bool  showFaces,
Ogre::ColourValue  facesColor,
float  facesAlpha,
bool  useVertexColors,
bool  useTriangleColors,
bool  showTextures,
bool  showNormals,
Ogre::ColourValue  normalsColor,
float  normalsAlpha,
float  normalsScallingFactor 
)

Updates the visible parts of the mesh depending on input from the rviz display.

Parameters
showWireframeWhen TRUE wireframe is visible
wireframeColorThe color of the wireframe
wireframeAlphaThe transparency of the wireframe
showFacesWhen TRUE faces are visible
facesColorThe color of the faces
facesAlphaThe transparency of the faces
useVertexColorsWhen TRUE vertex colors are used
useTriangleColorsWhen TRUE triangle colors are used
showTexturesWhen TRUE textures are visible
showNormalsWhen TRUE normals are visible
normalsColorThe color of the normals
normalsAlphaThe transparency of the normals
normalsScallingFactorThe size of the normals

Definition at line 208 of file trianglemesh_visual.cpp.

◆ updateNormals()

void rviz_mesh_plugin::TriangleMeshVisual::updateNormals ( float  scallingFactor)

Updates the size of the normals dynamically.

Parameters
scallingFactorThe factor the normals have to be scaled with

Definition at line 284 of file trianglemesh_visual.cpp.

Member Data Documentation

◆ m_displayContext

rviz::DisplayContext* rviz_mesh_plugin::TriangleMeshVisual::m_displayContext
private

The context that contains the display information.

Definition at line 176 of file trianglemesh_visual.h.

◆ m_fakeTextures

std::map<size_t, Ogre::ColourValue> rviz_mesh_plugin::TriangleMeshVisual::m_fakeTextures
private

Map of fake textures (size = 1x1 = only a color)

Definition at line 206 of file trianglemesh_visual.h.

◆ m_hasTextures

bool rviz_mesh_plugin::TriangleMeshVisual::m_hasTextures
private

Is the mesh textured?

Definition at line 203 of file trianglemesh_visual.h.

◆ m_mesh

Ogre::ManualObject* rviz_mesh_plugin::TriangleMeshVisual::m_mesh
private

The mesh-object to display.

Definition at line 188 of file trianglemesh_visual.h.

◆ m_meshColoredTrianglesMaterial

Ogre::MaterialPtr rviz_mesh_plugin::TriangleMeshVisual::m_meshColoredTrianglesMaterial
private

The material for the colored triangle mesh.

Definition at line 194 of file trianglemesh_visual.h.

◆ m_meshGeneralMaterial

Ogre::MaterialPtr rviz_mesh_plugin::TriangleMeshVisual::m_meshGeneralMaterial
private

The material for the general mesh.

Definition at line 191 of file trianglemesh_visual.h.

◆ m_normalMaterial

Ogre::MaterialPtr rviz_mesh_plugin::TriangleMeshVisual::m_normalMaterial
private

The material of the normals.

Definition at line 197 of file trianglemesh_visual.h.

◆ m_normalsScalingFactor

float rviz_mesh_plugin::TriangleMeshVisual::m_normalsScalingFactor
private

Factor the normal-size is multiplied with.

Definition at line 209 of file trianglemesh_visual.h.

◆ m_postfix

size_t rviz_mesh_plugin::TriangleMeshVisual::m_postfix
private

Second ID of the created mesh.

Definition at line 182 of file trianglemesh_visual.h.

◆ m_prefix

size_t rviz_mesh_plugin::TriangleMeshVisual::m_prefix
private

First ID of the created mesh.

Definition at line 179 of file trianglemesh_visual.h.

◆ m_random

size_t rviz_mesh_plugin::TriangleMeshVisual::m_random
private

Random ID of the created mesh.

Definition at line 185 of file trianglemesh_visual.h.

◆ m_sceneNode

Ogre::SceneNode* rviz_mesh_plugin::TriangleMeshVisual::m_sceneNode
private

Ogre Scenenode.

Definition at line 173 of file trianglemesh_visual.h.

◆ m_texture_coords_enabled

bool rviz_mesh_plugin::TriangleMeshVisual::m_texture_coords_enabled
private

Definition at line 170 of file trianglemesh_visual.h.

◆ m_textureCounter

size_t rviz_mesh_plugin::TriangleMeshVisual::m_textureCounter
private

Counter for textures.

Definition at line 200 of file trianglemesh_visual.h.

◆ m_triangle_colors_enabled

bool rviz_mesh_plugin::TriangleMeshVisual::m_triangle_colors_enabled
private

Definition at line 169 of file trianglemesh_visual.h.

◆ m_vertex_colors_enabled

bool rviz_mesh_plugin::TriangleMeshVisual::m_vertex_colors_enabled
private

Definition at line 168 of file trianglemesh_visual.h.

◆ m_vertex_normals_enabled

bool rviz_mesh_plugin::TriangleMeshVisual::m_vertex_normals_enabled
private

Definition at line 167 of file trianglemesh_visual.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