20 #ifndef TULIP_LAYOUT_H
21 #define TULIP_LAYOUT_H
23 #include <tulip/PropertyTypes.h>
24 #include <tulip/Observable.h>
25 #include <tulip/AbstractProperty.h>
26 #include <tulip/PropertyAlgorithm.h>
27 #include <tulip/minmaxproperty.h>
33 tlp::edge e,
const tlp::LineType::RealType &newValue);
36 const std::pair<tlp::Coord, tlp::Coord> &
39 class PropertyContext;
42 typedef AbstractProperty<tlp::PointType, tlp::LineType> AbstractLayoutProperty;
43 typedef MinMaxProperty<tlp::PointType, tlp::LineType> LayoutMinMaxProperty;
53 using LayoutMinMaxProperty::operator=;
56 static const std::string propertyTypename;
58 return propertyTypename;
60 DEFINE_GET_CPP_CLASS_NAME;
112 void scale(
const Vec3f &scaleFactors,
const Graph *subgraph =
nullptr);
201 void center(
const Vec3f &newCenter,
const Graph *subgraph =
nullptr);
297 tlp::StoredType<tlp::PointType::RealType>::ReturnedConstValue v)
override;
298 void setAllNodeValue(tlp::StoredType<tlp::PointType::RealType>::ReturnedConstValue v)
override;
299 void setValueToGraphNodes(tlp::StoredType<tlp::PointType::RealType>::ReturnedConstValue v,
300 const Graph *graph)
override;
301 void setEdgeValue(
const edge,
302 tlp::StoredType<tlp::LineType::RealType>::ReturnedConstValue v)
override;
303 void setAllEdgeValue(tlp::StoredType<tlp::LineType::RealType>::ReturnedConstValue v)
override;
304 void setValueToGraphEdges(tlp::StoredType<tlp::LineType::RealType>::ReturnedConstValue v,
305 const Graph *graph)
override;
311 void resetBoundingBox();
314 void treatEvent(
const Event &)
override;
318 unsigned int nbBendedEdges;
326 :
public AbstractVectorProperty<tlp::CoordVectorType, tlp::PointType> {
329 : AbstractVectorProperty<CoordVectorType, tlp::PointType>(g, n) {}
330 using AbstractVectorProperty<tlp::CoordVectorType, tlp::PointType>::operator=;
333 static const std::string propertyTypename;
335 return propertyTypename;
337 DEFINE_GET_CPP_CLASS_NAME;
340 typedef CoordVectorProperty LayoutVectorProperty;
This class extends upon PropertyInterface, and adds type-safe methods to get and set the node and edg...
A graph property that maps a std::vector<tlp::Coord> value to graph elements.
const std::string & getTypename() const override
Gets a string describing the type of the property value (e.g. "graph", "double", "layout",...
PropertyInterface * clonePrototype(Graph *, const std::string &) const override
Creates a property of the same type (e.g. tlp::DoubleProperty) in the graph. The new property will no...
Event is the base class for all events used in the Observation mechanism.
A graph property that maps a tlp::Coord value to graph nodes and std::vector<tlp::Coord> for edges.
void translate(const Vec3f &move, Iterator< node > *itNodes, Iterator< edge > *itEdges)
double averageEdgeLength(const Graph *subgraph=nullptr) const
double averageAngularResolution(const node n, const Graph *subgraph=nullptr) const
void normalize(const Graph *subgraph=nullptr)
void rotateX(const double &alpha, Iterator< node > *itNodes, Iterator< edge > *itEdges)
void perfectAspectRatio(const Graph *subgraph=nullptr)
void scale(const Vec3f &scaleFactors, const Graph *subgraph=nullptr)
const std::string & getTypename() const override
Gets a string describing the type of the property value (e.g. "graph", "double", "layout",...
std::vector< double > angularResolutions(const node n, const Graph *subgraph=nullptr) const
void computeEmbedding(const node n, Graph *subgraph=nullptr)
PropertyInterface * clonePrototype(Graph *, const std::string &) const override
Creates a property of the same type (e.g. tlp::DoubleProperty) in the graph. The new property will no...
void rotateY(const double &alpha, const Graph *subgraph=nullptr)
void scale(const Vec3f &scaleFactors, Iterator< node > *itNodes, Iterator< edge > *itEdges)
void rotateY(const double &alpha, Iterator< node > *itNodes, Iterator< edge > *itEdges)
void center(const Graph *subgraph=nullptr)
void center(const Vec3f &newCenter, const Graph *subgraph=nullptr)
void rotateX(const double &alpha, const Graph *subgraph=nullptr)
void setNodeValue(const node, tlp::StoredType< tlp::PointType::RealType >::ReturnedConstValue v) override
double averageAngularResolution(const Graph *subgraph=nullptr) const
Coord getMax(const Graph *subgraph=nullptr)
void rotateZ(const double &alpha, Iterator< node > *itNodes, Iterator< edge > *itEdges)
double edgeLength(const edge e) const
void rotateZ(const double &alpha, const Graph *subgraph=nullptr)
Coord getMin(const Graph *subgraph=nullptr)
void computeEmbedding(Graph *subgraph=nullptr)
void translate(const Vec3f &move, const Graph *subgraph=nullptr)
Abstracts the computation of minimal and maximal values on node and edge values of properties.
void updateEdgeValue(tlp::edge e, CONST_EDGE_VALUE newValue)
Updates the value on an edge, and updates the minimal/maximal cached values if necessary....
PropertyInterface describes the interface of a graph property.
Interface for Tulip iterators. Allows basic iteration operations only.
The edge struct represents an edge in a Graph object.
The node struct represents a node in a Graph object.