VR-Forces 4.0.4 Class Documentation
include/vrvCigi/DtCigiViewController.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2009 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: DtCigiViewController.h,v $ $Revision: 1.1 $ $State: Exp $
00007 *********************************************************************/
00008 
00012 
00013 #ifndef DtCigiViewController_H_
00014 #define DtCigiViewController_H_
00015 
00016 #include <vrvCigi/vrvCigi.h>
00017 #include <vrvCore/DtUniqueID.h>
00018 
00019 #include <vrvUtil/DtSignalConnectionManager.h>
00020 
00021 #include <string>
00022 #include <map>
00023 #include <set>
00024 
00025 namespace makVrv
00026 {
00027    class DtDe;
00028    class DtChannelConfiguration;
00029 
00030    class DtCigiDriver;
00031    class DtCigiConnection;
00032 
00035    class DT_DLL_VRVCIGI DtCigiViewController
00036    {
00037    public:
00039       struct DtViewDefinitionAction
00040       {
00041          int groupId;
00042          bool zNearEnabled;
00043          float zNear;
00044          bool zFarEnabled;
00045          float zFar;
00046          bool leftEnabled;
00047          float left;
00048          bool rightEnabled;
00049          float right;
00050          bool topEnabled;
00051          float top;
00052          bool bottomEnabled;
00053          float bottom;
00054       };
00055 
00057       struct DtViewControlPosition
00058       {
00059          float xOffset;
00060          float yOffset;
00061          float zOffset;
00062          float roll;
00063          float pitch;
00064          float yaw;
00065       };
00066 
00068       struct DtViewControlAction
00069       {
00070          DtUniqueID entityId;
00071          bool idIsGroup;
00072          bool xOffsetEnabled;
00073          bool yOffsetEnabled;
00074          bool zOffsetEnabled;
00075          bool rollEnabled;
00076          bool pitchEnabled;
00077          bool yawEnabled;
00078          DtViewControlPosition position;
00079       };
00080 
00082       DtCigiViewController(DtDe& de, DtCigiDriver& driver,
00083          DtCigiConnection& connection, bool usingThread);
00084 
00086       virtual ~DtCigiViewController();
00087 
00088    protected:
00090       virtual void modifyConfiguration(const std::string& displayName,
00091          const std::string& windowName, const std::string& channelName,
00092          const DtChannelConfiguration& config);
00093 
00095       virtual bool retrieveConfiguration(int viewId, std::string& displayName,
00096          std::string& windowName, std::string& channelName, DtChannelConfiguration& config);
00097 
00099       virtual void attachObserver(int viewId, DtViewControlAction action);
00100 
00102       virtual std::string viewIdKeyword(int viewId);
00103 
00105       virtual DtViewControlPosition viewControlPosition(int viewId, DtViewControlAction action);
00106 
00108       virtual void addViewToGroup(int viewId, int groupId);
00109 
00111       virtual void slot_onViewDefinitionReceived(int viewId, 
00112          DtCigiViewController::DtViewDefinitionAction action);
00113 
00115       virtual void performSetViewDefinition(int viewId, 
00116          DtCigiViewController::DtViewDefinitionAction action);
00117 
00119       virtual void slot_onViewControlReceived(int viewId, 
00120          DtCigiViewController::DtViewControlAction action);
00121 
00123       virtual void performSetViewControl(int viewId, 
00124          DtCigiViewController::DtViewControlAction action);
00125 
00126    protected:
00127       typedef std::set<int> DtViewGroup;
00128 
00129       DtDe& myDe;
00130       DtCigiDriver& myDriver;
00131       bool          myUseThreadFlag;
00132       DtSignalConnectionManager myConnections;
00133 
00134       std::map<int, DtViewControlPosition> myViewIdToPositionMap;
00135       std::map<int, DtViewGroup> myGroupIdToGroupMap;
00136    };
00137 }
00138 
00139 #endif
00140 
00141 

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)