VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtBasicEditingEventProcessor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvUtil/signalslib.h>
15 #include <vrvCore/DtIntersector.h>
17 
18 #include <matrix/vlVector.h>
19 
20 namespace makVrv
21 {
22  class DtInputDriver;
23  class DtDe;
24  class DtMouseEvent;
25 
46  {
47  public:
48 
52  DtBasicEditingEventProcessor(DtInputDriver& inputDriver, DtDe& de, const std::string& className);
53 
56 
59  virtual const std::string& className();
60 
61  double currentAltitude() const;
62  void setCurrentAltitude(double);
63  void setCurrentGroundLocation(const DtVector&);
64 
66  virtual void changeAltitude( double mouseX, double mouseY );
67 
69  virtual void changeAltitudeWithWheel( int wheelSteps );
70 
72  virtual bool dragging() const;
73 
78  virtual void setAllowDragDrop(bool);
79  bool allowDragDrop() const;
80 
82  virtual void setCreating(bool);
83  bool creating() const;
84 
86  virtual bool allowEdit(const DtSelectionManager::IdSet&, bool doubleClick) const;
87 
90  virtual bool allowContinueDrag(const DtVector&) const;
91 
93  virtual void cancel();
94 
96  virtual void setEnabled(bool);
97 
99  double mouseX() const;
100  double mouseY() const;
101 
104  boost::signalslib::signal<void (DtVector, double altAboveGround)> signal_locationChanged;
105 
107  boost::signalslib::signal<void ()> signal_cancel;
108 
111  boost::signalslib::signal<void (DtUniqueID, DtVector, double altAboveGround)> signal_place;
112 
114  boost::signalslib::signal<void (DtVector, double)> signal_altitudeChanged;
115 
117  boost::signalslib::signal<void (const DtSelectionManager::IdSet&, const DtVector&)> signal_dragStart;
118 
120  boost::signalslib::signal<void (bool)> signal_altitudeIsDragging;
121 
122  protected:
124  virtual DtIntersector::IntersectProperties intersectorPickMask() const;
125 
129  virtual bool processMouseEvent( const DtMouseEvent& ev, DtChannel& channel);
130 
134  virtual bool processKeyboardEvent( const DtKeyEvent& ev, DtChannel& channel);
135 
136  virtual void processMouseMove(DtChannel& channel, const DtMouseEvent& ev);
137 
139  virtual bool pick(DtChannel& channel, double x, double y, DtIntersectorResult& result,
141 
142  protected:
145  std::string myClassName;
151 
152  double myLastMouseX;
153  double myLastMouseY;
154 
155  // These are used for dragging
158  double myLastDeltaY;
159 
161 
163  };
164 }
double myLastMouseX
Definition: DtBasicEditingEventProcessor.h:152
IntersectProperties
The IntersectProperties enum is a flag set that indicates the.
Definition: DtIntersector.h:135
boost::signalslib::signal< void(DtVector, double)> signal_altitudeChanged
Signal sent when the altitude has changed.
Definition: DtBasicEditingEventProcessor.h:114
This class encapsulates a Key event.
Definition: DtKeyEvent.h:16
DtInputDriver & myInputDriver
Definition: DtBasicEditingEventProcessor.h:144
std::string myClassName
Definition: DtBasicEditingEventProcessor.h:145
bool myCreating
Definition: DtBasicEditingEventProcessor.h:160
Descriptor for a single intersection result.
Definition: DtIntersector.h:33
Contains makVrv:DtSelectionManager class.
The Simple event processor will emit signals whenever a mouse or keyboard event occurs that would cau...
Definition: DtBasicEditingEventProcessor.h:45
boost::signalslib::signal< void(const DtSelectionManager::IdSet &, const DtVector &)> signal_dragStart
Signal sent when dragging is starting.
Definition: DtBasicEditingEventProcessor.h:117
boost::signalslib::signal< void(DtUniqueID, DtVector, double altAboveGround)> signal_place
Signal sent on left click of mouse on terrain or object.
Definition: DtBasicEditingEventProcessor.h:111
This class encapsulates a mouse button event.
Definition: DtMouseEvent.h:19
boost::signalslib::signal< void(bool)> signal_altitudeIsDragging
Signal send when altitude has stopped/started changing by mouse movement.
Definition: DtBasicEditingEventProcessor.h:120
boost::signalslib::signal< void()> signal_cancel
Signal sent when the user wants to cancel the operation.
Definition: DtBasicEditingEventProcessor.h:107
DtDe & myDe
Definition: DtBasicEditingEventProcessor.h:143
The abstract Channel Class.
Definition: DtChannel.h:30
boost::signalslib::signal< void(DtVector, double altAboveGround)> signal_locationChanged
Signal sent when the mouse location has changed via a mouse move.
Definition: DtBasicEditingEventProcessor.h:104
Contains makVrv::DtVirtualBaseClass class.
Contains makVrv:DtIntersector, makVrv:DtIntersectorLineSegment, and makVrv:DtIntersectorResult classe...
Interface for an event processor for a channel.
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
This class&#39;s main responsibility is to handle keyboard and mouse events from OSG (Qt events are route...
Definition: DtInputDriver.h:43
double myLastDeltaY
Definition: DtBasicEditingEventProcessor.h:158
double myMousePositionY
Definition: DtBasicEditingEventProcessor.h:157
double myCurrentAltitude
Definition: DtBasicEditingEventProcessor.h:148
bool myDragging
Definition: DtBasicEditingEventProcessor.h:149
bool myIgnoreNextLeftButtonRelease
Definition: DtBasicEditingEventProcessor.h:162
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
bool myIsAltitudeDragging
Definition: DtBasicEditingEventProcessor.h:146
bool myAllowDragDrop
Definition: DtBasicEditingEventProcessor.h:150
The DtEventProcessorInterface defines the generic interface for classes which handle input events...
Definition: DtEventProcessorInterface.h:34
std::set< DtUniqueID > IdSet
Definition: DtSelectionManager.h:32
double myLastMouseY
Definition: DtBasicEditingEventProcessor.h:153
DtVector myCurrentGroundLocation
Definition: DtBasicEditingEventProcessor.h:147
double myMousePositionX
Definition: DtBasicEditingEventProcessor.h:156

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)