VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes
makVrf::DtSphereEditor Class Reference

Editor for sphere objects. Will also create the visualizers (and manage) for the editing. More...

Inheritance diagram for makVrf::DtSphereEditor:
Inheritance graph
[legend]

Classes

struct  Sphere3D
 

Public Member Functions

 DtSphereEditor (makVrv::DtDe &)
 CTOR. More...
 
virtual ~DtSphereEditor ()
 virtual DTOR More...
 
virtual const std::string & className ()
 Returns the name of the processor class, to be used for identifying an event processor. More...
 
virtual const DtVectorlocation () const
 Location is set/returned in local database coordinates. More...
 
virtual void setRadius (double, bool reset=true)
 Radius is set in meters. More...
 
virtual double radius () const
 
virtual void setLocation (const DtVector &, double)
 
virtual void setPlaced (bool)
 When this is true, will disconnect from signal_setLocation method. More...
 
bool placed () const
 
virtual void setRadiusRange (double bottom, double top)
 
virtual void getRadiusRange (double &bottom, double &top) const
 
virtual bool blockSignals (bool)
 Returns current status. More...
 
bool signalsBlocked () const
 
- Public Member Functions inherited from makVrf::DtVrfObjectManipulationEventProcessor
 DtVrfObjectManipulationEventProcessor (makVrv::DtDe &, const std::string &driverName="DtVrfObjectManipulationEventProcessor")
 CTOR. More...
 
virtual ~DtVrfObjectManipulationEventProcessor ()
 virtual DTOR More...
 
virtual void setCurrentHeading (double heading)
 new objects start with an intial heading of 0. More...
 
virtual void setCurrentPitch (double pitch)
 new objects start with an intial pitch of 0. More...
 
virtual void setHeadingAllowed (bool)
 Sets whether or not heading changes are allowed. Default is false. More...
 
virtual bool headingAllowed () const
 
virtual void setPitchAllowed (bool)
 Sets whether or not pitch changes are allowed. Default is false. More...
 
virtual bool pitchAllowed () const
 
virtual void setAltitudeAllowed (bool)
 Sets whether or not altitude changes are allowed. Default is false. More...
 
virtual bool altitudeAllowed () const
 
virtual double currentHeading () const
 get the current heading. Initial heading plus changes due the shift-dragging More...
 
virtual double currentPitch () const
 get the current pitch. Initial heading plus changes due the shift-dragging More...
 
virtual void setEnabled (bool)
 If not enabled will not process mouse events, but rather ignore and pass to the next handler. More...
 
virtual void setEditing (bool)
 Set to true if in edit mode. More...
 
virtual void setCreating (bool)
 Set to be creating. More...
 
virtual void setIgnoreNextLeftButtonRelease (bool b)
 Set to ignore the next left button release. More...
 
virtual void setEditStartedByDoubleClick (bool b)
 
virtual void setDragTolerance (int)
 Set as the minimum distance the mouse needs to move to consider it to be a terrain drag from the mouse down location. More...
 
virtual int dragTolerance () const
 
virtual void setFreehand (bool)
 Sets freehand mode. More...
 
virtual bool freehand () const
 
void setDragToleranceTime (double)
 Along with move tolerance, the amount of time the mouse has to be pressed before initiating a terrain drag. More...
 
double dragToleranceTime () const
 
virtual void setIgnoreList (const std::vector< makVrv::DtElementID > &)
 sets the list with which to ignore items when doing intersections More...
 
const std::vector
< makVrv::DtElementID > & 
ignoreList () const
 
virtual void setEmbarkationAllowed (bool)
 Sets whether or not the processor will allow the picking of all nodes to allow for items to be embarked on other objects. More...
 
virtual bool embarkationAllowed () const
 
virtual bool isShiftKeyDown () const
 Asks gui event processor to return state of these keys. More...
 
virtual bool isControlKeyDown () const
 
virtual bool isAltKeyDown () const
 
virtual bool isLeftMouseButtonDown () const
 
virtual bool isRightMouseButtonDown () const
 
virtual bool isMiddleMouseButtonDown () const
 
- Public Member Functions inherited from makVrv::DtBasicEditingEventProcessor
 DtBasicEditingEventProcessor (DtInputDriver &inputDriver, DtDe &de, const std::string &className)
 DTOR This class is created by the DtSimpleManager. More...
 
virtual ~DtBasicEditingEventProcessor ()
 CTOR. More...
 
double currentAltitude () const
 
void setCurrentAltitude (double)
 
void setCurrentGroundLocation (const DtVector &)
 
virtual bool dragging () const
 Returns true if currently in dragging mode. More...
 
virtual void setAllowDragDrop (bool)
 If true (default false) will send out signals when a drag/drop would start (based on tolerance for left mouse down and mouse move). More...
 
bool allowDragDrop () const
 
bool creating () const
 
virtual bool allowEdit (const DtSelectionManager::IdSet &, bool doubleClick) const
 Return true if the items can be edited (by double click if flag is true). Default is false. More...
 
virtual bool allowContinueDrag (const DtVector &) const
 Return true if can still drag object (if in drag mode). More...
 
double mouseX () const
 Mouse X and Y positions as recorded the last time through the processEvent. More...
 
double mouseY () const
 
- Public Member Functions inherited from makVrv::DtEventProcessorInterface
 DtEventProcessorInterface ()
 CTOR. More...
 
virtual ~DtEventProcessorInterface ()
 DTOR. More...
 
virtual bool processPinchGesture (const DtPinchGesture &ev, DtChannel &channel)
 Don't require a handler for pinch gestures, but make them available. More...
 
bool enabled () const
 

Public Attributes

boost::signals2::signal< void(const
DtVector &)> 
signal_sphereLocationChanged
 
boost::signals2::signal< void(double)> signal_radiusChanged
 
boost::signals2::signal< void(bool)> signal_placed
 
- Public Attributes inherited from makVrf::DtVrfObjectManipulationEventProcessor
boost::signals2::signal< void(double)> signal_headingChanged
 signal that the heading of the object has changed More...
 
boost::signals2::signal< void(double)> signal_pitchChanged
 signal that the pitch of the object has changed More...
 
boost::signals2::signal< void(bool)> signal_cancel
 
- Public Attributes inherited from makVrv::DtBasicEditingEventProcessor
boost::signal< void(DtVector,
double altAboveGround)> 
signal_locationChanged
 Signal sent when the mouse location has changed via a mouse move. More...
 
boost::signal< void()> signal_cancel
 Signal sent when the user wants to cancel the operation. More...
 
boost::signal< void(DtUniqueID,
DtVector, double
altAboveGround)> 
signal_place
 Signal sent on left click of mouse on terrain or object. More...
 
boost::signal< void(DtVector,
double)> 
signal_altitudeChanged
 Signal sent when the altitude has changed. More...
 
boost::signal< void(const
DtSelectionManager::IdSet
&, const DtVector &)> 
signal_dragStart
 Signal sent when dragging is starting. More...
 
boost::signal< void(bool)> signal_altitudeIsDragging
 Signal send when altitude has stopped/started changing by mouse movement. More...
 

Protected Types

typedef std::map< int,
makVrv::Dt2DEllipseFacade * > 
Spheres2D
 
typedef std::map< int, Sphere3DSpheres3D
 

Protected Member Functions

virtual void modifyRadius (int steps)
 
virtual double multiplierForRadius (double change) const
 
virtual void create2DSphere (int modelSet)
 
virtual void create3DSphere (int modelSet)
 
virtual void placed (makVrv::DtUniqueID, const DtVector &, double)
 
virtual void changeHeading (double mouseX, double mouseY)
 do the work on shift-drag More...
 
virtual void changeHeadingWithWheel (int wheelSteps)
 change heading with shift-mousewheel More...
 
virtual void cancel ()
 Call to cancel current operation. More...
 
virtual void altitudeChanged (const DtVector &, double altitude)
 
virtual void cleanup ()
 
- Protected Member Functions inherited from makVrf::DtVrfObjectManipulationEventProcessor
virtual bool checkModifiersReleased (const makVrv::DtKeyState::KeyModifier &ev, makVrv::DtChannel &channel, bool mouseDown)
 
virtual bool checkModifiersEnabled (const makVrv::DtMouseEvent &ev, makVrv::DtChannel &channel)
 
virtual
makVrv::DtIntersector::IntersectProperties 
intersectorPickMask () const
 Mask to use when picking into the scene. More...
 
virtual bool processMouseEvent (const makVrv::DtMouseEvent &ev, makVrv::DtChannel &channel)
 process mouse events More...
 
virtual bool processKeyboardEvent (const makVrv::DtKeyEvent &ev, makVrv::DtChannel &channel)
 Processes a keyboard event on the channel. More...
 
virtual void changePitch (double mouseX, double mouseY)
 
virtual void changeAltitude (double mouseX, double mouseY)
 do the work on alt-drag More...
 
virtual bool pick (makVrv::DtChannel &channel, double x, double y, makVrv::DtIntersectorResult &result, makVrv::DtIntersector::IntersectProperties props) const
 Call intersector to pick into scene to get terrain intersection. More...
 
virtual void cleanupTerrainDraggingVaraibles ()
 
virtual bool placePoint (makVrv::DtChannel &channel, const makVrv::DtMouseEvent &)
 If creating or dragging signal to place the point and return true, else return false. More...
 
virtual void changeAltitudeWithWheel (int wheelSteps)
 change altitude with alt-mousewheel More...
 
virtual void changePitchWithWheel (int wheelSteps)
 change heading with shift-mousewheel More...
 
virtual void cancel (bool escPressed)
 
virtual void startHeadingDrag (const makVrv::DtMouseEvent &, makVrv::DtChannel &channel)
 
virtual void startPitchDrag (const makVrv::DtMouseEvent &, makVrv::DtChannel &channel)
 
virtual void startAltitudeDrag (const makVrv::DtMouseEvent &, makVrv::DtChannel &channel)
 
virtual void tick ()
 
virtual void executeDeferredMouseMoveEvent ()
 
- Protected Member Functions inherited from makVrv::DtBasicEditingEventProcessor
virtual void processMouseMove (DtChannel &channel, const DtMouseEvent &ev)
 

Protected Attributes

Spheres2D mySpheres2D
 
Spheres3D mySpheres3D
 
DtVector myCurrentLocation
 
double myBottom
 
double myTop
 
std::vector< std::pair< int,
double > > 
myRadii
 
bool mySignalsBlocked
 
bool myPlaced
 
- Protected Attributes inherited from makVrf::DtVrfObjectManipulationEventProcessor
DtTaitBryan myCurrentOrientation
 
bool myHeadingAllowed
 
bool myPitchAllowed
 
bool myAltitudeAllowed
 
bool myIsHeadingDragging
 
bool myIsPitchDragging
 
bool myMouseDragging
 
makVrv::DtSignalConnectionManager myConnections
 
DtVector myStartPoint
 
int myDragTolerance
 
double myDragToleranceTime
 
double myDragTime
 
DtTimedSection myDragTimer
 
bool myAllowEditing
 
bool myFreehand
 
std::vector< makVrv::DtElementIDmyIgnoreList
 
double myHeadingPositionY
 
double myHeadingPositionX
 
double myAltitudePositionX
 
double myAltitudePositionY
 
bool myEmbarkationAllowed
 
bool myIgnoreNextLeftButtonRelease
 
bool myIgnoreLeftMouseDown
 
bool myObserverEventProcessorWasEnabled
 
bool myEditStartedByDoubleClick
 
bool myIsLastEventProcessing
 
DtVector myObserverLocation
 
makVrv::DtMouseEvent myLastMouseEvent
 
bool mySetAtLeastOneEvent
 
boost::optional
< makVrv::DtMouseEvent
mySavedMouseMoveEvent
 Linux produces many mouse move events during a tick this holds the most recent one which is executed at the end of the tick so that many intersections are not done. More...
 
bool myDeferMouseMoveEvents
 Controls whether mouse move events will be executed immediately or saved. More...
 
bool myRightMouseButtonDown
 
- Protected Attributes inherited from makVrv::DtBasicEditingEventProcessor
DtDemyDe
 
DtInputDrivermyInputDriver
 
std::string myClassName
 
bool myIsAltitudeDragging
 
DtVector myCurrentGroundLocation
 
double myCurrentAltitude
 
bool myDragging
 
bool myAllowDragDrop
 
double myLastMouseX
 
double myLastMouseY
 
double myMousePositionX
 
double myMousePositionY
 
double myLastDeltaY
 
bool myCreating
 
bool myIgnoreNextLeftButtonRelease
 
- Protected Attributes inherited from makVrv::DtEventProcessorInterface
bool myEnabled
 

Detailed Description

Editor for sphere objects. Will also create the visualizers (and manage) for the editing.

Member Typedef Documentation

typedef std::map<int, Sphere3D> makVrf::DtSphereEditor::Spheres3D
protected

Constructor & Destructor Documentation

makVrf::DtSphereEditor::DtSphereEditor ( makVrv::DtDe )

CTOR.

virtual makVrf::DtSphereEditor::~DtSphereEditor ( )
virtual

virtual DTOR

Member Function Documentation

virtual const std::string& makVrf::DtSphereEditor::className ( )
virtual

Returns the name of the processor class, to be used for identifying an event processor.

Reimplemented from makVrf::DtVrfObjectManipulationEventProcessor.

virtual const DtVector& makVrf::DtSphereEditor::location ( ) const
virtual

Location is set/returned in local database coordinates.

virtual void makVrf::DtSphereEditor::setRadius ( double  ,
bool  reset = true 
)
virtual

Radius is set in meters.

virtual double makVrf::DtSphereEditor::radius ( ) const
virtual
virtual void makVrf::DtSphereEditor::setLocation ( const DtVector ,
double   
)
virtual
virtual void makVrf::DtSphereEditor::setPlaced ( bool  )
virtual

When this is true, will disconnect from signal_setLocation method.

bool makVrf::DtSphereEditor::placed ( ) const
inline
virtual void makVrf::DtSphereEditor::setRadiusRange ( double  bottom,
double  top 
)
virtual
virtual void makVrf::DtSphereEditor::getRadiusRange ( double bottom,
double top 
) const
virtual
virtual bool makVrf::DtSphereEditor::blockSignals ( bool  )
virtual

Returns current status.

bool makVrf::DtSphereEditor::signalsBlocked ( ) const
inline
virtual void makVrf::DtSphereEditor::modifyRadius ( int  steps)
protectedvirtual
virtual double makVrf::DtSphereEditor::multiplierForRadius ( double  change) const
protectedvirtual
virtual void makVrf::DtSphereEditor::create2DSphere ( int  modelSet)
protectedvirtual
virtual void makVrf::DtSphereEditor::create3DSphere ( int  modelSet)
protectedvirtual
virtual void makVrf::DtSphereEditor::placed ( makVrv::DtUniqueID  ,
const DtVector ,
double   
)
protectedvirtual
virtual void makVrf::DtSphereEditor::changeHeading ( double  mouseX,
double  mouseY 
)
protectedvirtual

do the work on shift-drag

Reimplemented from makVrf::DtVrfObjectManipulationEventProcessor.

virtual void makVrf::DtSphereEditor::changeHeadingWithWheel ( int  wheelSteps)
protectedvirtual

change heading with shift-mousewheel

Reimplemented from makVrf::DtVrfObjectManipulationEventProcessor.

virtual void makVrf::DtSphereEditor::cancel ( )
protectedvirtual

Call to cancel current operation.

Reimplemented from makVrf::DtVrfObjectManipulationEventProcessor.

virtual void makVrf::DtSphereEditor::altitudeChanged ( const DtVector ,
double  altitude 
)
protectedvirtual
virtual void makVrf::DtSphereEditor::cleanup ( )
protectedvirtual

Member Data Documentation

boost::signals2::signal<void (const DtVector&)> makVrf::DtSphereEditor::signal_sphereLocationChanged
boost::signals2::signal<void (double)> makVrf::DtSphereEditor::signal_radiusChanged
boost::signals2::signal<void (bool)> makVrf::DtSphereEditor::signal_placed
Spheres2D makVrf::DtSphereEditor::mySpheres2D
protected
Spheres3D makVrf::DtSphereEditor::mySpheres3D
protected
DtVector makVrf::DtSphereEditor::myCurrentLocation
protected
double makVrf::DtSphereEditor::myBottom
protected
double makVrf::DtSphereEditor::myTop
protected
std::vector<std::pair<int, double> > makVrf::DtSphereEditor::myRadii
protected
bool makVrf::DtSphereEditor::mySignalsBlocked
protected
bool makVrf::DtSphereEditor::myPlaced
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)