00001 /* 00002 * $Revision: 1.5 $ 00003 * 00004 * last checkin: 00005 * $Author: gutwenger $ 00006 * $Date: 2007-11-08 21:07:51 +0100 (Do, 08 Nov 2007) $ 00007 ***************************************************************/ 00008 00052 #ifdef _MSC_VER 00053 #pragma once 00054 #endif 00055 00056 00057 #ifndef OGDF_PLANAR_STRAIGHT_LAYOUT_H 00058 #define OGDF_PLANAR_STRAIGHT_LAYOUT_H 00059 00060 00061 #include <ogdf/module/GridLayoutModule.h> 00062 #include <ogdf/basic/ModuleOption.h> 00063 #include <ogdf/module/AugmentationModule.h> 00064 #include <ogdf/module/ShellingOrderModule.h> 00065 00066 00067 namespace ogdf { 00068 00069 class ShellingOrder; 00070 00136 class PlanarStraightLayout : public PlanarGridLayoutModule 00137 { 00138 public: 00140 PlanarStraightLayout(); 00141 00142 ~PlanarStraightLayout() { } 00143 00144 00156 bool sizeOptimization() const { return m_sizeOptimization; } 00157 00159 void sizeOptimization(bool opt) { m_sizeOptimization = opt; } 00160 00168 double baseRatio() const { return m_baseRatio; } 00169 00171 void baseRatio(double ratio) { m_baseRatio = ratio; } 00172 00173 00185 void setAugmenter(AugmentationModule *pAugmenter) { 00186 m_augmenter.set(pAugmenter); 00187 } 00188 00190 void setShellingOrder(ShellingOrderModule *pOrder){ 00191 m_computeOrder.set(pOrder); 00192 } 00193 00195 00196 private: 00197 bool m_sizeOptimization; 00198 double m_baseRatio; 00199 00200 ModuleOption<AugmentationModule> m_augmenter; 00201 ModuleOption<ShellingOrderModule> m_computeOrder; 00202 00203 void doCall( 00204 const Graph &G, 00205 adjEntry adjExternal, 00206 GridLayout &gridLayout, 00207 IPoint &boundingBox, 00208 bool fixEmbedding); 00209 00210 void computeCoordinates(const Graph &G, 00211 ShellingOrder &lmc, 00212 NodeArray<int> &x, 00213 NodeArray<int> &y); 00214 00215 }; 00216 00217 00218 } // end namespace ogdf 00219 00220 00221 #endif