20#ifndef Tulip_GLGRAPHCOMPOSITE_H
21#define Tulip_GLGRAPHCOMPOSITE_H
23#include <tulip/GlComposite.h>
24#include <tulip/Observable.h>
25#include <tulip/GlGraphRenderingParameters.h>
26#include <tulip/GlGraphInputData.h>
27#include <tulip/GlScene.h>
105 return inputData.getGraph();
113 void acceptVisitor(GlSceneVisitor *visitor)
override;
117 virtual void acceptVisitorOnGraph(GlSceneVisitor *visitor);
119 void draw(
float lod,
Camera *camera)
override;
121 virtual void selectEntities(
Camera *camera, RenderingEntitiesFlag type,
int x,
int y,
int w,
122 int h, std::vector<SelectedEntity> &selectedEntities);
127 std::set<node> &getMetaNodes() {
131 Graph *graph = inputData.getGraph();
133 for (
auto n : graph->
nodes()) {
137 nodesModified =
false;
143 GlGraphRenderer *getRenderer() {
144 return graphRenderer;
151 void setRenderer(tlp::GlGraphRenderer *);
158 void getXML(std::string &outString)
override;
163 void setWithXML(
const std::string &inString,
unsigned int ¤tPosition)
override;
173 GlGraphInputData inputData;
179 std::set<node> metaNodes;
Tulip OpenGL camera object.
GlComposite(bool deleteComponentsInDestructor=true)
Constructor.
GlGraphInputData * getInputData()
Return the inputData use by the composite.
GlGraphComposite(Graph *graph, GlGraphRenderer *graphRenderer=nullptr)
Build a GlGraphComposite with the graph data.
void setRenderingParameters(const GlGraphRenderingParameters ¶meter)
Set the rendering parameters use for rendering.
GlGraphRenderingParameters * getRenderingParametersPointer()
Return a pointer on rendering parameters used for rendering.
void setWithXML(const std::string &inString, unsigned int ¤tPosition) override
Function to set data with inString (in XML format).
void getXML(std::string &outString) override
Function to export data in outString (in XML format).
Graph * getGraph()
Return the graph used by this GlGraphComposite.
const GlGraphRenderingParameters & getRenderingParameters()
Return a copy of rendering parameters use for rendering.
GlGraphComposite(Graph *graph, GlScene *scene)
Build a GlGraphComposite with the graph data.
~GlGraphComposite() override
Destructor.
Class used by GlGraphComposite to render the graph in OpenGL.
That class defines all the parameters used by GlGraphComposite to render a graph.
virtual const std::vector< node > & nodes() const =0
Return a const reference on the vector of nodes of the graph It is the fastest way to access to nodes...
virtual Graph * getNodeMetaInfo(const node metaNode) const =0
Gets the underlying graph of a meta node.
virtual void treatEvent(const Event &message)
This function is called when events are sent to the Listeners, and Listeners only.