20 #ifndef Tulip_GLGRAPHRENDERINGPARAMETERS_H
21 #define Tulip_GLGRAPHRENDERINGPARAMETERS_H
23 #include <tulip/Color.h>
24 #include <tulip/DataSet.h>
25 #include <tulip/tulipconf.h>
29 class NumericProperty;
30 class BooleanProperty;
469 return _labelsAreBillboarded;
476 _labelsAreBillboarded = billboarded;
486 _displayFilteringProperty = filteringProperty;
493 return _displayFilteringProperty;
502 bool _viewOutScreenLabel;
503 bool _elementOrdered;
504 bool _elementOrderedDescending;
505 bool _edgeColorInterpolate;
507 bool _edgeSizeInterpolate;
508 bool _edgeFrontDisplay;
511 bool _displayMetaNodes;
512 bool _elementZOrdered;
513 int _selectedNodesStencil;
514 int _selectedMetaNodesStencil;
515 int _selectedEdgesStencil;
517 int _metaNodesStencil;
519 int _nodesLabelStencil;
520 int _metaNodesLabelStencil;
521 int _edgesLabelStencil;
523 bool _labelFixedFontSize;
527 bool _labelsAreBillboarded;
528 std::string _fontsPath;
529 std::string _texturePath;
530 bool _edgesMaxSizeToNodesSize;
531 Color _selectionColor;
539 class TLP_GL_SCOPE GlDefaultSelectionColorManager {
541 static void setManager(GlDefaultSelectionColorManager *);
542 static tlp::Color getDefaultSelectionColor();
543 virtual tlp::Color defaultSelectionColor(
bool tulipDefault =
false) = 0;
546 static GlDefaultSelectionColorManager *manager;
A graph property that maps a Boolean value to graph elements.
A container that can store data from any type.
That class defines all the parameters used by GlGraphComposite to render a graph.
void setEdgesLabelStencil(const int stencil)
set stencil number for edges label
void setLabelsDensity(int density)
Set labels density.
void setMetaNodesLabelStencil(const int stencil)
set stencil number for meta-nodes label
void setFontsType(unsigned int type)
Set fonts type used in the renderer (0=3D,1=bitmap,2=texture)
void setNodesLabelStencil(const int stencil)
set stencil number for nodes label
void setMaxSizeOfLabel(int size)
Set max size of label : this max size is only used if labels are not scaled and are not rendered with...
unsigned int getFontsType() const
Return the type of fonts used in the renderer(0=3D,1=bitmap,2=texture)
int getLabelsDensity() const
Return labels -density.
void setEdge3D(const bool state)
if true use 3D displaying of edges instead of 2D lines on ALL edges
void setMetaNodesStencil(const int stencil)
set stencil number for meta-nodes
void setLabelsAreBillboarded(bool billboarded)
Set if labels are billboarded.
void setElementOrderingProperty(tlp::NumericProperty *property)
Defines which property is used for the element ordering.
bool isLabelScaled() const
return if labels are scaled to node size
void setSelectedNodesStencil(const int stencil)
set stencil number for selected nodes
void setElementZOrdered(const bool state)
If true node and edges are ordered according to the distance with camera.
int getMaxSizeOfLabel() const
return max size of label : this max size is only used if labels are not scaled and are not rendered w...
void setParameters(const DataSet &)
Set parameters with a DataSet structure.
void setSelectedMetaNodesStencil(const int stencil)
set stencil number for selected meta-nodes
bool isLabelFixedFontSize() const
return if labels are rendered with a fixed font size (dynamic size otherwise)
void setTexturePath(const std::string &path)
Set the path for the texture loading.
int getMetaNodesLabelStencil() const
get stencil number for meta-nodes label
bool isEdgeColorInterpolate() const
Return true if color interpolation is activated.
void setSelectedEdgesStencil(const int stencil)
set stencil number for selected edges
void setViewMetaLabel(const bool state)
If true and if labels are activated label inside meta nodes will be displayed.
bool isViewNodeLabel() const
Return true if drawing of nodes' labels is activated.
bool isDisplayEdges() const
Return true if edges are displayed.
void setViewArrow(const bool state)
Activate or deactivate displaying of arrows along the graph's edges.
int getSelectedNodesStencil() const
get stencil number for selected nodes
bool isElementZOrdered() const
return true if element Z ordering is activated
void setDisplayNodes(const bool state)
If true nodes are displayed.
void setMinSizeOfLabel(int size)
Set min size of label : this min size is only used if labels are not scaled and are not rendered with...
void setElementOrdered(const bool state)
If true node and edges are ordered according to the element ordering property (default to viewMetric)
tlp::NumericProperty * getElementOrderingProperty() const
Gets the property used for element ordering. Setting it to nullptr will use viewMetric if the orderin...
bool isViewMetaLabel() const
Return the true if viewMetaLabels is enable else false.
void setDisplayEdges(const bool state)
If true edges are displayed.
bool isDisplayNodes() const
Return true if nodes are displayed.
void setViewEdgeLabel(const bool state)
Activate or deactivate displaying of labels on nodes.
void setLabelScaled(bool state)
void setEdgesStencil(const int stencil)
set stencil number for edges
void setSelectionColor(const Color &color)
Change the selection color.
bool isElementOrderedDescending() const
Returns true if the nodes and edges are sorted in descending order when the element ordering is activ...
void setViewOutScreenLabel(const bool state)
Activate or deactivate displaying of labels outside the screen.
Color getSelectionColor() const
return the selection color
int getMetaNodesStencil() const
get stencil number for meta-nodes
void setElementOrderedDescending(const bool state)
If true (default value) nodes and edges are sorted in descending order according to the element order...
void setDisplayFilteringProperty(BooleanProperty *filteringProperty)
This property is use to filter nodes/edges rendering. If this property is false, the node/edge will b...
int getSelectedMetaNodesStencil() const
get stencil number for selected meta-nodes
bool isEdgeSizeInterpolate() const
Return true if color interpolation is activated.
void setAntialiasing(const bool state)
activate or deactivate anlialiasing
bool isViewOutScreenLabel() const
Return true if drawing of outscreen labels is activated.
bool getEdgesMaxSizeToNodesSize() const
return if Edge max size is block to node size
int getNodesStencil() const
get stencil number for nodes
bool isAntialiased() const
Return true if antialiasing is activated else false.
void setLabelFixedFontSize(bool state)
void setEdgeFrontDisplay(const bool state)
Activate or deactivate edge display in front of the scene.
int getNodesLabelStencil() const
get stencil number for nodes label
void setEdgesMaxSizeToNodesSize(const bool b)
set if Edge max size is block to node size
void setEdgeColorInterpolate(const bool state)
Activate or deactivate interpolation of nodes colors along edge.
BooleanProperty * getDisplayFilteringProperty() const
Get the Boolean property use to filter the rendering of nodes/edges.
void setNodesStencil(const int stencil)
set stencil number for nodes
int getSelectedEdgesStencil() const
get stencil number for selected edges
int getEdgesStencil() const
get stencil number for edges
bool isEdge3D() const
return true if 3D drawing of edges is activated
bool isEdgeFrontDisplay() const
Return true if edge display in front of the scene is activated.
int getMinSizeOfLabel() const
return min size of label : this min size is only used if labels are not scaled and are not rendered w...
bool isViewArrow() const
Return true if arrows drawing is activated else false.
bool isElementOrdered() const
Returns true if element ordering is activated.
int getEdgesLabelStencil() const
get stencil number for edges label
DataSet getParameters() const
Get parameters into a DataSet structure.
bool isDisplayMetaNodes() const
Return true if meta-nodes are displayed.
bool isViewEdgeLabel() const
Return true if drawing of nodes' labels is activated.
void setEdgeSizeInterpolate(const bool state)
Activate or deactivate interpolation of nodes colors along edge.
void setViewNodeLabel(const bool state)
Activate or deactivate displaying of labels on nodes.
void setFontsPath(const std::string &path)
Set the absolute path used for the fonts loading.
std::string getFontsPath() const
Return the absolute path used for the fonts loading.
std::string getTexturePath() const
Return the absolute path used for texture loading.
GlGraphRenderingParameters()
Constructor.
bool getLabelsAreBillboarded() const
return if labels are billboarded
void setDisplayMetaNodes(const bool state)
If true meta-nodes are displayed.
Interface all numerical properties. Property values are always returned as double.