VR-Forces 5.0.1 Developer's Guide
 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 
18 
19 #include <vrvCore/DtUniqueID.h>
20 #include <vrvCore/DtMouseEvent.h>
21 
22 #include <matrix/vlVector.h>
23 #include <matrix/vlQuaternion.h>
24 
25 #include <vlutil/vlPerformanceStats.h>
26 
27 namespace makVrv
28 {
29  class DtSceneObjectAgent;
30  class DtEllipsoidArcModelAgent;
31 };
32 
33 namespace makVrf
34 {
35  class DtVrfOverlayEllipseArcModelAgent;
36  class DtAttachableUpdaterWithLevelOrientationAgent;
37  class Dt2DEllipseFacade;
38 
41  {
42  public:
45 
47  virtual ~DtSphereEditor();
48 
49  virtual const std::string& className();
50 
52  virtual const DtVector& location() const;
53 
55  virtual void setRadius(double, bool reset = true);
56  virtual double radius() const;
57 
58  virtual void setLocation(const DtVector&, double);
59 
60  boost::signals2::signal<void (const DtVector&)> signal_sphereLocationChanged;
61  boost::signals2::signal<void (double)> signal_radiusChanged;
62  boost::signals2::signal<void (bool)> signal_placed;
63 
65  virtual void setPlaced(bool);
66  bool placed() const
67  {
68  return myPlaced;
69  }
70 
71  virtual void setRadiusRange(double bottom, double top);
72  virtual void getRadiusRange(double& bottom, double& top) const;
73 
75  virtual bool blockSignals(bool);
76 
77  bool signalsBlocked() const
78  {
79  return mySignalsBlocked;
80  }
81 
82  protected:
83  virtual void modifyRadius(int steps);
84  virtual double multiplierForRadius(double change) const;
85  virtual void create2DSphere(int modelSet);
86  virtual void create3DSphere(int modelSet);
87  virtual void placed(makVrv::DtUniqueID, const DtVector&, double);
88  virtual void changeHeading( double mouseX, double mouseY );
89  virtual void changeHeadingWithWheel( int wheelSteps ) ;
90  virtual void cancel();
91  virtual void altitudeChanged(const DtVector&, double altitude);
92 
93  virtual void cleanup();
94 
95  protected:
96  typedef std::map<int, Dt2DEllipseFacade*> Spheres2D;
98 
99  struct Sphere3D
100  {
101  makVrv::DtSceneObjectAgent* sceneObjectAgent;
102  makVrv::DtEllipsoidArcModelAgent* sphere;
103  DtAttachableUpdaterWithLevelOrientationAgent* updater;
104  };
105 
106  typedef std::map<int, Sphere3D> Spheres3D;
108 
110 
111  double myBottom;
112  double myTop;
113 
114  std::vector<std::pair<int, double> > myRadii;
115 
117 
118  bool myPlaced;
119  };
120 
123  {
124 
125  public:
128  static DtSphereEditorCreator& instance( makVrv::DtDe& de );
129 
131  static void registerInstance( makVrv::DtDe& de,
132  DtSphereEditorCreator* instance);
133 
135  virtual DtSphereEditor* create( makVrv::DtDe& de );
136  };
137 }
makVrv::DtSceneObjectAgent * sceneObjectAgent
Definition: sphereEditor.h:101
Manage the tick and mouse events when editing or placing a Vrf object.
Definition: vrfObjectManipulationEventProcessor.h:35
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
Editor for sphere objects. Will also create the visualizers (and manage) for the editing.
Definition: sphereEditor.h:40
bool mySignalsBlocked
Definition: sphereEditor.h:116
#define DT_DLL_VRFGUICORE
Contains DLL export macros.
Definition: vrfGuiCore.h:25
std::map< int, Dt2DEllipseFacade * > Spheres2D
Definition: sphereEditor.h:96
boost::signals2::signal< void(const DtVector &)> signal_sphereLocationChanged
Definition: sphereEditor.h:60
boost::signals2::signal< void(bool)> signal_placed
Definition: sphereEditor.h:62
Definition: sphereEditor.h:99
Contains makVrv::DtVirtualBaseClass class.
bool placed() const
Definition: sphereEditor.h:66
bool myPlaced
Definition: sphereEditor.h:118
std::vector< std::pair< int, double > > myRadii
Definition: sphereEditor.h:114
This file contains the declaration for the class DtMouseEvent.
bool signalsBlocked() const
Definition: sphereEditor.h:77
double myBottom
Definition: sphereEditor.h:111
double myTop
Definition: sphereEditor.h:112
DtAttachableUpdaterWithLevelOrientationAgent * updater
Definition: sphereEditor.h:103
Base class to provide boost signal/slot management.
Spheres2D mySpheres2D
Definition: sphereEditor.h:97
Spheres3D mySpheres3D
Definition: sphereEditor.h:107
Contains makVrv::DtUniqueID type.
boost::signals2::signal< void(double)> signal_radiusChanged
Definition: sphereEditor.h:61
makVrv::DtEllipsoidArcModelAgent * sphere
Definition: sphereEditor.h:102
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
Definition: sphereEditor.h:121
std::map< int, Sphere3D > Spheres3D
Definition: sphereEditor.h:106
DtVector myCurrentLocation
Definition: sphereEditor.h:109

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)