VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
sphereEditor.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>
15 
16 #include <vrvUtil/signalslib.h>
17 
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 makVrv
30 {
31  class DtSceneObjectAgent;
32  class DtEllipsoidArcModelAgent;
33  class Dt2DEllipseFacade;
34 };
35 
36 namespace makVrf
37 {
38  class DtVrfOverlayEllipseArcModelAgent;
39  class DtAttachableUpdaterWithLevelOrientationAgent;
40 
43  {
44  public:
47 
49  virtual ~DtSphereEditor();
50 
51  virtual const std::string& className();
52 
54  virtual const DtVector& location() const;
55 
57  virtual void setRadius(double, bool reset = true);
58  virtual double radius() const;
59 
60  virtual void setLocation(const DtVector&, double);
61 
62  boost::signals2::signal<void (const DtVector&)> signal_sphereLocationChanged;
63  boost::signals2::signal<void (double)> signal_radiusChanged;
64  boost::signals2::signal<void (bool)> signal_placed;
65 
67  virtual void setPlaced(bool);
68  bool placed() const
69  {
70  return myPlaced;
71  }
72 
73  virtual void setRadiusRange(double bottom, double top);
74  virtual void getRadiusRange(double& bottom, double& top) const;
75 
77  virtual bool blockSignals(bool);
78 
79  bool signalsBlocked() const
80  {
81  return mySignalsBlocked;
82  }
83 
84  protected:
85  virtual void modifyRadius(int steps);
86  virtual double multiplierForRadius(double change) const;
87  virtual void create2DSphere(int modelSet);
88  virtual void create3DSphere(int modelSet);
89  virtual void placed(makVrv::DtUniqueID, const DtVector&, double);
90  virtual void changeHeading( double mouseX, double mouseY );
91  virtual void changeHeadingWithWheel( int wheelSteps ) ;
92  virtual void cancel();
93  virtual void altitudeChanged(const DtVector&, double altitude);
94 
95  virtual void cleanup();
96 
97  protected:
98  typedef std::map<int, makVrv::Dt2DEllipseFacade*> Spheres2D;
100 
101  struct Sphere3D
102  {
103  makVrv::DtSceneObjectAgent* sceneObjectAgent;
104  makVrv::DtEllipsoidArcModelAgent* sphere;
105  DtAttachableUpdaterWithLevelOrientationAgent* updater;
106  };
107 
108  typedef std::map<int, Sphere3D> Spheres3D;
110 
112 
113  double myBottom;
114  double myTop;
115 
116  std::vector<std::pair<int, double> > myRadii;
117 
119 
120  bool myPlaced;
121  };
122 
125  {
126 
127  public:
130  static DtSphereEditorCreator& instance( makVrv::DtDe& de );
131 
133  static void registerInstance( makVrv::DtDe& de,
134  DtSphereEditorCreator* instance);
135 
137  virtual DtSphereEditor* create( makVrv::DtDe& de );
138  };
139 }
makVrv::DtSceneObjectAgent * sceneObjectAgent
Definition: sphereEditor.h:103
Manage the tick and mouse events when editing or placing a Vrf object.
Definition: vrfObjectManipulationEventProcessor.h:35
Virtual base class.
Definition: DtVirtualBaseClass.h:19
Editor for sphere objects. Will also create the visualizers (and manage) for the editing.
Definition: sphereEditor.h:42
bool mySignalsBlocked
Definition: sphereEditor.h:118
#define DT_DLL_VRFGUICORE
Contains DLL export macros.
Definition: vrfGuiCore.h:25
boost::signals2::signal< void(const DtVector &)> signal_sphereLocationChanged
Definition: sphereEditor.h:62
boost::signals2::signal< void(bool)> signal_placed
Definition: sphereEditor.h:64
Definition: sphereEditor.h:101
Contains makVrv::DtVirtualBaseClass class.
bool placed() const
Definition: sphereEditor.h:68
bool myPlaced
Definition: sphereEditor.h:120
std::map< int, makVrv::Dt2DEllipseFacade * > Spheres2D
Definition: sphereEditor.h:98
std::vector< std::pair< int, double > > myRadii
Definition: sphereEditor.h:116
This file contains the declaration for the class DtMouseEvent.
bool signalsBlocked() const
Definition: sphereEditor.h:79
double myBottom
Definition: sphereEditor.h:113
double myTop
Definition: sphereEditor.h:114
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
DtAttachableUpdaterWithLevelOrientationAgent * updater
Definition: sphereEditor.h:105
Base class to provide boost signal/slot management.
Spheres2D mySpheres2D
Definition: sphereEditor.h:99
Spheres3D mySpheres3D
Definition: sphereEditor.h:109
Contains makVrv::DtUniqueID type.
boost::signals2::signal< void(double)> signal_radiusChanged
Definition: sphereEditor.h:63
makVrv::DtEllipsoidArcModelAgent * sphere
Definition: sphereEditor.h:104
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Definition: sphereEditor.h:123
std::map< int, Sphere3D > Spheres3D
Definition: sphereEditor.h:108
DtVector myCurrentLocation
Definition: sphereEditor.h:111

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)