30 #ifndef RVIZ_SELECTION_HANDLER_H 31 #define RVIZ_SELECTION_HANDLER_H 37 #include <boost/shared_ptr.hpp> 38 #include <boost/unordered_map.hpp> 40 #include <OgreMovableObject.h> 50 class WireBoundingBox;
62 typedef std::vector<Ogre::AxisAlignedBox>
V_AABB;
70 void addTrackedObjects( Ogre::SceneNode* node );
71 void addTrackedObject(Ogre::MovableObject*
object);
72 void removeTrackedObject(Ogre::MovableObject*
object);
74 virtual void updateTrackedBoxes();
92 virtual void destroyProperties(
const Picked& obj,
Property* parent_property );
110 virtual void preRenderPass(uint32_t pass);
111 virtual void postRenderPass(uint32_t pass);
113 virtual void getAABBs(
const Picked& obj, V_AABB& aabbs);
115 virtual void onSelect(
const Picked& obj);
116 virtual void onDeselect(
const Picked& obj);
135 void createBox(
const std::pair<CollObjectHandle, uint64_t>& handles,
const Ogre::AxisAlignedBox& aabb,
const std::string& material_name);
138 void destroyBox(
const std::pair<CollObjectHandle, uint64_t>& handles);
142 typedef std::map<std::pair<CollObjectHandle, uint64_t>, std::pair<Ogre::SceneNode*, Ogre::WireBoundingBox*> >
M_HandleToBox;
150 class Listener :
public Ogre::MovableObject::Listener
158 handler_->updateTrackedBoxes();
163 handler_->removeTrackedObject(
object);
boost::shared_ptr< Listener > ListenerPtr
std::set< SelectionHandlerPtr > S_SelectionHandler
virtual bool needsAdditionalRenderPass(uint32_t pass)
SelectionHandler * handler_
CollObjectHandle getHandle() const
virtual void updateProperties()
Override to update property values.
std::vector< SelectionHandlerPtr > V_SelectionHandler
A single element of a property tree, with a name, value, description, and possibly children...
S_Movable tracked_objects_
std::set< Ogre::MovableObject * > S_Movable
virtual void objectMoved(Ogre::MovableObject *object)
Pure-virtual base class for objects which give Display subclasses context in which to work...
std::vector< Ogre::AxisAlignedBox > V_AABB
Listener(SelectionHandler *handler)
DisplayContext * context_
InteractiveObjectWPtr interactive_object_
boost::weak_ptr< InteractiveObject > InteractiveObjectWPtr
std::map< std::pair< CollObjectHandle, uint64_t >, std::pair< Ogre::SceneNode *, Ogre::WireBoundingBox * > > M_HandleToBox
CollObjectHandle pick_handle_
QList< Property * > properties_
virtual void createProperties(const Picked &obj, Property *parent_property)
Override to create properties of the given picked object(s).
virtual void objectDestroyed(Ogre::MovableObject *object)
boost::shared_ptr< SelectionHandler > SelectionHandlerPtr
uint32_t CollObjectHandle