Tulip  5.2.0
Large graphs analysis and drawing
tulipgpu.h
1 /*
2  *
3  * This file is part of Tulip (http://tulip.labri.fr)
4  *
5  * Authors: David Auber and the Tulip development Team
6  * from LaBRI, University of Bordeaux
7  *
8  * Tulip is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation, either version 3
11  * of the License, or (at your option) any later version.
12  *
13  * Tulip is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU General Public License for more details.
17  *
18  */
19 ///@cond DOXYGEN_HIDDEN
20 
21 #ifndef TULIPGPU_H
22 #define TULIPGPU_H
23 
24 #include <tulip/tulipconf.h>
25 
26 namespace tlp {
27 
28 // create a GpuGraph from a Tulip graph
29 TLP_GL_SCOPE GpuGraph *genGpuGraph(const tlp::Graph &graph);
30 
31 // associate a Tulip Property to a gpu property variable
32 // and compute the needed info
33 // return nullptr if there is no texture image unit available
34 // BooleanProperty
35 TLP_GL_SCOPE GpuProperty *genGpuProperty(tlp::BooleanProperty &property, const tlp::Graph &graph,
36  GpuValueType type = NODE_VALUES, bool outputOnly = false);
37 // ColorProperty
38 TLP_GL_SCOPE GpuProperty *genGpuProperty(tlp::ColorProperty &property, const tlp::Graph &graph,
39  GpuValueType type = NODE_VALUES, bool outputOnly = false);
40 // DoubleProperty
41 TLP_GL_SCOPE GpuProperty *genGpuProperty(tlp::DoubleProperty &property, const tlp::Graph &graph,
42  GpuValueType type = NODE_VALUES, bool outputOnly = false);
43 // IntegerProperty
44 TLP_GL_SCOPE GpuProperty *genGpuProperty(tlp::IntegerProperty &property, const tlp::Graph &graph,
45  GpuValueType type = NODE_VALUES, bool outputOnly = false);
46 // LayoutProperty (node values only)
47 TLP_GL_SCOPE GpuProperty *genGpuProperty(tlp::LayoutProperty &property, const tlp::Graph &graph,
48  bool outputOnly = false);
49 // SizeProperty
50 TLP_GL_SCOPE GpuProperty *genGpuProperty(tlp::SizeProperty &property, const tlp::Graph &graph,
51  GpuValueType type = NODE_VALUES, bool outputOnly = false);
52 
53 // set a parameter of a GpuProgram with a Tulip specific object
54 // Color
55 TLP_GL_SCOPE bool setGpuParameter(const std::string &pName, const tlp::Color &val);
56 // Coord
57 TLP_GL_SCOPE bool setGpuParameter(const std::string &pName, const tlp::Coord &val);
58 // Size
59 TLP_GL_SCOPE bool setGpuParameter(const std::string &pName, const tlp::Size &val);
60 
61 // these are for the update of a Tulip property with the out property
62 // BooleanProperty
63 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::BooleanProperty &prop, const tlp::Graph &);
64 // ColorProperty
65 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::ColorProperty &prop, const tlp::Graph &);
66 // DoubleProperty
67 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::DoubleProperty &prop, const tlp::Graph &);
68 // IntegerProperty
69 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::IntegerProperty &prop, const tlp::Graph &);
70 // LayoutProperty
71 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::LayoutProperty &prop, const tlp::Graph &);
72 // SizeProperty
73 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::SizeProperty &prop, const tlp::Graph &);
74 }
75 
76 #endif
77 ///@endcond
A graph property that maps a boolean value to graph elements.
A graph property that maps a tlp::Size value to graph elements.
Definition: SizeProperty.h:38
A graph property that maps a double value to graph elements.
A graph property that maps a tlp::Color value to graph elements.
Definition: ColorProperty.h:36
A graph property that maps an integer value to graph elements.
A graph property that maps a tlp::Coord value to graph nodes and std::vector<tlp::Coord> for edges...