![]() |
Tulip
4.6.0
Better Visualization Through Research
|
00001 /* 00002 * 00003 * This file is part of Tulip (www.tulip-software.org) 00004 * 00005 * Authors: David Auber and the Tulip development Team 00006 * from LaBRI, University of Bordeaux 00007 * 00008 * Tulip is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation, either version 3 00011 * of the License, or (at your option) any later version. 00012 * 00013 * Tulip is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 * See the GNU General Public License for more details. 00017 * 00018 */ 00019 ///@cond DOXYGEN_HIDDEN 00020 00021 #ifndef LAYOUTPROPERTYANIMATION_H_ 00022 #define LAYOUTPROPERTYANIMATION_H_ 00023 00024 #include <tulip/Coord.h> 00025 #include <tulip/CachedPropertyAnimation.h> 00026 00027 #include <vector> 00028 00029 namespace tlp { 00030 class LayoutProperty; 00031 class Graph; 00032 class BooleanProperty; 00033 00034 class TLP_QT_SCOPE LayoutPropertyAnimation: public CachedPropertyAnimation<tlp::LayoutProperty, tlp::Coord, std::vector<tlp::Coord> > { 00035 public: 00036 LayoutPropertyAnimation(tlp::Graph *g, tlp::LayoutProperty *start, tlp::LayoutProperty *end, tlp::LayoutProperty *out, 00037 tlp::BooleanProperty *selection = NULL, int frameCount = 1, bool computeNodes = true, bool computeEdges = true, QObject *parent=NULL); 00038 00039 virtual ~LayoutPropertyAnimation() {} 00040 00041 protected: 00042 virtual tlp::Coord getNodeFrameValue(const tlp::Coord &startValue, const tlp::Coord &endValue, int frame); 00043 virtual std::vector<tlp::Coord> getEdgeFrameValue(const std::vector<tlp::Coord> &startValue, const std::vector<tlp::Coord> &endValue, int frame); 00044 bool equalEdges(const std::vector<tlp::Coord> &v1, const std::vector<tlp::Coord> &v2); 00045 00046 private: 00047 std::map<std::pair<tlp::Coord,tlp::Coord>, tlp::Vector<double, 3> > steps; 00048 }; 00049 00050 } 00051 00052 #endif /* LAYOUTPROPERTYANIMATION_H_ */ 00053 ///@endcond