VR-Forces 4.0.4 Class Documentation
include/vrfGuiCore/DtVrfObjectManipulationEventProcessor.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2011 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtVrfObjectManipulationEventProcessor.h,v $ $Revision: 1.4 $ $State: Exp $
00007 ******************************************************************************/
00008 
00011 
00013 
00014 #pragma once
00015 
00016 #include <vrfGuiCore/vrfGuiCore.h>
00017 
00018 #include <boost/signal.hpp>
00019 
00020 #include <vrvCore/DtBasicEditingEventProcessor.h>
00021 #include <vrvUtil/DtVirtualBaseClass.h>
00022 #include <vrvUtil/DtSignalConnectionManager.h>
00023 
00024 #include <vrvCore/DtUniqueID.h>
00025 #include <vrvCore/DtMouseEvent.h>
00026 
00027 #include <matrix/vlVector.h>
00028 #include <matrix/vlQuaternion.h>
00029 
00030 #include <vlutil/vlPerformanceStats.h>
00031 
00032 namespace makVrf
00033 {
00035    class DT_DLL_VRFGUICORE DtVrfObjectManipulationEventProcessor : 
00036       public makVrv::DtBasicEditingEventProcessor
00037    {
00038    public:
00040       DtVrfObjectManipulationEventProcessor( makVrv::DtDe& );
00041       
00043        virtual ~DtVrfObjectManipulationEventProcessor();
00044       
00047       virtual void setCurrentHeading( double heading );
00048 
00050       virtual void setHeadingAllowed(bool);
00051       bool headingAllowed() const;
00052 
00054       virtual double currentHeading() const;
00055 
00056       virtual const std::string& className();
00057 
00059       virtual void setEditing(bool);
00060 
00062       virtual void setCreating(bool);
00063 
00066       void setDragTolerance(int);
00067       int dragTolerance() const;
00068 
00071       void setDragToleranceTime(double);
00072       double dragToleranceTime() const;
00073 
00075       boost::signal<void ( double )> signal_headingChanged;
00076 
00077    protected:
00079       virtual bool processMouseEvent(const makVrv::DtMouseEvent& ev, makVrv::DtChannel& channel);
00080 
00081       virtual bool processKeyboardEvent(const makVrv::DtKeyEvent& ev, 
00082          makVrv::DtChannel& channel);
00083   
00085       virtual void changeHeading( double mouseX, double mouseY );
00086 
00087       virtual bool pick(makVrv::DtChannel& channel, double x, double y, makVrv::DtIntersectorResult& result, 
00088          makVrv::DtIntersector::IntersectProperties props) const;
00089 
00090       virtual void cleanupTerrainDraggingVaraibles();
00091 
00092    protected:
00093       double myCurrentHeading;
00094       bool myHeadingAllowed;
00095       bool myIsHeadingDragging;
00096       bool myMouseDragging;
00097       makVrv::DtSignalConnectionManager myConnections;
00098       DtVector myStartPoint;
00099       int myDragTolerance;
00100       double myDragToleranceTime;
00101       double myDragTime;
00102       DtTimedSection myDragTimer;
00103       bool myAllowEditing;
00104    };
00105    
00106    class DT_DLL_VRFGUICORE DtVrfObjectManipulationEventProcessorCreator : 
00107       public makVrv::DtVirtualBaseClass
00108    {
00109 
00110    public:
00113       static DtVrfObjectManipulationEventProcessorCreator& instance( makVrv::DtDe& de );
00114 
00116       static void registerInstance( makVrv::DtDe& de, 
00117          DtVrfObjectManipulationEventProcessorCreator* instance);     
00118       
00120       virtual DtVrfObjectManipulationEventProcessor* create( makVrv::DtDe& de );
00121    };
00122 }

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)