Hierarchical Edge Bundle 1.0
|
00001 #pragma once 00002 //#include "HierarchyEdge.h" 00003 //#include "RelationEdge.h" 00004 #include "GUIVertex.h" 00005 #include <memory> 00006 #include <vector> 00007 #include <iostream> 00008 #include <algorithm> 00009 #include <boost/shared_ptr.hpp> 00010 00011 using glm::vec3; 00012 00018 class Vertex 00019 { 00020 public: 00021 typedef boost::shared_ptr<Vertex> VertexPtr; 00022 00026 Vertex(void); 00032 Vertex(unsigned int id, std::string name); 00036 ~Vertex(void); 00037 00038 //void SetID(unsigned int id); //Die Id sollte eigentlich immer gleich dem Key in der Map sein. 00043 unsigned int GetID(); 00048 void SetName(std::string name); 00053 std::string GetName(); 00058 void SetParentVertex(VertexPtr parent); 00063 VertexPtr GetParent(); 00068 void AddChildVertex(VertexPtr parent); 00073 unsigned int GetNumberChildVertices(); 00078 std::vector<VertexPtr> GetChildVertices(); 00084 VertexPtr GetChildVertexAt(int at); 00085 //void AddRelationEdge(RelationEdge& edge); 00086 00091 void SetHierarchyLevel(unsigned int level); 00096 unsigned int GetHierarchyLevel(); 00097 00102 void SetPathToRoot(std::vector<unsigned int> pathToRoot); 00107 std::vector<unsigned int> GetPathToRoot(); 00108 00109 bool operator<=(VertexPtr v); 00110 00111 bool operator<(VertexPtr v); 00112 00113 bool operator()(Vertex v1,Vertex v2); 00114 00115 bool operator()(VertexPtr v1,VertexPtr v2); 00116 00117 protected: 00118 unsigned int m_id; 00119 std::string m_name; 00120 00121 VertexPtr m_parent; 00122 std::vector<VertexPtr> m_childs; 00123 00124 std::vector<unsigned int> m_pathToRoot; 00125 00126 //std::vector<HierarchyEdge&> m_hierarchyedge; 00127 //std::vector<RelationEdge&> m_relationedge; 00128 00129 unsigned int m_level; 00130 };