Class to display mesh data in the main panel of rviz.
More...
#include <textured_mesh_visual.h>
|
bool | addTexture (const mesh_msgs::MeshTexture::ConstPtr &textureMsg) |
| Extracts data from the ros-messages and adds textures to the textured mesh. More...
|
|
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...
|
|
bool | setGeometry (const mesh_msgs::MeshGeometryStamped::ConstPtr &meshMsg) |
| Extracts data from the ros-messages and creates meshes. More...
|
|
bool | setMaterials (const mesh_msgs::MeshMaterialsStamped::ConstPtr &materialMsg) |
| Extracts data from the ros-messages and creates a textured mesh. More...
|
|
bool | setVertexColors (const mesh_msgs::MeshVertexColorsStamped::ConstPtr &vertexColorsMsg) |
| Extracts data from the ros-messages and creates a colored mesh. More...
|
|
bool | setVertexCosts (const mesh_msgs::MeshVertexCostsStamped::ConstPtr &vertexCostsMsg, int costColorType) |
| Extracts data from the ros-messages and creates a colored mesh with colors calculated from vertex costs. More...
|
|
bool | setVertexCosts (const mesh_msgs::MeshVertexCostsStamped::ConstPtr &vertexCostsMsg, int costColorType, float minCost, float maxCost) |
|
| TexturedMeshVisual (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 showVertexCosts, bool showTextures, bool showTexturedFacesOnly, 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 | ~TexturedMeshVisual () |
| Destructor. More...
|
|
|
Ogre::ColourValue | calculateColorFromCost (float cost, int costColorType) |
| Calculates a color for a given cost value using a spectrum from red to green. More...
|
|
void | enteringColoredTriangleMesh (const mesh_msgs::MeshGeometry &mesh, const mesh_msgs::MeshVertexColors &vertexColors) |
|
void | enteringGeneralTriangleMesh (const mesh_msgs::MeshGeometry &mesh) |
|
void | enteringNormals (const mesh_msgs::MeshGeometry &mesh) |
|
void | enteringTexturedTriangleMesh (const mesh_msgs::MeshGeometry &mesh, const mesh_msgs::MeshMaterials &meshMaterials) |
|
void | enteringTriangleMeshWithVertexCosts (const mesh_msgs::MeshGeometry &mesh, const mesh_msgs::MeshVertexCosts &vertexCosts, int costColorType) |
|
void | enteringTriangleMeshWithVertexCosts (const mesh_msgs::MeshGeometry &mesh, const mesh_msgs::MeshVertexCosts &vertexCosts, int costColorType, float minCost, float maxCost) |
|
Ogre::PixelFormat | getOgrePixelFormatFromRosString (std::string encoding) |
|
void | loadImageIntoTextureMaterial (size_t textureIndex) |
|
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) |
| Enables the wireframe. More...
|
|
Class to display mesh data in the main panel of rviz.
Definition at line 94 of file textured_mesh_visual.h.
◆ TexturedMeshVisual()
rviz_mesh_plugin::TexturedMeshVisual::TexturedMeshVisual |
( |
rviz::DisplayContext * |
context, |
|
|
size_t |
displayID, |
|
|
size_t |
meshID, |
|
|
size_t |
randomID |
|
) |
| |
Constructor.
- Parameters
-
context | The context that contains the display information. |
displayID | The display id |
meshID | The mesh id |
randomID | random number that will be used as part of the meshes UID |
Definition at line 44 of file textured_mesh_visual.cpp.
◆ ~TexturedMeshVisual()
rviz_mesh_plugin::TexturedMeshVisual::~TexturedMeshVisual |
( |
| ) |
|
|
virtual |
◆ addTexture()
bool rviz_mesh_plugin::TexturedMeshVisual::addTexture |
( |
const mesh_msgs::MeshTexture::ConstPtr & |
textureMsg | ) |
|
Extracts data from the ros-messages and adds textures to the textured mesh.
- Parameters
-
textureMsg | Message containing the texture information |
Definition at line 1088 of file textured_mesh_visual.cpp.
◆ calculateColorFromCost()
Ogre::ColourValue rviz_mesh_plugin::TexturedMeshVisual::calculateColorFromCost |
( |
float |
cost, |
|
|
int |
costColorType |
|
) |
| |
|
private |
Calculates a color for a given cost value using a spectrum from red to green.
- Parameters
-
cost | The cost value (should be within the range 0 - 1) |
- Returns
- calculated color
Definition at line 1167 of file textured_mesh_visual.cpp.
◆ enteringColoredTriangleMesh()
void rviz_mesh_plugin::TexturedMeshVisual::enteringColoredTriangleMesh |
( |
const mesh_msgs::MeshGeometry & |
mesh, |
|
|
const mesh_msgs::MeshVertexColors & |
vertexColors |
|
) |
| |
|
private |
◆ enteringGeneralTriangleMesh()
void rviz_mesh_plugin::TexturedMeshVisual::enteringGeneralTriangleMesh |
( |
const mesh_msgs::MeshGeometry & |
mesh | ) |
|
|
private |
◆ enteringNormals()
void rviz_mesh_plugin::TexturedMeshVisual::enteringNormals |
( |
const mesh_msgs::MeshGeometry & |
mesh | ) |
|
|
private |
◆ enteringTexturedTriangleMesh()
void rviz_mesh_plugin::TexturedMeshVisual::enteringTexturedTriangleMesh |
( |
const mesh_msgs::MeshGeometry & |
mesh, |
|
|
const mesh_msgs::MeshMaterials & |
meshMaterials |
|
) |
| |
|
private |
◆ enteringTriangleMeshWithVertexCosts() [1/2]
void rviz_mesh_plugin::TexturedMeshVisual::enteringTriangleMeshWithVertexCosts |
( |
const mesh_msgs::MeshGeometry & |
mesh, |
|
|
const mesh_msgs::MeshVertexCosts & |
vertexCosts, |
|
|
int |
costColorType |
|
) |
| |
|
private |
◆ enteringTriangleMeshWithVertexCosts() [2/2]
void rviz_mesh_plugin::TexturedMeshVisual::enteringTriangleMeshWithVertexCosts |
( |
const mesh_msgs::MeshGeometry & |
mesh, |
|
|
const mesh_msgs::MeshVertexCosts & |
vertexCosts, |
|
|
int |
costColorType, |
|
|
float |
minCost, |
|
|
float |
maxCost |
|
) |
| |
|
private |
◆ getOgrePixelFormatFromRosString()
Ogre::PixelFormat rviz_mesh_plugin::TexturedMeshVisual::getOgrePixelFormatFromRosString |
( |
std::string |
encoding | ) |
|
|
private |
◆ loadImageIntoTextureMaterial()
void rviz_mesh_plugin::TexturedMeshVisual::loadImageIntoTextureMaterial |
( |
size_t |
textureIndex | ) |
|
|
private |
◆ reset()
void rviz_mesh_plugin::TexturedMeshVisual::reset |
( |
| ) |
|
◆ setFrameOrientation()
void rviz_mesh_plugin::TexturedMeshVisual::setFrameOrientation |
( |
const Ogre::Quaternion & |
orientation | ) |
|
Sets the orientation of the coordinate frame the message refers to.
- Parameters
-
orientation | The orientation of the coordinate frame |
Definition at line 1197 of file textured_mesh_visual.cpp.
◆ setFramePosition()
void rviz_mesh_plugin::TexturedMeshVisual::setFramePosition |
( |
const Ogre::Vector3 & |
position | ) |
|
Sets the pose of the coordinate frame the message refers to.
- Parameters
-
position | The pose of the coordinate frame |
Definition at line 1192 of file textured_mesh_visual.cpp.
◆ setGeometry()
bool rviz_mesh_plugin::TexturedMeshVisual::setGeometry |
( |
const mesh_msgs::MeshGeometryStamped::ConstPtr & |
meshMsg | ) |
|
Extracts data from the ros-messages and creates meshes.
- Parameters
-
meshMsg | Message containing the mesh |
Definition at line 869 of file textured_mesh_visual.cpp.
◆ setMaterials()
bool rviz_mesh_plugin::TexturedMeshVisual::setMaterials |
( |
const mesh_msgs::MeshMaterialsStamped::ConstPtr & |
materialMsg | ) |
|
Extracts data from the ros-messages and creates a textured mesh.
- Parameters
-
materialMsg | Message containing the material information |
Definition at line 1039 of file textured_mesh_visual.cpp.
◆ setVertexColors()
bool rviz_mesh_plugin::TexturedMeshVisual::setVertexColors |
( |
const mesh_msgs::MeshVertexColorsStamped::ConstPtr & |
vertexColorsMsg | ) |
|
Extracts data from the ros-messages and creates a colored mesh.
- Parameters
-
vertexColorsMsg | Message containing the vertex color information |
Definition at line 935 of file textured_mesh_visual.cpp.
◆ setVertexCosts() [1/2]
bool rviz_mesh_plugin::TexturedMeshVisual::setVertexCosts |
( |
const mesh_msgs::MeshVertexCostsStamped::ConstPtr & |
vertexCostsMsg, |
|
|
int |
costColorType |
|
) |
| |
Extracts data from the ros-messages and creates a colored mesh with colors calculated from vertex costs.
- Parameters
-
vertexCostsMsg | Message containing the vertex cost information |
Definition at line 971 of file textured_mesh_visual.cpp.
◆ setVertexCosts() [2/2]
bool rviz_mesh_plugin::TexturedMeshVisual::setVertexCosts |
( |
const mesh_msgs::MeshVertexCostsStamped::ConstPtr & |
vertexCostsMsg, |
|
|
int |
costColorType, |
|
|
float |
minCost, |
|
|
float |
maxCost |
|
) |
| |
◆ showFaces()
void rviz_mesh_plugin::TexturedMeshVisual::showFaces |
( |
Ogre::Pass * |
pass, |
|
|
Ogre::ColourValue |
facesColor, |
|
|
float |
facesAlpha, |
|
|
bool |
useVertexColors |
|
) |
| |
|
private |
◆ showNormals()
void rviz_mesh_plugin::TexturedMeshVisual::showNormals |
( |
Ogre::Pass * |
pass, |
|
|
Ogre::ColourValue |
normalsColor, |
|
|
float |
normalsAlpha |
|
) |
| |
|
private |
◆ showTextures()
void rviz_mesh_plugin::TexturedMeshVisual::showTextures |
( |
Ogre::Pass * |
pass | ) |
|
|
private |
◆ showWireframe()
void rviz_mesh_plugin::TexturedMeshVisual::showWireframe |
( |
Ogre::Pass * |
pass, |
|
|
Ogre::ColourValue |
wireframeColor, |
|
|
float |
wireframeAlpha |
|
) |
| |
|
private |
Enables the wireframe.
- Parameters
-
pass | Ogre Pass |
wireframeColor | The color of the wireframe |
wireframeAlpha | Transparency of the wireframe |
Definition at line 218 of file textured_mesh_visual.cpp.
◆ updateMaterial()
void rviz_mesh_plugin::TexturedMeshVisual::updateMaterial |
( |
bool |
showWireframe, |
|
|
Ogre::ColourValue |
wireframeColor, |
|
|
float |
wireframeAlpha, |
|
|
bool |
showFaces, |
|
|
Ogre::ColourValue |
facesColor, |
|
|
float |
facesAlpha, |
|
|
bool |
useVertexColors, |
|
|
bool |
showVertexCosts, |
|
|
bool |
showTextures, |
|
|
bool |
showTexturedFacesOnly, |
|
|
bool |
showNormals, |
|
|
Ogre::ColourValue |
normalsColor, |
|
|
float |
normalsAlpha, |
|
|
float |
normalsScallingFactor |
|
) |
| |
Updates the visible parts of the mesh depending on input from the rviz display.
- Parameters
-
showWireframe | When TRUE wireframe is visible |
wireframeColor | The color of the wireframe |
wireframeAlpha | The transparency of the wireframe |
showFaces | When TRUE faces are visible |
facesColor | The color of the faces |
facesAlpha | The transparency of the faces |
useVertexColors | When TRUE vertex colors are used |
showVertexCosts | When TRUE vertex costs are visible |
showTextures | When TRUE textures are visible |
showNormals | When TRUE normals are visible |
normalsColor | The color of the normals |
normalsAlpha | The transparency of the normals |
normalsScallingFactor | The size of the normals |
Definition at line 308 of file textured_mesh_visual.cpp.
◆ updateNormals()
void rviz_mesh_plugin::TexturedMeshVisual::updateNormals |
( |
float |
scallingFactor | ) |
|
Updates the size of the normals dynamically.
- Parameters
-
scallingFactor | The factor the normals have to be scaled with |
Definition at line 384 of file textured_mesh_visual.cpp.
◆ m_displayContext
◆ m_images
std::vector<Ogre::Image> rviz_mesh_plugin::TexturedMeshVisual::m_images |
|
private |
◆ m_materials_enabled
bool rviz_mesh_plugin::TexturedMeshVisual::m_materials_enabled |
|
private |
◆ m_materialsUuid
std::string rviz_mesh_plugin::TexturedMeshVisual::m_materialsUuid |
|
private |
◆ m_mesh
Ogre::ManualObject* rviz_mesh_plugin::TexturedMeshVisual::m_mesh |
|
private |
◆ m_meshGeneralMaterial
Ogre::MaterialPtr rviz_mesh_plugin::TexturedMeshVisual::m_meshGeneralMaterial |
|
private |
◆ m_meshMsg
mesh_msgs::MeshGeometry rviz_mesh_plugin::TexturedMeshVisual::m_meshMsg |
|
private |
◆ m_meshTexturedTrianglesMaterial
Ogre::MaterialPtr rviz_mesh_plugin::TexturedMeshVisual::m_meshTexturedTrianglesMaterial |
|
private |
◆ m_meshUuid
std::string rviz_mesh_plugin::TexturedMeshVisual::m_meshUuid |
|
private |
◆ m_normalMaterial
Ogre::MaterialPtr rviz_mesh_plugin::TexturedMeshVisual::m_normalMaterial |
|
private |
◆ m_normals
Ogre::ManualObject* rviz_mesh_plugin::TexturedMeshVisual::m_normals |
|
private |
◆ m_normalsScalingFactor
float rviz_mesh_plugin::TexturedMeshVisual::m_normalsScalingFactor |
|
private |
◆ m_noTexCluMaterial
Ogre::MaterialPtr rviz_mesh_plugin::TexturedMeshVisual::m_noTexCluMaterial |
|
private |
◆ m_noTexCluMesh
Ogre::ManualObject* rviz_mesh_plugin::TexturedMeshVisual::m_noTexCluMesh |
|
private |
The manual object to display the not textured parts of the textured mesh.
Definition at line 276 of file textured_mesh_visual.h.
◆ m_postfix
size_t rviz_mesh_plugin::TexturedMeshVisual::m_postfix |
|
private |
◆ m_prefix
size_t rviz_mesh_plugin::TexturedMeshVisual::m_prefix |
|
private |
◆ m_random
size_t rviz_mesh_plugin::TexturedMeshVisual::m_random |
|
private |
◆ m_sceneNode
Ogre::SceneNode* rviz_mesh_plugin::TexturedMeshVisual::m_sceneNode |
|
private |
◆ m_texture_coords_enabled
bool rviz_mesh_plugin::TexturedMeshVisual::m_texture_coords_enabled |
|
private |
◆ m_texturedMesh
Ogre::ManualObject* rviz_mesh_plugin::TexturedMeshVisual::m_texturedMesh |
|
private |
◆ m_texturedMeshMaterial
Ogre::MaterialPtr rviz_mesh_plugin::TexturedMeshVisual::m_texturedMeshMaterial |
|
private |
◆ m_textureMaterials
std::vector<Ogre::MaterialPtr> rviz_mesh_plugin::TexturedMeshVisual::m_textureMaterials |
|
private |
◆ m_textures_enabled
bool rviz_mesh_plugin::TexturedMeshVisual::m_textures_enabled |
|
private |
◆ m_vertex_colors_enabled
bool rviz_mesh_plugin::TexturedMeshVisual::m_vertex_colors_enabled |
|
private |
◆ m_vertex_costs_enabled
bool rviz_mesh_plugin::TexturedMeshVisual::m_vertex_costs_enabled |
|
private |
◆ m_vertex_normals_enabled
bool rviz_mesh_plugin::TexturedMeshVisual::m_vertex_normals_enabled |
|
private |
◆ m_vertexColorsUuid
std::string rviz_mesh_plugin::TexturedMeshVisual::m_vertexColorsUuid |
|
private |
◆ m_vertexCostMaterial
Ogre::MaterialPtr rviz_mesh_plugin::TexturedMeshVisual::m_vertexCostMaterial |
|
private |
◆ m_vertexCostsMesh
Ogre::ManualObject* rviz_mesh_plugin::TexturedMeshVisual::m_vertexCostsMesh |
|
private |
◆ m_vertexCostsUuid
std::string rviz_mesh_plugin::TexturedMeshVisual::m_vertexCostsUuid |
|
private |
The documentation for this class was generated from the following files: