Tulip  4.2.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 1 and Inria Bordeaux - Sud Ouest
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/libgpugraph.h>
25 
26 #include <tulip/Graph.h>
27 #include <tulip/Color.h>
28 #include <tulip/Coord.h>
29 #include <tulip/Size.h>
30 #include <tulip/BooleanProperty.h>
31 #include <tulip/ColorProperty.h>
32 #include <tulip/DoubleProperty.h>
33 #include <tulip/IntegerProperty.h>
34 #include <tulip/LayoutProperty.h>
35 #include <tulip/SizeProperty.h>
36 
37 namespace tlp {
38 
39 // create a GpuGraph from a Tulip graph
40 TLP_GL_SCOPE GpuGraph* genGpuGraph(const tlp::Graph& graph);
41 
42 // associate a Tulip Property to a gpu property variable
43 // and compute the needed infos
44 // return NULL if there is no texture image unit available
45 // BooleanProperty
46 TLP_GL_SCOPE GpuProperty* genGpuProperty(tlp::BooleanProperty& property,
47  const tlp::Graph& graph,
48  GpuValueType type = NODE_VALUES,
49  bool outputOnly = false);
50 // ColorProperty
51 TLP_GL_SCOPE GpuProperty* genGpuProperty(tlp::ColorProperty& property,
52  const tlp::Graph& graph,
53  GpuValueType type = NODE_VALUES,
54  bool outputOnly = false);
55 // DoubleProperty
56 TLP_GL_SCOPE GpuProperty* genGpuProperty(tlp::DoubleProperty& property,
57  const tlp::Graph& graph,
58  GpuValueType type = NODE_VALUES,
59  bool outputOnly = false);
60 // IntegerProperty
61 TLP_GL_SCOPE GpuProperty* genGpuProperty(tlp::IntegerProperty& property,
62  const tlp::Graph& graph,
63  GpuValueType type = NODE_VALUES,
64  bool outputOnly = false);
65 // LayoutProperty (node values only)
66 TLP_GL_SCOPE GpuProperty* genGpuProperty(tlp::LayoutProperty& property,
67  const tlp::Graph& graph,
68  bool outputOnly = false);
69 // SizeProperty
70 TLP_GL_SCOPE GpuProperty* genGpuProperty(tlp::SizeProperty& property,
71  const tlp::Graph& graph,
72  GpuValueType type = NODE_VALUES,
73  bool outputOnly = false);
74 
75 // set a parameter of a GpuProgram with a Tulip specific object
76 // Color
77 TLP_GL_SCOPE bool setGpuParameter(const std::string& pName, const tlp::Color& val);
78 // Coord
79 TLP_GL_SCOPE bool setGpuParameter(const std::string& pName, const tlp::Coord& val);
80 // Size
81 TLP_GL_SCOPE bool setGpuParameter(const std::string& pName, const tlp::Size& val);
82 
83 // these are for the update of a Tulip property with the out property
84 // BooleanProperty
85 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::BooleanProperty& prop, const tlp::Graph&);
86 // ColorProperty
87 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::ColorProperty& prop, const tlp::Graph&);
88 // DoubleProperty
89 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::DoubleProperty& prop, const tlp::Graph&);
90 // IntegerProperty
91 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::IntegerProperty& prop, const tlp::Graph&);
92 // LayoutProperty
93 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::LayoutProperty& prop, const tlp::Graph&);
94 // SizeProperty
95 TLP_GL_SCOPE bool getGpuOutPropertyValues(tlp::SizeProperty& prop, const tlp::Graph&);
96 
97 }
98 
99 #endif
100 ///@endcond