30 #include <OgreCamera.h> 31 #include <OgrePlane.h> 33 #include <OgreSceneNode.h> 34 #include <OgreViewport.h> 55 "While holding down a mouse button, hide all other Interactive Objects.",
87 event.
x + 1, event.
y + 1,
95 M_Picked::iterator result_it = results.begin();
96 if( result_it != results.end() )
98 Picked pick = result_it->second;
103 if(
object && object->isInteractive() )
105 new_focused_object = object;
114 if( new_obj != old_obj )
121 event_copy.
type = QEvent::FocusOut;
122 old_obj->handleMouseEvent( event_copy );
127 event_copy.
type = QEvent::FocusIn;
128 new_obj->handleMouseEvent( event_copy );
148 Qt::MouseButtons buttons =
event.buttons_down & ( Qt::LeftButton | Qt::RightButton | Qt::MidButton );
149 if ( event.
type == QEvent::MouseButtonPress )
151 bool dragging = buttons != 0;
154 if( need_selection_update &&
156 event.
type != QEvent::MouseButtonRelease )
166 focused_object->handleMouseEvent( event );
167 setCursor( focused_object->getCursor() );
185 if( event.
type == QEvent::MouseButtonRelease )
ViewController * getViewController()
Ogre::Viewport * viewport
boost::unordered_map< CollObjectHandle, Picked > M_Picked
virtual uint64_t getFrameCount() const =0
Return the current value of the frame count.
virtual InteractiveObjectWPtr getInteractiveObject()
Get the object to listen to mouse events and other interaction calls during use of the 'interact' too...
virtual bool getBool() const
void enableInteraction(bool enable)
bool contextMenuVisible()
SelectionHandler * getHandler(CollObjectHandle obj)
virtual SelectionManager * getSelectionManager() const =0
Return a pointer to the SelectionManager.
Qt::MouseButton acting_button
void pick(Ogre::Viewport *viewport, int x1, int y1, int x2, int y2, M_Picked &results, bool single_render_pass=false)
Property specialized to provide getter for booleans.
void setTextureSize(unsigned size)
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)