Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00054 #ifdef _MSC_VER
00055 #pragma once
00056 #endif
00057
00058
00059 #ifndef OGDF_TUTTE_LAYOUT_H
00060 #define OGDF_TUTTE_LAYOUT_H
00061
00062 #include <ogdf/module/LayoutModule.h>
00063 #include <ogdf/basic/geometry.h>
00064 #include <ogdf/external/coin.h>
00065
00066 #ifdef USE_COIN
00067 #include <CoinPackedMatrix.hpp>
00068 #endif
00069
00070 namespace ogdf{
00071
00072 class OGDF_EXPORT TutteLayout : public LayoutModule
00073 {
00074 #ifndef USE_COIN
00075 public:
00076
00077 void call(GraphAttributes &AG){ THROW_NO_COIN_EXCEPTION; };
00078 void call(GraphAttributes &AG, const List<node>& givenNodes){ THROW_NO_COIN_EXCEPTION; };
00079
00080 };
00081
00082 #else // USE_COIN
00083 public:
00084
00085 TutteLayout();
00086 ~TutteLayout() { }
00087
00088 DRect bbox () const {
00089 return m_bbox;
00090 }
00091
00092 void bbox (const DRect &bb) {
00093 m_bbox = bb;
00094 }
00095
00096 void call(GraphAttributes &AG);
00097 void call(GraphAttributes &AG, const List<node> &givenNodes);
00098
00099
00100 private:
00101
00102 void setFixedNodes(const Graph &G, List<node> &nodes,
00103 List<DPoint> &pos, double radius = 1.0);
00110 void setFixedNodes(const Graph &G, List<node> &nodes, const List<node> &givenNodes,
00111 List<DPoint> &pos, double radius = 1.0);
00115 bool doCall(GraphAttributes &AG,
00116 const List<node> &fixedNodes,
00117 List<DPoint> &fixedPositions);
00118
00119 DRect m_bbox;
00120 };
00121
00122 #endif // USE_COIN
00123
00124 }
00125
00126 #endif // OGDF_TUTTE_LAYOUT_H