![]() |
VR-Forces 4.0.4 Class Documentation
|
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/DtUniqueID.h> 00016 #include <vrvCore/DtSharedModelSetSettings.h> 00017 #include <vrvCore/DtElementEntry.h> 00018 #include <vrvCore/DtBaseConnection.h> 00019 #include <vrvUtil/DtUnicode.h> 00020 #include <vrvUtil/DtSignalConnectionManager.h> 00021 #include <boost/unordered_map.hpp> 00022 00023 class DtVector; 00024 00025 namespace makVrv 00026 { 00027 class DtDe; 00028 class DtIntervisibilityVisualizerSet; 00029 class DtIntervisibilityStateListener; 00030 class DtStateVisualizer; 00031 00035 class DT_DLL_VRVCORE DtIntervisibilityElement 00036 { 00037 public: 00038 typedef boost::unordered_map<int, DtIntervisibilityVisualizerSet*> 00039 ModelSetMap; 00040 00042 DtIntervisibilityElement(DtDe& de, DtBaseConnection& connection, 00043 DtIntervisibilityStateListener&, const DtUnicode& elementDefName, 00044 DtElementEntry::ElementType type, bool distribute = true); 00045 00047 virtual ~DtIntervisibilityElement(); 00048 00050 virtual void setVisible( bool visible ); 00051 00053 bool visible() const; 00054 00057 DtElementID elementID(); 00058 00061 const DtUnicode& definition() const; 00062 00063 inline const ModelSetMap& modelSetMap() const 00064 { 00065 return myModelSetMap; 00066 } 00067 00068 DtIntervisibilityStateListener& listener() 00069 { 00070 return myListener; 00071 } 00072 00073 virtual void setSelected(bool); 00074 inline bool selected() const 00075 { 00076 return mySelected; 00077 } 00078 00081 virtual int indexOfVertex(DtUniqueID id, 00082 DtStateVisualizer*& visualizer) const; 00083 00086 virtual void setVertexSelected(int iIndex, bool); 00087 00089 virtual void visualizeModelSets(); 00090 00093 virtual void setPickable(bool); 00094 bool pickable() const; 00095 00099 virtual bool circleSelected() const; 00100 00103 virtual bool hasCircle() const; 00104 00105 protected: 00106 00108 virtual void setModelSetEnabled( int modelSet, bool enabled ); 00109 00111 virtual DtIntervisibilityVisualizerSet* createVisualizerSet( 00112 int modelSet) const; 00113 00114 protected: 00115 00116 DtDe& myDe; 00117 DtBaseConnection& myBaseConnection; 00118 DtIntervisibilityStateListener& myListener; 00119 DtUnicode myElementDefinitionName; 00120 DtSignalConnectionManager myConnections; 00121 ModelSetMap myModelSetMap; 00122 DtElementEntry::ElementType myObjectType; 00123 00124 bool myCircleMode; 00125 bool myDistribute; 00126 bool myPickable; 00127 bool mySelected; 00128 bool myVisible; 00129 }; 00130 }