$search

rviz::SelectionManager Class Reference

#include <selection_manager.h>

List of all members.

Classes

struct  Highlight

Public Types

enum  SelectType { Add, Remove, Replace }

Public Member Functions

void addObject (CollObjectHandle obj, const SelectionHandlerPtr &handler)
Ogre::Technique * addPickTechnique (CollObjectHandle handle, const Ogre::MaterialPtr &material)
void addSelection (const M_Picked &objs)
void clearHandlers ()
CollObjectHandle createCollisionForEntity (Ogre::Entity *entity, const SelectionHandlerPtr &handler, CollObjectHandle coll=0)
CollObjectHandle createCollisionForObject (ogre_tools::Object *obj, const SelectionHandlerPtr &handler, CollObjectHandle coll=0)
CollObjectHandle createHandle ()
void enableInteraction (bool enable)
void focusOnSelection ()
bool get3DPoint (Ogre::Viewport *viewport, int x, int y, Ogre::Vector3 &result_point)
SelectionHandlerPtr getHandler (CollObjectHandle obj)
bool getInteractionEnabled ()
const M_PickedgetSelection ()
SelectionAddedSignalgetSelectionAddedSignal ()
SelectionRemovedSignalgetSelectionRemovedSignal ()
SelectionSetSignalgetSelectionSetSignal ()
SelectionSettingSignalgetSelectionSettingSignal ()
virtual Ogre::Technique * handleSchemeNotFound (unsigned short scheme_index, const Ogre::String &scheme_name, Ogre::Material *original_material, unsigned short lod_index, const Ogre::Renderable *rend)
void highlight (Ogre::Viewport *viewport, int x1, int y1, int x2, int y2)
void initialize (bool debug=false)
void pick (Ogre::Viewport *viewport, int x1, int y1, int x2, int y2, M_Picked &results, bool single_render_pass=false)
void removeHighlight ()
void removeObject (CollObjectHandle obj)
void removeSelection (const M_Picked &objs)
void renderQueueStarted (uint8_t queueGroupId, const std::string &invocation, bool &skipThisInvocation)
void select (Ogre::Viewport *viewport, int x1, int y1, int x2, int y2, SelectType type)
 SelectionManager (VisualizationManager *manager)
void setSelection (const M_Picked &objs)
void setTextureSize (unsigned size)
void update ()
 ~SelectionManager ()

Protected Types

typedef boost::unordered_map
< CollObjectHandle,
SelectionHandlerPtr
M_CollisionObjectToSelectionHandler

Protected Member Functions

std::pair< Picked, bool > addSelection (const Picked &obj)
void initDepthFinder ()
void removeSelection (const Picked &obj)
bool render (Ogre::Viewport *viewport, Ogre::TexturePtr tex, int x1, int y1, int x2, int y2, Ogre::PixelBox &dst_box, std::string material_scheme, unsigned texture_size)
void renderAndUnpack (Ogre::Viewport *viewport, uint32_t pass, int x1, int y1, int x2, int y2, V_Pixel &pixels)
void setDebugVisibility (bool visible)
void setHighlightRect (Ogre::Viewport *viewport, int x1, int y1, int x2, int y2)
void unpackColors (const Ogre::PixelBox &box, V_Pixel &pixels)

Protected Attributes

Ogre::Camera * camera_
Ogre::MaterialPtr debug_depth_material_
Ogre::SceneNode * debug_depth_node_
Ogre::MaterialPtr debug_material_ [s_num_render_textures_]
bool debug_mode_
Ogre::SceneNode * debug_nodes_ [s_num_render_textures_]
Ogre::PixelBox depth_pixel_box_
Ogre::TexturePtr depth_render_texture_
uint32_t depth_texture_size_
Ogre::MaterialPtr fallback_pick_material_
Ogre::Technique * fallback_pick_technique_
boost::recursive_mutex global_mutex_
Highlight highlight_
bool highlight_enabled_
Ogre::SceneNode * highlight_node_
Ogre::Rectangle2D * highlight_rectangle_
bool interaction_enabled_
M_CollisionObjectToSelectionHandler objects_
Ogre::PixelBox pixel_boxes_ [s_num_render_textures_]
V_Pixel pixel_buffer_
Ogre::TexturePtr render_textures_ [s_num_render_textures_]
M_Picked selection_
SelectionAddedSignal selection_added_
SelectionRemovedSignal selection_removed_
SelectionSetSignal selection_set_
SelectionSettingSignal selection_setting_
uint32_t texture_size_
uint32_t uid_counter_
VisualizationManagervis_manager_

Static Protected Attributes

static const uint32_t s_num_render_textures_ = 2

Detailed Description

Definition at line 75 of file selection_manager.h.


Member Typedef Documentation

Definition at line 178 of file selection_manager.h.


Member Enumeration Documentation

Enumerator:
Add 
Remove 
Replace 

Definition at line 78 of file selection_manager.h.


Constructor & Destructor Documentation

rviz::SelectionManager::SelectionManager ( VisualizationManager manager  ) 

Definition at line 33 of file selection_manager.cpp.

rviz::SelectionManager::~SelectionManager (  ) 

Definition at line 46 of file selection_manager.cpp.


Member Function Documentation

void rviz::SelectionManager::addObject ( CollObjectHandle  obj,
const SelectionHandlerPtr handler 
)

Definition at line 404 of file selection_manager.cpp.

Ogre::Technique * rviz::SelectionManager::addPickTechnique ( CollObjectHandle  handle,
const Ogre::MaterialPtr &  material 
)

Definition at line 902 of file selection_manager.cpp.

std::pair< Picked, bool > rviz::SelectionManager::addSelection ( const Picked obj  )  [protected]

Definition at line 1158 of file selection_manager.cpp.

void rviz::SelectionManager::addSelection ( const M_Picked objs  ) 

Definition at line 1125 of file selection_manager.cpp.

void rviz::SelectionManager::clearHandlers (  ) 

Definition at line 363 of file selection_manager.cpp.

CollObjectHandle rviz::SelectionManager::createCollisionForEntity ( Ogre::Entity *  entity,
const SelectionHandlerPtr handler,
CollObjectHandle  coll = 0 
)

Definition at line 1058 of file selection_manager.cpp.

CollObjectHandle rviz::SelectionManager::createCollisionForObject ( ogre_tools::Object obj,
const SelectionHandlerPtr handler,
CollObjectHandle  coll = 0 
)

Definition at line 999 of file selection_manager.cpp.

CollObjectHandle rviz::SelectionManager::createHandle (  ) 

Definition at line 382 of file selection_manager.cpp.

void rviz::SelectionManager::enableInteraction ( bool  enable  ) 

Definition at line 370 of file selection_manager.cpp.

void rviz::SelectionManager::focusOnSelection (  ) 

Definition at line 1221 of file selection_manager.cpp.

bool rviz::SelectionManager::get3DPoint ( Ogre::Viewport *  viewport,
int  x,
int  y,
Ogre::Vector3 &  result_point 
)

Return true if the point at x, y in the viewport is showing an object, false otherwise. If it is showing an object, result will be changed to contain the 3D point corresponding to it.

Definition at line 192 of file selection_manager.cpp.

SelectionHandlerPtr rviz::SelectionManager::getHandler ( CollObjectHandle  obj  ) 

Definition at line 1098 of file selection_manager.cpp.

bool rviz::SelectionManager::getInteractionEnabled (  )  [inline]

Definition at line 134 of file selection_manager.h.

const M_Picked& rviz::SelectionManager::getSelection (  )  [inline]

Definition at line 115 of file selection_manager.h.

SelectionAddedSignal& rviz::SelectionManager::getSelectionAddedSignal (  )  [inline]

Definition at line 228 of file selection_manager.h.

SelectionRemovedSignal& rviz::SelectionManager::getSelectionRemovedSignal (  )  [inline]

Definition at line 229 of file selection_manager.h.

SelectionSetSignal& rviz::SelectionManager::getSelectionSetSignal (  )  [inline]

Definition at line 226 of file selection_manager.h.

SelectionSettingSignal& rviz::SelectionManager::getSelectionSettingSignal (  )  [inline]

Definition at line 227 of file selection_manager.h.

Ogre::Technique * rviz::SelectionManager::handleSchemeNotFound ( unsigned short  scheme_index,
const Ogre::String &  scheme_name,
Ogre::Material *  original_material,
unsigned short  lod_index,
const Ogre::Renderable *  rend 
) [virtual]

Definition at line 893 of file selection_manager.cpp.

void rviz::SelectionManager::highlight ( Ogre::Viewport *  viewport,
int  x1,
int  y1,
int  x2,
int  y2 
)

Definition at line 461 of file selection_manager.cpp.

void rviz::SelectionManager::initDepthFinder (  )  [protected]

Definition at line 123 of file selection_manager.cpp.

void rviz::SelectionManager::initialize ( bool  debug = false  ) 

Definition at line 64 of file selection_manager.cpp.

void rviz::SelectionManager::pick ( Ogre::Viewport *  viewport,
int  x1,
int  y1,
int  x2,
int  y2,
M_Picked results,
bool  single_render_pass = false 
)

Definition at line 718 of file selection_manager.cpp.

void rviz::SelectionManager::removeHighlight (  ) 

Definition at line 474 of file selection_manager.cpp.

void rviz::SelectionManager::removeObject ( CollObjectHandle  obj  ) 

Definition at line 421 of file selection_manager.cpp.

void rviz::SelectionManager::removeSelection ( const Picked obj  )  [protected]

Definition at line 1197 of file selection_manager.cpp.

void rviz::SelectionManager::removeSelection ( const M_Picked objs  ) 

Definition at line 1111 of file selection_manager.cpp.

bool rviz::SelectionManager::render ( Ogre::Viewport *  viewport,
Ogre::TexturePtr  tex,
int  x1,
int  y1,
int  x2,
int  y2,
Ogre::PixelBox &  dst_box,
std::string  material_scheme,
unsigned  texture_size 
) [protected]

Internal render function to render to a texture and read the pixels back out.

Definition at line 566 of file selection_manager.cpp.

void rviz::SelectionManager::renderAndUnpack ( Ogre::Viewport *  viewport,
uint32_t  pass,
int  x1,
int  y1,
int  x2,
int  y2,
V_Pixel pixels 
) [protected]

Render to a texture for one of the picking passes and unpack the resulting pixels.

Definition at line 549 of file selection_manager.cpp.

void rviz::SelectionManager::renderQueueStarted ( uint8_t  queueGroupId,
const std::string &  invocation,
bool &  skipThisInvocation 
)

Definition at line 707 of file selection_manager.cpp.

void rviz::SelectionManager::select ( Ogre::Viewport *  viewport,
int  x1,
int  y1,
int  x2,
int  y2,
SelectType  type 
)

Definition at line 481 of file selection_manager.cpp.

void rviz::SelectionManager::setDebugVisibility ( bool  visible  )  [protected]

Definition at line 180 of file selection_manager.cpp.

void rviz::SelectionManager::setHighlightRect ( Ogre::Viewport *  viewport,
int  x1,
int  y1,
int  x2,
int  y2 
) [protected]

Definition at line 505 of file selection_manager.cpp.

void rviz::SelectionManager::setSelection ( const M_Picked objs  ) 

Definition at line 1144 of file selection_manager.cpp.

void rviz::SelectionManager::setTextureSize ( unsigned  size  ) 

Definition at line 283 of file selection_manager.cpp.

void rviz::SelectionManager::unpackColors ( const Ogre::PixelBox &  box,
V_Pixel pixels 
) [protected]

Definition at line 520 of file selection_manager.cpp.

void rviz::SelectionManager::update (  ) 

Definition at line 442 of file selection_manager.cpp.


Member Data Documentation

Ogre::Camera* rviz::SelectionManager::camera_ [protected]

Definition at line 210 of file selection_manager.h.

Ogre::MaterialPtr rviz::SelectionManager::debug_depth_material_ [protected]

Definition at line 203 of file selection_manager.h.

Ogre::SceneNode* rviz::SelectionManager::debug_depth_node_ [protected]

Definition at line 202 of file selection_manager.h.

Definition at line 217 of file selection_manager.h.

Definition at line 218 of file selection_manager.h.

Definition at line 216 of file selection_manager.h.

Ogre::PixelBox rviz::SelectionManager::depth_pixel_box_ [protected]

Definition at line 204 of file selection_manager.h.

Ogre::TexturePtr rviz::SelectionManager::depth_render_texture_ [protected]

Definition at line 200 of file selection_manager.h.

Definition at line 201 of file selection_manager.h.

Ogre::MaterialPtr rviz::SelectionManager::fallback_pick_material_ [protected]

Definition at line 220 of file selection_manager.h.

Definition at line 221 of file selection_manager.h.

boost::recursive_mutex rviz::SelectionManager::global_mutex_ [protected]

Definition at line 176 of file selection_manager.h.

Definition at line 191 of file selection_manager.h.

Definition at line 181 of file selection_manager.h.

Ogre::SceneNode* rviz::SelectionManager::highlight_node_ [protected]

Definition at line 209 of file selection_manager.h.

Ogre::Rectangle2D* rviz::SelectionManager::highlight_rectangle_ [protected]

Definition at line 208 of file selection_manager.h.

Definition at line 214 of file selection_manager.h.

Definition at line 179 of file selection_manager.h.

Definition at line 197 of file selection_manager.h.

Definition at line 212 of file selection_manager.h.

Definition at line 196 of file selection_manager.h.

Definition at line 195 of file selection_manager.h.

Definition at line 193 of file selection_manager.h.

Definition at line 234 of file selection_manager.h.

Definition at line 235 of file selection_manager.h.

Definition at line 233 of file selection_manager.h.

Definition at line 232 of file selection_manager.h.

Definition at line 223 of file selection_manager.h.

Definition at line 206 of file selection_manager.h.

Definition at line 174 of file selection_manager.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


rviz
Author(s): Josh Faust, Dave Hershberger
autogenerated on Sat Mar 2 14:17:37 2013