Public Member Functions | Private Member Functions | Private Attributes | List of all members
rviz_map_plugin::ClusterLabelVisual Class Reference

Visual to show a labeled cluster. More...

#include <ClusterLabelVisual.hpp>

Public Member Functions

 ClusterLabelVisual (const ClusterLabelVisual &)=delete
 Disabling the copy constructor. More...
 
 ClusterLabelVisual (rviz::DisplayContext *context, std::string labelId)
 Constructor. More...
 
 ClusterLabelVisual (rviz::DisplayContext *context, std::string labelId, std::shared_ptr< Geometry > geometry)
 Constructor. More...
 
std::vector< uint32_t > getFaces ()
 Returns the faces. More...
 
ClusterLabelVisualoperator= (const ClusterLabelVisual &)=delete
 Disabling the copy assignment operator. More...
 
void reset ()
 Deletes the material. More...
 
void setColor (Ogre::ColourValue facesColor, float alpha=1.0f)
 Sets the color. More...
 
void setFacesInCluster (const std::vector< uint32_t > &faces)
 Sets the faces, that are in the shown cluster. More...
 
void setGeometry (std::shared_ptr< Geometry > geometry)
 Sets the geometry. More...
 
 ~ClusterLabelVisual ()
 Destructor. More...
 

Private Member Functions

void initMaterial ()
 

Private Attributes

Ogre::ColourValue m_color
 
rviz::DisplayContextm_displayContext
 
std::vector< uint32_t > m_faces
 
std::shared_ptr< Geometrym_geometry
 
std::string m_labelId
 
Ogre::MaterialPtr m_material
 
Ogre::MeshPtr m_mesh
 
Ogre::SceneNode * m_sceneNode
 
Ogre::SubMesh * m_subMesh
 

Detailed Description

Visual to show a labeled cluster.

Definition at line 80 of file ClusterLabelVisual.hpp.

Constructor & Destructor Documentation

◆ ClusterLabelVisual() [1/3]

rviz_map_plugin::ClusterLabelVisual::ClusterLabelVisual ( rviz::DisplayContext context,
std::string  labelId 
)

Constructor.

Parameters
contextThe context that contains the display information.
labelIdThe label id (that has to be unique)

Definition at line 62 of file ClusterLabelVisual.cpp.

◆ ClusterLabelVisual() [2/3]

rviz_map_plugin::ClusterLabelVisual::ClusterLabelVisual ( rviz::DisplayContext context,
std::string  labelId,
std::shared_ptr< Geometry geometry 
)

Constructor.

Parameters
contextThe context that contains the display information.
labelIdThe label id (that has to be unique)
geometryA shared pointer to the geometry to which the labels belong

Definition at line 67 of file ClusterLabelVisual.cpp.

◆ ~ClusterLabelVisual()

rviz_map_plugin::ClusterLabelVisual::~ClusterLabelVisual ( )

Destructor.

Definition at line 160 of file ClusterLabelVisual.cpp.

◆ ClusterLabelVisual() [3/3]

rviz_map_plugin::ClusterLabelVisual::ClusterLabelVisual ( const ClusterLabelVisual )
delete

Disabling the copy constructor.

Each cluster label visual has a pointer to a SubMesh with a unique name, when copying and then deleting one of the copies, the SubMesh would be deleted, thus the pointers of the remaining copies would be invalid

Member Function Documentation

◆ getFaces()

std::vector<uint32_t> rviz_map_plugin::ClusterLabelVisual::getFaces ( )
inline

Returns the faces.

Returns
A vector containing the face ids

Definition at line 153 of file ClusterLabelVisual.hpp.

◆ initMaterial()

void rviz_map_plugin::ClusterLabelVisual::initMaterial ( )
private

Definition at line 267 of file ClusterLabelVisual.cpp.

◆ operator=()

ClusterLabelVisual& rviz_map_plugin::ClusterLabelVisual::operator= ( const ClusterLabelVisual )
delete

Disabling the copy assignment operator.

explanation: see deleted copy constructor ClusterLabelVisual(const ClusterLabelVisual&)

◆ reset()

void rviz_map_plugin::ClusterLabelVisual::reset ( )

Deletes the material.

Definition at line 185 of file ClusterLabelVisual.cpp.

◆ setColor()

void rviz_map_plugin::ClusterLabelVisual::setColor ( Ogre::ColourValue  facesColor,
float  alpha = 1.0f 
)

Sets the color.

Parameters
facesColorThe color for the faces
alphaThe opacity, defaults to 1.0f (fully opaque)

Definition at line 256 of file ClusterLabelVisual.cpp.

◆ setFacesInCluster()

void rviz_map_plugin::ClusterLabelVisual::setFacesInCluster ( const std::vector< uint32_t > &  faces)

Sets the faces, that are in the shown cluster.

Parameters
facesA vector containing the face ids

Definition at line 198 of file ClusterLabelVisual.cpp.

◆ setGeometry()

void rviz_map_plugin::ClusterLabelVisual::setGeometry ( std::shared_ptr< Geometry geometry)

Sets the geometry.

Parameters
geometryThe geometry

Definition at line 194 of file ClusterLabelVisual.cpp.

Member Data Documentation

◆ m_color

Ogre::ColourValue rviz_map_plugin::ClusterLabelVisual::m_color
private

Definition at line 169 of file ClusterLabelVisual.hpp.

◆ m_displayContext

rviz::DisplayContext* rviz_map_plugin::ClusterLabelVisual::m_displayContext
private

Definition at line 161 of file ClusterLabelVisual.hpp.

◆ m_faces

std::vector<uint32_t> rviz_map_plugin::ClusterLabelVisual::m_faces
private

Definition at line 172 of file ClusterLabelVisual.hpp.

◆ m_geometry

std::shared_ptr<Geometry> rviz_map_plugin::ClusterLabelVisual::m_geometry
private

Definition at line 171 of file ClusterLabelVisual.hpp.

◆ m_labelId

std::string rviz_map_plugin::ClusterLabelVisual::m_labelId
private

Definition at line 163 of file ClusterLabelVisual.hpp.

◆ m_material

Ogre::MaterialPtr rviz_map_plugin::ClusterLabelVisual::m_material
private

Definition at line 167 of file ClusterLabelVisual.hpp.

◆ m_mesh

Ogre::MeshPtr rviz_map_plugin::ClusterLabelVisual::m_mesh
private

Definition at line 165 of file ClusterLabelVisual.hpp.

◆ m_sceneNode

Ogre::SceneNode* rviz_map_plugin::ClusterLabelVisual::m_sceneNode
private

Definition at line 162 of file ClusterLabelVisual.hpp.

◆ m_subMesh

Ogre::SubMesh* rviz_map_plugin::ClusterLabelVisual::m_subMesh
private

Definition at line 166 of file ClusterLabelVisual.hpp.


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


rviz_map_plugin
Author(s): Sebastian Pütz , Kristin Schmidt , Jan Philipp Vogtherr , Malte kleine Piening
autogenerated on Sun Jan 21 2024 04:06:25