VR-Forces 4.1.1 Class Documentation
List of all members | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
makVrf::DtVrfObjectManipulationEventProcessor Class Reference

Manage the tick and mouse events when editing or placing a Vrf object. More...

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

Public Member Functions

 DtVrfObjectManipulationEventProcessor (makVrv::DtDe &)
 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 double currentHeading () const
 get the current heading. Initial heading plus changes due the shift-dragging
virtual const std::string & className ()
 Returns the name of the processor class, to be used for identifying an event processor.
virtual void setEditing (bool)
 Set to true if in edit mode.
virtual void setCreating (bool)
 Set to be creating.
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
- 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 void changeAltitudeWithWheel (int wheelSteps)
 change altitude with alt-mousewheel
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).
virtual void cancel ()
 Call to cancel current operation.
virtual void setEnabled (bool)
 If enabled is false and was enabled before, signal cancel. Should not call directly.
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.
bool enabled () const

Public Attributes

boost::signal< void(double)> signal_headingChanged
 signal that the heading of the object has changed
- 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 Member Functions

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 changeHeading (double mouseX, double mouseY)
 do the work on shift-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 changeAltitude (double mouseX, double mouseY)
 do the work on alt-drag
- Protected Member Functions inherited from makVrv::DtBasicEditingEventProcessor
virtual void processMouseMove (DtChannel &channel, const DtMouseEvent &ev)

Protected Attributes

double myCurrentHeading
bool myHeadingAllowed
bool myIsHeadingDragging
bool myMouseDragging
makVrv::DtSignalConnectionManager myConnections
DtVector myStartPoint
int myDragTolerance
double myDragToleranceTime
double myDragTime
DtTimedSection myDragTimer
bool myAllowEditing
bool myFreehand
- 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
bool myCreating
- Protected Attributes inherited from makVrv::DtEventProcessorInterface
bool myEnabled

Detailed Description

Manage the tick and mouse events when editing or placing a Vrf object.

Constructor & Destructor Documentation

makVrf::DtVrfObjectManipulationEventProcessor::DtVrfObjectManipulationEventProcessor ( makVrv::DtDe )

CTOR.

virtual makVrf::DtVrfObjectManipulationEventProcessor::~DtVrfObjectManipulationEventProcessor ( )
virtual

virtual DTOR

Member Function Documentation

virtual void makVrf::DtVrfObjectManipulationEventProcessor::setCurrentHeading ( double  heading)
virtual

new objects start with an intial heading of 0.

Users can choose not to provide this and add it themselves to the heading the processor reports

virtual void makVrf::DtVrfObjectManipulationEventProcessor::setHeadingAllowed ( bool  )
virtual

Sets whether or not heading changes are allowed. Default is false.

virtual bool makVrf::DtVrfObjectManipulationEventProcessor::headingAllowed ( ) const
virtual
virtual double makVrf::DtVrfObjectManipulationEventProcessor::currentHeading ( ) const
virtual

get the current heading. Initial heading plus changes due the shift-dragging

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

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

Reimplemented from makVrv::DtBasicEditingEventProcessor.

virtual void makVrf::DtVrfObjectManipulationEventProcessor::setEditing ( bool  )
virtual

Set to true if in edit mode.

virtual void makVrf::DtVrfObjectManipulationEventProcessor::setCreating ( bool  )
virtual

Set to be creating.

Reimplemented from makVrv::DtBasicEditingEventProcessor.

virtual void makVrf::DtVrfObjectManipulationEventProcessor::setDragTolerance ( int  )
virtual

Set as the minimum distance the mouse needs to move to consider it to be a terrain drag from the mouse down location.

Default is a distance of 8 pixels

virtual int makVrf::DtVrfObjectManipulationEventProcessor::dragTolerance ( ) const
virtual
virtual void makVrf::DtVrfObjectManipulationEventProcessor::setFreehand ( bool  )
virtual

Sets freehand mode.

If true will emit a place signal every time the mouse moves and the left mouse button is pressed. Default is false

virtual bool makVrf::DtVrfObjectManipulationEventProcessor::freehand ( ) const
virtual
void makVrf::DtVrfObjectManipulationEventProcessor::setDragToleranceTime ( double  )

Along with move tolerance, the amount of time the mouse has to be pressed before initiating a terrain drag.

This will help with rapid mouse clicks to create entities. Time is in seconds.

double makVrf::DtVrfObjectManipulationEventProcessor::dragToleranceTime ( ) const
virtual bool makVrf::DtVrfObjectManipulationEventProcessor::processMouseEvent ( const makVrv::DtMouseEvent ev,
makVrv::DtChannel channel 
)
protectedvirtual

process mouse events

Reimplemented from makVrv::DtBasicEditingEventProcessor.

virtual bool makVrf::DtVrfObjectManipulationEventProcessor::processKeyboardEvent ( const makVrv::DtKeyEvent ev,
makVrv::DtChannel channel 
)
protectedvirtual

Processes a keyboard event on the channel.

Should return true if the event is handled successfully, and false to reject it and pass it on to the next event processor.

Reimplemented from makVrv::DtBasicEditingEventProcessor.

virtual void makVrf::DtVrfObjectManipulationEventProcessor::changeHeading ( double  mouseX,
double  mouseY 
)
protectedvirtual

do the work on shift-drag

virtual bool makVrf::DtVrfObjectManipulationEventProcessor::pick ( makVrv::DtChannel channel,
double  x,
double  y,
makVrv::DtIntersectorResult result,
makVrv::DtIntersector::IntersectProperties  props 
) const
protectedvirtual

Call intersector to pick into scene to get terrain intersection.

Reimplemented from makVrv::DtBasicEditingEventProcessor.

virtual void makVrf::DtVrfObjectManipulationEventProcessor::cleanupTerrainDraggingVaraibles ( )
protectedvirtual
virtual bool makVrf::DtVrfObjectManipulationEventProcessor::placePoint ( makVrv::DtChannel channel,
const makVrv::DtMouseEvent  
)
protectedvirtual

If creating or dragging signal to place the point and return true, else return false.

virtual void makVrf::DtVrfObjectManipulationEventProcessor::changeAltitude ( double  mouseX,
double  mouseY 
)
protectedvirtual

do the work on alt-drag

Reimplemented from makVrv::DtBasicEditingEventProcessor.

Member Data Documentation

boost::signal<void ( double )> makVrf::DtVrfObjectManipulationEventProcessor::signal_headingChanged

signal that the heading of the object has changed

double makVrf::DtVrfObjectManipulationEventProcessor::myCurrentHeading
protected
bool makVrf::DtVrfObjectManipulationEventProcessor::myHeadingAllowed
protected
bool makVrf::DtVrfObjectManipulationEventProcessor::myIsHeadingDragging
protected
bool makVrf::DtVrfObjectManipulationEventProcessor::myMouseDragging
protected
makVrv::DtSignalConnectionManager makVrf::DtVrfObjectManipulationEventProcessor::myConnections
protected
DtVector makVrf::DtVrfObjectManipulationEventProcessor::myStartPoint
protected
int makVrf::DtVrfObjectManipulationEventProcessor::myDragTolerance
protected
double makVrf::DtVrfObjectManipulationEventProcessor::myDragToleranceTime
protected
double makVrf::DtVrfObjectManipulationEventProcessor::myDragTime
protected
DtTimedSection makVrf::DtVrfObjectManipulationEventProcessor::myDragTimer
protected
bool makVrf::DtVrfObjectManipulationEventProcessor::myAllowEditing
protected
bool makVrf::DtVrfObjectManipulationEventProcessor::myFreehand
protected

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

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)