Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
rviz::SelectionHandler Class Reference

#include <selection_handler.h>

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

Classes

class  Listener
 

Public Member Functions

void addTrackedObject (Ogre::MovableObject *object)
 
void addTrackedObjects (Ogre::SceneNode *node)
 
virtual void createProperties (const Picked &, Property *)
 Override to create properties of the given picked object(s). More...
 
virtual void destroyProperties (const Picked &obj, Property *parent_property)
 Destroy all properties for the given picked object(s). More...
 
virtual void getAABBs (const Picked &obj, V_AABB &aabbs)
 
CollObjectHandle getHandle () const
 
virtual InteractiveObjectWPtr getInteractiveObject ()
 Get the object to listen to mouse events and other interaction calls during use of the 'interact' tool. More...
 
virtual bool needsAdditionalRenderPass (uint32_t)
 
virtual void onDeselect (const Picked &obj)
 
virtual void onSelect (const Picked &obj)
 
virtual void postRenderPass (uint32_t pass)
 
virtual void preRenderPass (uint32_t pass)
 
void removeTrackedObject (Ogre::MovableObject *object)
 
 SelectionHandler (DisplayContext *context)
 
virtual void setInteractiveObject (InteractiveObjectWPtr object)
 Set an object to listen to mouse events and other interaction calls during use of the 'interact' tool. More...
 
virtual void updateProperties ()
 Override to update property values. More...
 
virtual void updateTrackedBoxes ()
 
virtual ~SelectionHandler ()
 

Protected Types

typedef boost::shared_ptr< ListenerListenerPtr
 
typedef std::map< std::pair< CollObjectHandle, uint64_t >, std::pair< Ogre::SceneNode *, Ogre::WireBoundingBox * > > M_HandleToBox
 
typedef std::set< Ogre::MovableObject * > S_Movable
 

Protected Member Functions

void createBox (const std::pair< CollObjectHandle, uint64_t > &handles, const Ogre::AxisAlignedBox &aabb, const std::string &material_name)
 Create or update a box for the given handle-int pair, with the box specified by aabb. More...
 
void destroyBox (const std::pair< CollObjectHandle, uint64_t > &handles)
 Destroy the box associated with the given handle-int pair, if there is one. More...
 

Protected Attributes

M_HandleToBox boxes_
 
DisplayContextcontext_
 
InteractiveObjectWPtr interactive_object_
 
ListenerPtr listener_
 
QList< Property * > properties_
 
S_Movable tracked_objects_
 

Private Attributes

CollObjectHandle pick_handle_
 

Friends

class SelectionManager
 

Detailed Description

Definition at line 64 of file selection_handler.h.

Member Typedef Documentation

◆ ListenerPtr

Definition at line 179 of file selection_handler.h.

◆ M_HandleToBox

typedef std::map<std::pair<CollObjectHandle, uint64_t>, std::pair<Ogre::SceneNode*, Ogre::WireBoundingBox*> > rviz::SelectionHandler::M_HandleToBox
protected

Definition at line 153 of file selection_handler.h.

◆ S_Movable

typedef std::set<Ogre::MovableObject*> rviz::SelectionHandler::S_Movable
protected

Definition at line 158 of file selection_handler.h.

Constructor & Destructor Documentation

◆ SelectionHandler()

rviz::SelectionHandler::SelectionHandler ( DisplayContext context)

Definition at line 48 of file selection_handler.cpp.

◆ ~SelectionHandler()

rviz::SelectionHandler::~SelectionHandler ( )
virtual

Definition at line 55 of file selection_handler.cpp.

Member Function Documentation

◆ addTrackedObject()

void rviz::SelectionHandler::addTrackedObject ( Ogre::MovableObject *  object)

Definition at line 117 of file selection_handler.cpp.

◆ addTrackedObjects()

void rviz::SelectionHandler::addTrackedObjects ( Ogre::SceneNode *  node)

Definition at line 95 of file selection_handler.cpp.

◆ createBox()

void rviz::SelectionHandler::createBox ( const std::pair< CollObjectHandle, uint64_t > &  handles,
const Ogre::AxisAlignedBox &  aabb,
const std::string &  material_name 
)
protected

Create or update a box for the given handle-int pair, with the box specified by aabb.

Definition at line 178 of file selection_handler.cpp.

◆ createProperties()

virtual void rviz::SelectionHandler::createProperties ( const Picked ,
Property  
)
inlinevirtual

Override to create properties of the given picked object(s).

Top-level properties created here should be added to properties_ so they will be automatically deleted by deleteProperties().

This base implementation does nothing.

Reimplemented in rviz::PointCloudSelectionHandler, rviz::RobotLinkSelectionHandler, rviz::PoseWithCovarianceDisplaySelectionHandler, rviz::FrameSelectionHandler, rviz::PoseDisplaySelectionHandler, and rviz::MarkerSelectionHandler.

Definition at line 83 of file selection_handler.h.

◆ destroyBox()

void rviz::SelectionHandler::destroyBox ( const std::pair< CollObjectHandle, uint64_t > &  handles)
protected

Destroy the box associated with the given handle-int pair, if there is one.

Definition at line 209 of file selection_handler.cpp.

◆ destroyProperties()

void rviz::SelectionHandler::destroyProperties ( const Picked obj,
Property parent_property 
)
virtual

Destroy all properties for the given picked object(s).

This base implementation destroys all the properties in properties_.

If createProperties() adds all the top-level properties to properties_, there is no need to override this in a subclass.

Reimplemented in rviz::PointCloudSelectionHandler, and rviz::FrameSelectionHandler.

Definition at line 169 of file selection_handler.cpp.

◆ getAABBs()

void rviz::SelectionHandler::getAABBs ( const Picked obj,
V_AABB aabbs 
)
virtual

◆ getHandle()

CollObjectHandle rviz::SelectionHandler::getHandle ( ) const
inline

Definition at line 135 of file selection_handler.h.

◆ getInteractiveObject()

InteractiveObjectWPtr rviz::SelectionHandler::getInteractiveObject ( )
virtual

Get the object to listen to mouse events and other interaction calls during use of the 'interact' tool.

Returns a boost::weak_ptr to the object, which may or may not point to something. Do not lock() the result and hold it for long periods because it may cause something visual to stick around after it was meant to be destroyed.

Definition at line 259 of file selection_handler.cpp.

◆ needsAdditionalRenderPass()

virtual bool rviz::SelectionHandler::needsAdditionalRenderPass ( uint32_t  )
inlinevirtual

Reimplemented in rviz::PointCloudSelectionHandler.

Definition at line 109 of file selection_handler.h.

◆ onDeselect()

void rviz::SelectionHandler::onDeselect ( const Picked obj)
virtual

Reimplemented in rviz::PointCloudSelectionHandler.

Definition at line 247 of file selection_handler.cpp.

◆ onSelect()

void rviz::SelectionHandler::onSelect ( const Picked obj)
virtual

Reimplemented in rviz::PointCloudSelectionHandler.

Definition at line 226 of file selection_handler.cpp.

◆ postRenderPass()

void rviz::SelectionHandler::postRenderPass ( uint32_t  pass)
virtual

◆ preRenderPass()

void rviz::SelectionHandler::preRenderPass ( uint32_t  pass)
virtual

◆ removeTrackedObject()

void rviz::SelectionHandler::removeTrackedObject ( Ogre::MovableObject *  object)

Definition at line 125 of file selection_handler.cpp.

◆ setInteractiveObject()

void rviz::SelectionHandler::setInteractiveObject ( InteractiveObjectWPtr  object)
virtual

Set an object to listen to mouse events and other interaction calls during use of the 'interact' tool.

Definition at line 254 of file selection_handler.cpp.

◆ updateProperties()

virtual void rviz::SelectionHandler::updateProperties ( )
inlinevirtual

Override to update property values.

updateProperties() is called on a timer to give selection handlers a chance to update displayed property values. Subclasses with properties that can change should implement this to update the property values based on new information from the selected object(s).

This base implementation does nothing.

Reimplemented in rviz::RobotLinkSelectionHandler, and rviz::MarkerSelectionHandler.

Definition at line 105 of file selection_handler.h.

◆ updateTrackedBoxes()

void rviz::SelectionHandler::updateTrackedBoxes ( )
virtual

Definition at line 133 of file selection_handler.cpp.

Friends And Related Function Documentation

◆ SelectionManager

friend class SelectionManager
friend

Definition at line 190 of file selection_handler.h.

Member Data Documentation

◆ boxes_

M_HandleToBox rviz::SelectionHandler::boxes_
protected

Definition at line 154 of file selection_handler.h.

◆ context_

DisplayContext* rviz::SelectionHandler::context_
protected

Definition at line 156 of file selection_handler.h.

◆ interactive_object_

InteractiveObjectWPtr rviz::SelectionHandler::interactive_object_
protected

Definition at line 182 of file selection_handler.h.

◆ listener_

ListenerPtr rviz::SelectionHandler::listener_
protected

Definition at line 180 of file selection_handler.h.

◆ pick_handle_

CollObjectHandle rviz::SelectionHandler::pick_handle_
private

Definition at line 188 of file selection_handler.h.

◆ properties_

QList<Property*> rviz::SelectionHandler::properties_
protected

Definition at line 149 of file selection_handler.h.

◆ tracked_objects_

S_Movable rviz::SelectionHandler::tracked_objects_
protected

Definition at line 159 of file selection_handler.h.


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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Mon Aug 15 2022 02:05:18