VR-Forces 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 namespace makVrv
26 {
27  class DtSceneObjectAgent;
28  class DtEllipsoidArcModelAgent;
29 };
30 
31 namespace makVrf
32 {
33  class DtVrfOverlayEllipseArcModelAgent;
34  class DtAttachableUpdaterWithLevelOrientationAgent;
35  class Dt2DEllipseFacade;
36 
39  {
40  public:
43 
45  virtual ~DtSphereEditor() override;
46 
47  virtual const std::string& className() override;
48 
50  virtual const DtVector& location() const;
51 
53  virtual void setRadius(double, bool reset = true);
54  virtual double radius() const;
55 
56  virtual void setLocation(const DtVector&, double);
57 
58  boost::signals2::signal<void (const DtVector&)> signal_sphereLocationChanged;
59  boost::signals2::signal<void (double)> signal_radiusChanged;
60  boost::signals2::signal<void (bool)> signal_placed;
61 
63  virtual void setPlaced(bool);
64  bool placed() const
65  {
66  return myPlaced;
67  }
68 
69  virtual void setRadiusRange(double bottom, double top);
70  virtual void getRadiusRange(double& bottom, double& top) const;
71 
73  virtual bool blockSignals(bool);
74 
75  bool signalsBlocked() const
76  {
77  return mySignalsBlocked;
78  }
79 
80  protected:
81  virtual void modifyRadius(int steps);
82  virtual double multiplierForRadius(double change) const;
83  virtual void create2DSphere(makVrv::DtModelSetId modelSet);
84  virtual void create3DSphere(makVrv::DtModelSetId modelSet);
85  virtual void placed(makVrv::DtUniqueID, const DtVector&, double);
86  virtual void changeHeading( double mouseX, double mouseY );
87  virtual void changeHeadingWithWheel(int wheelSteps) override;
88  virtual void cancel() override;
89  virtual void altitudeChanged(const DtVector&, double altitude);
90 
91  virtual void cleanup();
92 
93  protected:
94  typedef std::map<makVrv::DtModelSetId, Dt2DEllipseFacade*> Spheres2D;
96 
97  struct Sphere3D
98  {
99  makVrv::DtSceneObjectAgent* sceneObjectAgent;
100  makVrv::DtEllipsoidArcModelAgent* sphere;
101  DtAttachableUpdaterWithLevelOrientationAgent* updater;
102  };
103 
104  typedef std::map<makVrv::DtModelSetId, Sphere3D> Spheres3D;
106 
108 
109  double myBottom;
110  double myTop;
111 
112  std::vector<std::pair<int, double> > myRadii;
113 
115 
116  bool myPlaced;
117  };
118 
121  {
122 
123  public:
126  static DtSphereEditorCreator& instance( makVrv::DtDe& de );
127 
129  static void registerInstance( makVrv::DtDe& de,
130  DtSphereEditorCreator* instance);
131 
133  virtual DtSphereEditor* create( makVrv::DtDe& de );
134  };
135 }
makVrv::DtSceneObjectAgent * sceneObjectAgent
Definition: sphereEditor.h:99
Manage the tick and mouse events when editing or placing a Vrf object.
Definition: vrfObjectManipulationEventProcessor.h:37
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:38
bool mySignalsBlocked
Definition: sphereEditor.h:114
#define DT_DLL_VRFGUICORE
Contains DLL export macros.
Definition: vrfGuiCore.h:25
boost::signals2::signal< void(const DtVector &)> signal_sphereLocationChanged
Definition: sphereEditor.h:58
boost::signals2::signal< void(bool)> signal_placed
Definition: sphereEditor.h:60
Definition: sphereEditor.h:97
Contains makVrv::DtVirtualBaseClass class.
bool placed() const
Definition: sphereEditor.h:64
bool myPlaced
Definition: sphereEditor.h:116
std::vector< std::pair< int, double > > myRadii
Definition: sphereEditor.h:112
This file contains the declaration for the class DtMouseEvent.
bool signalsBlocked() const
Definition: sphereEditor.h:75
double myBottom
Definition: sphereEditor.h:109
double myTop
Definition: sphereEditor.h:110
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
DtAttachableUpdaterWithLevelOrientationAgent * updater
Definition: sphereEditor.h:101
Base class to provide boost signal/slot management.
Spheres2D mySpheres2D
Definition: sphereEditor.h:95
Spheres3D mySpheres3D
Definition: sphereEditor.h:105
Contains makVrv::DtUniqueID type.
boost::signals2::signal< void(double)> signal_radiusChanged
Definition: sphereEditor.h:59
makVrv::DtEllipsoidArcModelAgent * sphere
Definition: sphereEditor.h:100
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:76
DtModelSetId
Definition: DtModelSetEnums.h:19
std::map< makVrv::DtModelSetId, Dt2DEllipseFacade * > Spheres2D
Definition: sphereEditor.h:94
std::map< makVrv::DtModelSetId, Sphere3D > Spheres3D
Definition: sphereEditor.h:104
Definition: sphereEditor.h:119
DtVector myCurrentLocation
Definition: sphereEditor.h:107

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)