Tulip 6.1.0
Large graphs analysis and drawing
Loading...
Searching...
No Matches
tlp::GlGraphComposite Class Reference

#include <GlGraphComposite.h>

Inheritance diagram for tlp::GlGraphComposite:
Collaboration diagram for tlp::GlGraphComposite:

Public Member Functions

 GlGraphComposite (Graph *graph, GlGraphRenderer *graphRenderer=nullptr)
 GlGraphComposite (Graph *graph, GlScene *scene)
 ~GlGraphComposite () override
Graph * getGraph ()
GlGraphInputData * getInputData ()
const GlGraphRenderingParameters & getRenderingParameters ()
GlGraphRenderingParameters * getRenderingParametersPointer ()
void getXML (std::string &outString) override
void setRenderingParameters (const GlGraphRenderingParameters &parameter)
void setWithXML (const std::string &inString, unsigned int &currentPosition) override
Public Member Functions inherited from tlp::GlComposite
 GlComposite (bool deleteComponentsInDestructor=true)
 ~GlComposite () override
void addGlEntity (GlSimpleEntity *entity, const std::string &key)
void deleteGlEntity (const std::string &key, bool informTheEntity=true)
void deleteGlEntity (GlSimpleEntity *entity, bool informTheEntity=true)
GlSimpleEntity * findGlEntity (const std::string &key)
std::string findKey (GlSimpleEntity *entity)
const std::map< std::string, GlSimpleEntity * > & getGlEntities () const
void reset (bool deleteElems)
void setDeleteComponentsInDestructor (bool deleteComponentsInDestructor)
void setStencil (int stencil) override
void translate (const Coord &mouvement) override
Public Member Functions inherited from tlp::GlSimpleEntity
 GlSimpleEntity ()
 ~GlSimpleEntity () override
virtual void draw (float lod, Camera *camera)=0
virtual BoundingBox getBoundingBox ()
int getStencil ()
bool isVisible () const
virtual void setVisible (bool visible)
Public Member Functions inherited from tlp::Observable
void addListener (Observable &listener) const
void addListener (Observable *const listener) const
void addObserver (Observable &observer) const
void addObserver (Observable *const observer) const
unsigned int countListeners () const
unsigned int countObservers () const
unsigned int getReceived () const
unsigned int getSent () const
void removeListener (Observable &listener) const
void removeListener (Observable *const listener) const
void removeObserver (Observable &observer) const
void removeObserver (Observable *const observer) const

Protected Attributes

GlGraphRenderer * graphRenderer
GlGraphInputData inputData
std::set< node > metaNodes
bool nodesModified
GlGraphRenderingParameters parameters
Graph * rootGraph
Protected Attributes inherited from tlp::GlComposite
std::list< GlSimpleEntity * > _sortedElements
bool deleteComponentsInDestructor
std::map< std::string, GlSimpleEntity * > elements
std::vector< GlLayer * > layerParents
Protected Attributes inherited from tlp::GlSimpleEntity
BoundingBox boundingBox
std::vector< GlComposite * > parents
int stencil
bool visible

Additional Inherited Members

Static Public Member Functions inherited from tlp::Observable
static void disableEventNotification ()
static void enableEventNotification ()
static tlp::node getNode (const tlp::Observable *obs)
static Observable * getObject (tlp::node n)
static const tlp::VectorGraph & getObservableGraph ()
static unsigned int getScheduled (tlp::node n)
static void holdObservers ()
static bool isAlive (tlp::node n)
static unsigned int observersHoldCounter ()
static void unholdObservers ()
Protected Member Functions inherited from tlp::Observable
 Observable (const Observable &)
bool hasOnlookers () const
void observableDeleted ()
Observable & operator= (const Observable &)
void sendEvent (const Event &message)
virtual void treatEvent (const Event &message)
virtual void treatEvents (const std::vector< Event > &events)

Detailed Description

Class use to visualize graph in OpenGL Tulip engine.

GlSimpleEntity specialisation used to visualize graph in GlScene system

See also
GlSimpleEntity
GlScene

To visualize graph you have to create a new GlGraphComposite and add it to a GlLayer of a GlScene After that you can change some visualize parameters throw GlGraphRenderingParameters class

See also
GlGraphRenderingParameters
getRenderingParametersPointer()

To render the graph in OpenGL, GlGraphComposite use a GlGraphRenderer. So if you want to change the system to render the graph, you have to create a new GlGraphRender

See also
GlGraphRenderer

Definition at line 51 of file GlGraphComposite.h.

Constructor & Destructor Documentation

◆ GlGraphComposite() [1/2]

tlp::GlGraphComposite::GlGraphComposite ( Graph * graph,
GlGraphRenderer * graphRenderer = nullptr )

Build a GlGraphComposite with the graph data.

You can specify a GlGraphRenderer, if you don't do this a GlGraphHighDetailsRenderer will be used to display the graph

◆ GlGraphComposite() [2/2]

tlp::GlGraphComposite::GlGraphComposite ( Graph * graph,
GlScene * scene )

Build a GlGraphComposite with the graph data.

Is better to use the other one constructor

This graph composite is associated to the scene passed in parameter

◆ ~GlGraphComposite()

tlp::GlGraphComposite::~GlGraphComposite ( )
override

Destructor.

Member Function Documentation

◆ getGraph()

Graph * tlp::GlGraphComposite::getGraph ( )
inline

Return the graph used by this GlGraphComposite.

Definition at line 104 of file GlGraphComposite.h.

◆ getInputData()

GlGraphInputData * tlp::GlGraphComposite::getInputData ( )

Return the inputData use by the composite.

In GlGraphInputData you have properties used to render the graph

◆ getRenderingParameters()

const GlGraphRenderingParameters & tlp::GlGraphComposite::getRenderingParameters ( )

Return a copy of rendering parameters use for rendering.

So after you have to call setRenderingParameters

◆ getRenderingParametersPointer()

GlGraphRenderingParameters * tlp::GlGraphComposite::getRenderingParametersPointer ( )

Return a pointer on rendering parameters used for rendering.

With this function you don't have to call setRenderingParameters() function

◆ getXML()

void tlp::GlGraphComposite::getXML ( std::string & outString)
overridevirtual

Function to export data in outString (in XML format).

Reimplemented from tlp::GlComposite.

◆ setRenderingParameters()

void tlp::GlGraphComposite::setRenderingParameters ( const GlGraphRenderingParameters & parameter)

Set the rendering parameters use for rendering.

◆ setWithXML()

void tlp::GlGraphComposite::setWithXML ( const std::string & inString,
unsigned int & currentPosition )
overridevirtual

Function to set data with inString (in XML format).

Reimplemented from tlp::GlComposite.

Here is the call graph for this function:

Member Data Documentation

◆ graphRenderer

GlGraphRenderer* tlp::GlGraphComposite::graphRenderer
protected

Definition at line 176 of file GlGraphComposite.h.

◆ inputData

GlGraphInputData tlp::GlGraphComposite::inputData
protected

Definition at line 173 of file GlGraphComposite.h.

◆ metaNodes

std::set<node> tlp::GlGraphComposite::metaNodes
protected

Definition at line 179 of file GlGraphComposite.h.

◆ nodesModified

bool tlp::GlGraphComposite::nodesModified
protected

Definition at line 178 of file GlGraphComposite.h.

◆ parameters

GlGraphRenderingParameters tlp::GlGraphComposite::parameters
protected

Definition at line 172 of file GlGraphComposite.h.

◆ rootGraph

Graph* tlp::GlGraphComposite::rootGraph
protected

Definition at line 174 of file GlGraphComposite.h.