VR-Forces 4.1 Class Documentation
boxDrawEventProcessor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2011 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 #pragma once
7 
9 
10 #include <vrfGuiCore/vrfGuiCore.h>
12 
14 #include <vrvCore/DtElementEntry.h>
15 #include <vrvCore/DtDe.h>
16 #include <vrvCore/DtIntersector.h>
17 #include <geometry/point.h>
18 
19 namespace makVrv
20 {
21  class DtOverlayPolygonModelAgent;
22  class DtSceneObjectAgent;
23 }
24 
25 
26 namespace BHAVE
27 {
28  namespace BHAVE3DGui
29  {
33  {
34  public:
35 
38 
40  virtual ~DtBoxDrawEventProcessor();
41 
42  virtual const std::string& className() {return theClassName;};
43 
46  virtual bool processMouseEvent( const makVrv::DtMouseEvent& ev, makVrv::DtChannel& channel);
47  virtual bool processKeyboardEvent( const makVrv::DtKeyEvent& ev, makVrv::DtChannel& channel) {return false;};
48 
50  virtual void cleanupBox();
51 
52  static void setCurrentMousePosition(makVrv::DtDe&, int x, int y);
53  static void setCurrentMousePosition(int x, int y);
54  static void getCurrentMousePosition(int& x, int& y);
55 
56  virtual bool isActive() const;
57  virtual void setIsActive(bool active);
58 
59  virtual void saveLastPoints();
60  virtual void restoreLastPoints();
61 
62  boost::signal<void (const makVrv::DtIntersectorResult&, const makVrv::DtIntersectorResult&,
64 
65  boost::signal<void ()> signal_boxCreated;
66 
67  boost::signal<void (int x, int y)> signal_boxCreationStart;
68 
69  protected:
70 
72  virtual void createBox(int modelSet);
73 
75  virtual void setBoxFromExtents(makVrv::DtChannel& channel, int anchorX, int anchorY, int toX, int toY);
76 
77  protected:
79  makVrv::DtOverlayPolygonModelAgent* myBox;
81  makVrv::DtSceneObjectAgent* mySceneObjectAgent;
82  bool myIsActive;
87  static std::string theClassName;
97  };
98  }
99 }

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)