VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vrfObjectManipulationEventProcessor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 #include <vrfGuiCore/vrfGuiCore.h>
14 
15 #include <boost/signal.hpp>
16 
20 
21 #include <vrvCore/DtUniqueID.h>
22 #include <vrvCore/DtMouseEvent.h>
23 
24 #include <matrix/vlVector.h>
25 #include <matrix/vlQuaternion.h>
26 
27 #include <vlutil/vlPerformanceStats.h>
28 
29 namespace makVrf
30 {
34  {
35  public:
37  DtVrfObjectManipulationEventProcessor( makVrv::DtDe&, const std::string& driverName = "DtVrfObjectManipulationEventProcessor" );
38 
41 
44  virtual void setCurrentHeading( double heading );
45 
47  virtual void setHeadingAllowed(bool);
48  virtual bool headingAllowed() const;
49 
51  virtual double currentHeading() const;
52 
53  virtual const std::string& className();
54 
56  virtual void setEnabled(bool);
57 
59  virtual void setEditing(bool);
60 
62  virtual void setCreating(bool);
63 
65  virtual void setIgnoreNextLeftButtonRelease(bool b);
66  virtual void setEditStartedByDoubleClick(bool b);
67 
70  virtual void setDragTolerance(int);
71  virtual int dragTolerance() const;
72 
75  virtual void setFreehand(bool);
76  virtual bool freehand() const;
77 
80  void setDragToleranceTime(double);
81  double dragToleranceTime() const;
82 
84  virtual void setIgnoreList(const std::vector<makVrv::DtElementID>&);
85  const std::vector<makVrv::DtElementID>& ignoreList() const;
86 
89  virtual void setEmbarkationAllowed(bool);
90  virtual bool embarkationAllowed() const;
91 
93  boost::signal<void ( double )> signal_headingChanged;
94 
95  boost::signal<void (bool)> signal_cancel;
96 
98  virtual bool isShiftKeyDown() const;
99  virtual bool isControlKeyDown() const;
100  virtual bool isAltKeyDown() const;
101 
102  protected:
103  virtual makVrv::DtIntersector::IntersectProperties intersectorPickMask() const;
104 
106  virtual bool processMouseEvent(const makVrv::DtMouseEvent& ev, makVrv::DtChannel& channel);
107 
108  virtual bool processKeyboardEvent(const makVrv::DtKeyEvent& ev,
109  makVrv::DtChannel& channel);
110 
112  virtual void changeHeading( double mouseX, double mouseY );
113  virtual void changeAltitude( double mouseX, double mouseY );
114 
115  virtual bool pick(makVrv::DtChannel& channel, double x, double y, makVrv::DtIntersectorResult& result,
117 
118  virtual void cleanupTerrainDraggingVaraibles();
119 
121  virtual bool placePoint(makVrv::DtChannel& channel, const makVrv::DtMouseEvent&);
122 
124  virtual void changeAltitudeWithWheel( int wheelSteps );
125 
127  virtual void changeHeadingWithWheel( int wheelSteps );
128 
129  virtual void cancel(bool escPressed);
130  virtual void cancel();
131 
132  virtual void startHeadingDrag(const makVrv::DtMouseEvent&, makVrv::DtChannel& channel);
133  virtual void startAltitudeDrag(const makVrv::DtMouseEvent&, makVrv::DtChannel& channel);
134 
135  protected:
144  double myDragTime;
145  DtTimedSection myDragTimer;
148  std::vector<makVrv::DtElementID> myIgnoreList;
157  };
158 
161  {
162 
163  public:
167 
169  static void registerInstance( makVrv::DtDe& de,
171 
174  };
175 
178  {
179  public:
181  DtVrfIntervisibilityEditingEventProcessor(makVrv::DtInputDriver& inputDriver, makVrv::DtDe& de, const std::string& className);
182 
185 
187  virtual void changeAltitudeWithWheel( int wheelSteps );
188  virtual void startAltitudeDrag(const makVrv::DtMouseEvent&, makVrv::DtChannel& channel);
189  virtual void cancel();
190 
191  protected:
192  virtual bool processMouseEvent( const makVrv::DtMouseEvent& ev, makVrv::DtChannel& channel);
193  virtual bool pick(makVrv::DtChannel& channel, double x, double y, makVrv::DtIntersectorResult& result,
195  virtual void changeAltitude( double mouseX, double mouseY );
196  virtual bool processKeyboardEvent(const makVrv::DtKeyEvent& ev, makVrv::DtChannel& channel);
197  virtual bool isAltKeyDown() const;
198 
199  protected:
204  };
205 
207  {
208  public:
210  };
211 }

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)