Tulip  4.7.0
Better Visualization Through Research
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Groups Pages
tulipgpu.h
1 /*
2  *
3  * This file is part of Tulip (www.tulip-software.org)
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 infos
33 // return NULL if there is no texture image unit available
34 // BooleanProperty
35 TLP_GL_SCOPE GpuProperty* genGpuProperty(tlp::BooleanProperty& property,
36  const tlp::Graph& graph,
37  GpuValueType type = NODE_VALUES,
38  bool outputOnly = false);
39 // ColorProperty
40 TLP_GL_SCOPE GpuProperty* genGpuProperty(tlp::ColorProperty& property,
41  const tlp::Graph& graph,
42  GpuValueType type = NODE_VALUES,
43  bool outputOnly = false);
44 // DoubleProperty
45 TLP_GL_SCOPE GpuProperty* genGpuProperty(tlp::DoubleProperty& property,
46  const tlp::Graph& graph,
47  GpuValueType type = NODE_VALUES,
48  bool outputOnly = false);
49 // IntegerProperty
50 TLP_GL_SCOPE GpuProperty* genGpuProperty(tlp::IntegerProperty& property,
51  const tlp::Graph& graph,
52  GpuValueType type = NODE_VALUES,
53  bool outputOnly = false);
54 // LayoutProperty (node values only)
55 TLP_GL_SCOPE GpuProperty* genGpuProperty(tlp::LayoutProperty& property,
56  const tlp::Graph& graph,
57  bool outputOnly = false);
58 // SizeProperty
59 TLP_GL_SCOPE GpuProperty* genGpuProperty(tlp::SizeProperty& property,
60  const tlp::Graph& graph,
61  GpuValueType type = NODE_VALUES,
62  bool outputOnly = false);
63 
64 // set a parameter of a GpuProgram with a Tulip specific object
65 // Color
66 TLP_GL_SCOPE bool setGpuParameter(const std::string& pName, const tlp::Color& val);
67 // Coord
68 TLP_GL_SCOPE bool setGpuParameter(const std::string& pName, const tlp::Coord& val);
69 // Size
70 TLP_GL_SCOPE bool setGpuParameter(const std::string& pName, const tlp::Size& val);
71 
72 // these are for the update of a Tulip property with the out property
73 // BooleanProperty
74 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::BooleanProperty& prop, const tlp::Graph&);
75 // ColorProperty
76 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::ColorProperty& prop, const tlp::Graph&);
77 // DoubleProperty
78 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::DoubleProperty& prop, const tlp::Graph&);
79 // IntegerProperty
80 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::IntegerProperty& prop, const tlp::Graph&);
81 // LayoutProperty
82 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::LayoutProperty& prop, const tlp::Graph&);
83 // SizeProperty
84 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::SizeProperty& prop, const tlp::Graph&);
85 
86 }
87 
88 #endif
89 ///@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...