Overview     Modules     Class Hierarchy     Classes     Members  

tlp::LayoutProperty Class Reference
[Properties]

#include <LayoutProperty.h>

Inheritance diagram for tlp::LayoutProperty:
Collaboration diagram for tlp::LayoutProperty:

List of all members.

Public Member Functions

Static Public Attributes

Protected Member Functions

Friends


Constructor & Destructor Documentation

tlp::LayoutProperty::LayoutProperty ( Graph graph,
std::string  name = "" 
)

LayoutProperty constructor

Parameters:
graph The graph on wich to attach that layout property
name The string identifier of that layout property

Member Function Documentation

std::vector<double> tlp::LayoutProperty::angularResolutions ( const node  n,
const Graph subgraph = NULL 
) const

Returns a vector of all angular resolution of a node. It is only defined for 2D drawing, meaning the third coordinate is omitted

Parameters:
n the graph node on which to compute the angular resolution
subgraph If not null, only computes the average angular resolution for the node in that sub-graph
double tlp::LayoutProperty::averageAngularResolution ( const node  n,
const Graph subgraph = NULL 
) const

Returns the average angular resolution of a node. It is only defined for 2D drawing, meaning the third coordinate is omitted

Parameters:
n the graph node on which to compute the angular resolution
subgraph If not null, only computes the average angular resolution for the node in that sub-graph
double tlp::LayoutProperty::averageAngularResolution ( const Graph subgraph = NULL  )  const

Returns the average angular resolution of the layout. It is only defined for 2D drawing, meaning the third coordinate is omitted

Parameters:
subgraph It not null, only computes the average angular resolution for that sub-graph
double tlp::LayoutProperty::averageEdgeLength ( const Graph subgraph = NULL  )  const

Returns the average edge length of the layout, the bends are taken into account

Parameters:
subgraph If not null, only compute the average edge length for that sub-graph
void tlp::LayoutProperty::center ( const Vec3f newCenter,
Graph subgraph = NULL 
)

Centers the layout to newCenter, meaning translating it in order that the center of its bounding box is equal to newCenter

Parameters:
newCenter the coordinate of the new layout center
subgraph If not null, only centers the layout of that sub-graph
void tlp::LayoutProperty::center ( Graph subgraph = NULL  ) 

Centers the layout, meaning translating it in order that the center of its bounding box is (0,0,0)

Parameters:
subgraph If not null, only centers the layout of that sub-graph
virtual void tlp::LayoutProperty::clone_handler ( AbstractProperty< PointType, LineType, LayoutAlgorithm > &   )  [protected, virtual]
PropertyInterface* tlp::LayoutProperty::clonePrototype ( Graph ,
const std::string &   
) [virtual]

Creates an object of the same real type of the current property, in the the graph (first parameter) with the name (second parameter). Values are not copied.

Implements tlp::PropertyInterface.

void tlp::LayoutProperty::computeEmbedding ( const node  n,
Graph subgraph = NULL 
)

Fixes embedding of the node according to the layout ie. sort edges around the node according to its neighbors/bends position in the layout/ Only work in 2D, the third coordinate is not taken into account.

Parameters:
n the graph node on which to fix embedding
subgraph If not null, only fixes the embedding of the node in that sub-graph
void tlp::LayoutProperty::computeEmbedding ( Graph subgraph = NULL  ) 

Fixes embedding of the graph according to the layout ie. sort edges around nodes according to their neighbors/bends position in the layout/ Only works in 2D, the third coordinate is not taken into account.

Parameters:
subgraph It not null, only fixes embedding in that sub-graph
unsigned int tlp::LayoutProperty::crossingNumber (  )  const

Returns the number of crossings in the layout

double tlp::LayoutProperty::edgeLength ( const edge  e  )  const

Returns the length of an edge, the bends are taken into account. Thus, it measure the length of a polyline.

Parameters:
e the graph edge on which to compute its length
Warning:
this function only measure the length of the polyline between bends, when using curves like Bézier etc... the result will not be the length of the curve.
Coord tlp::LayoutProperty::getMax ( Graph subgraph = NULL  ) 

Returns the maximum coordinate of the layout, i.e. the top-right corner of the induced bounding box

Parameters:
subgraph If not null, returns the maximum coordinate for a sub-graph layout
Coord tlp::LayoutProperty::getMin ( Graph subgraph = NULL  ) 

Returns the minimum coordinate of the layout, i.e. the bottom-left corner of the induced bounding box

Parameters:
subgraph If not null, returns the minimum coordinate for a sub-graph layout
std::string tlp::LayoutProperty::getTypename (  )  const [inline, virtual]

Returns a string describing the type of the property. i.e. "graph", "double", "layout", "string", "integer", "color", "size", ...

Implements tlp::PropertyInterface.

void tlp::LayoutProperty::normalize ( Graph subgraph = NULL  ) 

Normalizes the layout, meaning dividing each nodes and edges coordinate by the maximum magnitude of the whole coordinates set

Parameters:
subgraph If not null, only normalizes the layout of that sub-graph
void tlp::LayoutProperty::perfectAspectRatio (  ) 

Scales the layout in order to approach an aspect ratio (width / height) of 1.0 .

void tlp::LayoutProperty::rotateX ( const double &  alpha,
Iterator< node > *  itNodes,
Iterator< edge > *  itEdges 
)

Rotates the layout around the X-axis of the nodes and edges provided through iterators according to an angle in degrees.

Parameters:
alpha an angle in degrees
itNodes an iterator on graph nodes
itEdges an iterator on graph edges
Warning:
The iterators are not deleted
void tlp::LayoutProperty::rotateX ( const double &  alpha,
Graph subgraph = NULL 
)

Rotates the layout around the X-axis according to an angle in degrees.

Parameters:
alpha an angle in degrees
subgraph If not null, only rotates the layout of that sub-graph
void tlp::LayoutProperty::rotateY ( const double &  alpha,
Iterator< node > *  itNodes,
Iterator< edge > *  itEdges 
)

Rotates the layout around the Y-axis of the nodes and edges provided through iterators according to an angle in degrees.

Parameters:
alpha an angle in degrees
itNodes an iterator on graph nodes
itEdges an iterator on graph edges
Warning:
The iterators are not deleted
void tlp::LayoutProperty::rotateY ( const double &  alpha,
Graph subgraph = NULL 
)

Rotates the layout around the Y-axis according to an angle in degrees.

Parameters:
alpha an angle in degrees
subgraph If not null, only rotates the layout of that sub-graph
void tlp::LayoutProperty::rotateZ ( const double &  alpha,
Iterator< node > *  itNodes,
Iterator< edge > *  itEdges 
)

Rotates the layout around the Z-axis of the nodes and edges provided through iterators according to an angle in degrees.

Parameters:
alpha an angle in degrees
itNodes an iterator on graph nodes
itEdges an iterator on graph edges
Warning:
The iterators are not deleted
void tlp::LayoutProperty::rotateZ ( const double &  alpha,
Graph subgraph = NULL 
)

Rotates the layout around the Z-axis according to an angle in degrees.

Parameters:
alpha an angle in degrees
subgraph If not null, only rotates the layout of that sub-graph
void tlp::LayoutProperty::scale ( const Vec3f scaleFactors,
Iterator< node > *  itNodes,
Iterator< edge > *  itEdges 
)

Scales the layout of a set of nodes and edges provided through iterators according to a vector of scale factors (sx, sy, sz).

Parameters:
scaleFactors a vector of scale factors
itNodes an iterator on graph nodes
itEdges an iterator on graph edges
Warning:
The iterators are not deleted
void tlp::LayoutProperty::scale ( const Vec3f scaleFactors,
Graph subgraph = NULL 
)

Scales the current layout according to a vector of scale factors (sx, sy, sz).

Parameters:
scaleFactors a vector of scale factors
subgraph If not null, only scales the layout of that sub-graph
virtual void tlp::LayoutProperty::setAllEdgeValue ( const std::vector< Coord > &  v  )  [virtual]
virtual void tlp::LayoutProperty::setAllNodeValue ( const Coord v  )  [virtual]
virtual void tlp::LayoutProperty::setEdgeValue ( const   edge,
const std::vector< Coord > &  v 
) [virtual]
virtual void tlp::LayoutProperty::setNodeValue ( const   node,
const Coord v 
) [virtual]
void tlp::LayoutProperty::translate ( const Vec3f move,
Iterator< node > *  itNodes,
Iterator< edge > *  itEdges 
)

Translates the layout of a set of nodes and edges provided through iterators according to a movement vector

Parameters:
move a movement vector
itNodes an iterator on graph nodes
itEdges an iterator on graph edges
Warning:
The iterators are not deleted
void tlp::LayoutProperty::translate ( const Vec3f move,
Graph subgraph = NULL 
)

Translates the current layout according to a movement vector

Parameters:
move a movement vector
subgraph If not null, only translates the layout of that sub-graph

Friends And Related Function Documentation

friend class LayoutAlgorithm [friend]

Member Data Documentation

const std::string tlp::LayoutProperty::propertyTypename [static]


Tulip Software by LaBRI Visualization Team    2001 - 2012