VR-Forces 4.0.4 Class Documentation
include/vrvCore/DtFeatureSet.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2010 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile:  $ $Revision:  $ $State:  $
00007 ******************************************************************************/
00008 
00012 
00013 #pragma once
00014 #include <vrvCore/vrvCore.h>
00015 #include <vrvCore/DtFeature.h>
00016 #include <vrvCore/DtSelectionManager.h>
00017 #include <vrvUtil/DtSignalConnectionManager.h>
00018 #include <boost/unordered_set.hpp>
00019 #include <boost/unordered_map.hpp>
00020 
00021 namespace makVrv
00022 {
00023    class DtArealFeature;
00024    class DtArealFeatureVisualizer;
00025    class DtEdgeFeature;
00026    class DtEdgeFeatureVisualizer;
00027    class DtFaccCode;
00028    class DtFaccInfo;
00029    class DtFeatureSpecification;
00030    class DtPointFeature;
00031    class DtPointFeatureVisualizer;
00032 
00037    class DT_DLL_VRVCORE DtFeatureSet : public DtSignalConnectionManager
00038    {
00039    public:
00040 
00041       typedef boost::unordered_map<DtPointFeature*,DtPointFeatureVisualizer*> 
00042          PointFeatureMap;
00043 
00044       typedef boost::unordered_map<DtEdgeFeature*,DtEdgeFeatureVisualizer*> 
00045          EdgeFeatureMap;
00046 
00047       typedef boost::unordered_map<DtArealFeature*,DtArealFeatureVisualizer*> 
00048          ArealFeatureMap;
00049 
00050       typedef boost::unordered_map<DtElementID, DtFeature*> ElementFeatureMap;
00051 
00053       DtFeatureSet(DtDe& de);
00054 
00056       ~DtFeatureSet();
00057 
00059       void clear();
00060 
00062       void visualize(int modelSet);
00063 
00065       void unvisualize(int modelSet);
00066 
00068       void groundClamp();
00069 
00071       const PointFeatureMap& pointFeatures() const;
00072 
00074       const EdgeFeatureMap& linearFeatures() const;
00075 
00077       const ArealFeatureMap& arealFeatures() const;
00078 
00082       DtPointFeature* createPointFeature(DFAD::FeatureID featureId,
00083          const DtFaccCode& featureCode, 
00084          unsigned int sourceId = 0 );
00085 
00088       void destroyPointFeature(DtPointFeature* feature);
00089 
00093       DtEdgeFeature* createEdgeFeature(DFAD::FeatureID featureId,
00094          const DtFaccCode& featureCode, 
00095          unsigned int sourceId = 0 );
00096 
00099       void destroyEdgeFeature(DtEdgeFeature* feature);
00100 
00104       DtArealFeature* createArealFeature(DFAD::FeatureID featureId,
00105          const DtFaccCode& featureCode, 
00106          unsigned int sourceId = 0 );
00107 
00110       void destroyArealFeature(DtArealFeature* feature);
00111   
00113       DtFeature* findFeature(DtElementID id);
00114 
00116       bool destroyFeature(DtElementID id);
00117 
00118    protected:
00119 
00120       void slot_onFeatureInfoChanged(const DtFaccCode& code, 
00121          const DtFaccInfo& info);
00122       
00123       void slot_selectionChanged( 
00124          const DtSelectionManager::IdSet& selected, 
00125          const DtSelectionManager::IdSet& deselected, 
00126          DtSelectionManager::SelectionType newType, 
00127          DtSelectionManager::SelectionType oldType);
00128 
00129    protected:
00130 
00131       DtDe& myDe;
00132       PointFeatureMap myPointFeatures;
00133       EdgeFeatureMap myEdgeFeatures;
00134       ArealFeatureMap myArealFeatures;
00135       ElementFeatureMap myElementFeatureMap;
00136       int myModelSet;
00137    };
00138 }

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)