VR-Forces 4.6 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.
virtual ~DtSphereEditor ()
 virtual DTOR
virtual const std::string & className ()
 Returns the name of the processor class, to be used for identifying an event processor.
virtual const DtVectorlocation () const
 Location is set/returned in local database coordinates.
virtual void setRadius (double, bool reset=true)
 Radius is set in meters.
virtual double radius () const
virtual void setLocation (const DtVector &, double)
virtual void setPlaced (bool)
 When this is true, will disconnect from signal_setLocation method.
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.
bool signalsBlocked () const
- Public Member Functions inherited from makVrf::DtVrfObjectManipulationEventProcessor
 DtVrfObjectManipulationEventProcessor (makVrv::DtDe &, const std::string &driverName="DtVrfObjectManipulationEventProcessor")
 CTOR.
virtual ~DtVrfObjectManipulationEventProcessor ()
 virtual DTOR
virtual void setCurrentHeading (double heading)
 new objects start with an intial heading of 0.
virtual void setHeadingAllowed (bool)
 Sets whether or not heading changes are allowed. Default is false.
virtual bool headingAllowed () const
virtual void setAltitudeAllowed (bool)
 Sets whether or not altitude changes are allowed. Default is false.
virtual bool altitudeAllowed () const
virtual double currentHeading () const
 get the current heading. Initial heading plus changes due the shift-dragging
virtual void setEnabled (bool)
 If not enabled will not process mouse events, but rather ignore and pass to the next handler.
virtual void setEditing (bool)
 Set to true if in edit mode.
virtual void setCreating (bool)
 Set to be creating.
virtual void setIgnoreNextLeftButtonRelease (bool b)
 Set to ignore the next left button release.
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.
virtual int dragTolerance () const
virtual void setFreehand (bool)
 Sets freehand mode.
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.
double dragToleranceTime () const
virtual void setIgnoreList (const std::vector< makVrv::DtElementID > &)
 sets the list with which to ignore items when doing intersections
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.
virtual bool embarkationAllowed () const
virtual bool isShiftKeyDown () const
 Asks gui event processor to return state of these keys.
virtual bool isControlKeyDown () const
virtual bool isAltKeyDown () 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.
virtual ~DtBasicEditingEventProcessor ()
 CTOR.
double currentAltitude () const
void setCurrentAltitude (double)
void setCurrentGroundLocation (const DtVector &)
virtual bool dragging () const
 Returns true if currently in dragging mode.
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).
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.
virtual bool allowContinueDrag (const DtVector &) const
 Return true if can still drag object (if in drag mode).
double mouseX () const
 Mouse X and Y positions as recorded the last time through the processEvent.
double mouseY () const
- Public Member Functions inherited from makVrv::DtEventProcessorInterface
 DtEventProcessorInterface ()
 CTOR.
virtual ~DtEventProcessorInterface ()
 DTOR.
virtual bool processPinchGesture (const DtPinchGesture &ev, DtChannel &channel)
 Don't require a handler for pinch gestures, but make them available.
bool enabled () const

Public Attributes

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

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
virtual void changeHeadingWithWheel (int wheelSteps)
 change heading with shift-mousewheel
virtual void cancel ()
 Call to cancel current operation.
virtual void altitudeChanged (const DtVector &, double altitude)
virtual void cleanup ()
- Protected Member Functions inherited from makVrf::DtVrfObjectManipulationEventProcessor
virtual
makVrv::DtIntersector::IntersectProperties 
intersectorPickMask () const
 Mask to use when picking into the scene.
virtual bool processMouseEvent (const makVrv::DtMouseEvent &ev, makVrv::DtChannel &channel)
 process mouse events
virtual bool processKeyboardEvent (const makVrv::DtKeyEvent &ev, makVrv::DtChannel &channel)
 Processes a keyboard event on the channel.
virtual void changeAltitude (double mouseX, double mouseY)
 do the work on alt-drag
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.
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.
virtual void changeAltitudeWithWheel (int wheelSteps)
 change altitude with alt-mousewheel
virtual void cancel (bool escPressed)
virtual void startHeadingDrag (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
double myCurrentHeading
bool myHeadingAllowed
bool myAltitudeAllowed
bool myIsHeadingDragging
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.
bool myDeferMouseMoveEvents
 Controls whether mouse move events will be executed immediately or saved.
- 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::signal<void (const DtVector&)> makVrf::DtSphereEditor::signal_sphereLocationChanged
boost::signal<void (double)> makVrf::DtSphereEditor::signal_radiusChanged
boost::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 Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)