Tulip  4.4.0
Better Visualization Through Research
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Groups Pages
tlp::GlGraphComposite Class Reference

#include <GlGraphComposite.h>

Inherits tlp::GlComposite, and tlp::Observable.

Public Member Functions

 GlGraphComposite (Graph *graph, GlGraphRenderer *graphRenderer=NULL)
 
 GlGraphComposite (Graph *graph, GlScene *scene)
 
 ~GlGraphComposite ()
 
GraphgetGraph ()
 
GlGraphInputData * getInputData ()
 
const GlGraphRenderingParametersgetRenderingParameters ()
 
GlGraphRenderingParametersgetRenderingParametersPointer ()
 
virtual void getXML (std::string &outString)
 
void setRenderingParameters (const GlGraphRenderingParameters &parameter)
 
virtual void setWithXML (const std::string &inString, unsigned int &currentPosition)
 
- Public Member Functions inherited from tlp::GlComposite
 GlComposite (bool deleteComponentsInDestructor=true)
 
 ~GlComposite ()
 
void addGlEntity (GlSimpleEntity *entity, const std::string &key)
 
void deleteGlEntity (const std::string &key, bool informTheEntity=true)
 
void deleteGlEntity (GlSimpleEntity *entity, bool informTheEntity=true)
 
GlSimpleEntityfindGlEntity (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)
 
virtual void setStencil (int stencil)
 
virtual void translate (const Coord &mouvement)
 
- Public Member Functions inherited from tlp::GlSimpleEntity
 GlSimpleEntity ()
 
virtual ~GlSimpleEntity ()
 
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 *const listener) 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 *const listener) const
 
void removeObserver (Observable *const observerver) const
 

Protected Attributes

GlGraphRenderergraphRenderer
 
GlGraphInputData inputData
 
std::set< nodemetaNodes
 
bool nodesModified
 
GlGraphRenderingParameters parameters
 
GraphrootGraph
 
- 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 ObservablegetObject (tlp::node n)
 
static const tlp::VectorGraph & getObservableGraph ()
 
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 &)
 
tlp::Iterator< tlp::Observable * > * getObservables () const
 
bool hasOnlookers () const
 
void notifyObservers ()
 
void observableDeleted ()
 
Observableoperator= (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
Examples:
graph_display/graph_display.cpp.

Definition at line 50 of file GlGraphComposite.h.

Constructor & Destructor Documentation

tlp::GlGraphComposite::GlGraphComposite ( Graph graph,
GlGraphRenderer graphRenderer = NULL 
)

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

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

tlp::GlGraphComposite::~GlGraphComposite ( )

Destructor.

Member Function Documentation

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

Return the graph used by this GlGraphComposite.

Definition at line 103 of file GlGraphComposite.h.

GlGraphInputData* tlp::GlGraphComposite::getInputData ( )

Return the inputData use by the composite.

In GlGraphInputData you have properties used to render the graph

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

Return a copy of rendering parameters use for rendering.

So after you have to call setRenderingParameters

GlGraphRenderingParameters* tlp::GlGraphComposite::getRenderingParametersPointer ( )

Return a pointer on rendering parameters used for rendering.

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

Examples:
graph_display/graph_display.cpp.
virtual void tlp::GlGraphComposite::getXML ( std::string &  outString)
virtual

Function to export data in outString (in XML format)

Reimplemented from tlp::GlComposite.

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

Set the rendering parameters use for rendering.

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

Function to set data with inString (in XML format)

Reimplemented from tlp::GlComposite.