| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tlp::GlScene Class Reference Tulip scene class. More...
Public Member Functions
Detailed DescriptionTulip scene class. The GlScene class is the core of the tulip rendering system This class is used to render entities and graph in OpenGL If you want to render entities and graph, you have to use GlLayer system. You just have to create GlLayer and add entities in.
GlLayer *mainLayer=new GlLayer("Main"); GlGraphComposite *graphComposite=new GlGraphComposite(graph); mainLayer->addGlEntity(graphComposite,"graph"); GlLayer *otherLayer=new GlLayer("Other"); GlCircle *circle=new GlCircle(); otherLayer->addGlEntity(circle,"circle"); glScene.addLayer(mainLayer); glScene.addLayer(otherLayer); glScene.addGlGraphCompositeInfo(mainLayer,graphComposite); glScene.centerScene(); glScene.draw(); If you want to create a widget with a visualisation is better to use GlMainWidget class (this class use a GlScene inside) Constructor & Destructor Documentation
Constructor By default GlScene use a GlCPULODCalculator to compute LOD but you can change this default lod calculator, to do that : put your calculator in constructor parameters Available calculators are : GlCPULODCalculator and GlQuadTreeLODCalculator. Member Function Documentation
This function must be call when you had a glGraphComposite in a layer in the scene
Add a layer in the scene The layer name is contain in the GlLayer object
Ajust camera to have entities near borders
Center scene to have all the visibles entities displayed
Clear layers list Layers will not be deleted in this function
Compute informations for ajustSceneToSize
Draw the scene, this function is the most important function of GlScene. If you want to render a scene into an OpenGL widget : call this function
Get the background color of the scene
Return the bouding box of the scene (in 3D coordinates)
Return lod calculator used to render this scene
At default the most important layer is the layer with name : "main" This function return the camera of this layer
Return the current GlGraphComposite used by the scene
Return the layer containing the current GlGraphComposite
Return the RGB image of OpenGL view
Return the layer with name : name
Return the layer list
Get the viewport of the scene The viewport must be in many case the size of the widget containing the scene
Get a zoom level and a xDec/yDec, this parameters change viewport of the scene
Get XML description of the scene and children and store it in out string
Init scene's OpenGL parameters, this function is call when you do a draw
Add a layer just after layer with given name Return true if insert is ok and false if layer with given name is not find
Add a layer just before layer with given name Return true if insert is ok and false if layer with given name is not find
Scene is render in orthogonal mode ?
This function is called by GlComposite to send entity modification event
This function is called by GlLayer and GlComposite to send layer modification event
Output the scene in EPS
Output the scene in SVG
Prerender meta nodes, this function create data structure and render meta nodes to futur use
Remove the layer with name and delete it (if bool deleteLayer == true)
Remove a layer and delete it (if bool deleteLayer == true)
Rotate camera by (x,y,z) with : x : rotation over X axis in degree y : rotation over Y axis in degree z : rotation over Z axis in degree
Select entities with selection flag : type (SelectSimpleEntities,SelectNodes,SelectEdges) Select at position x,y with heigh : h and width : w Select in GlLayer : layer And store result in selectedEntities vector
Set the background color of the scene
Set a new lod calculator used to render this scene
At default the most important layer is the layer with name : "main" This function set the camera of this layer
If true, color buffer will not be cleared before drawing the scene.
Render the nodes/edges label
Set if scene is render in orthogonal mode
Set the viewport of the scene with a vector The viewport must be in many case the size of the widget containing the scene
Set the viewport of the scene with 4 int The viewport must be in many case the size of the widget containing the scene
Set a zoom level and a xDec/yDec, this parameters change viewport of the scene
Set scene's data and children with a XML
Translate camera by (x,y,z)
Zoom to given world coordinate
Zoom
Zoom to given x,y screen coordinates |
Tulip Software by LaBRI Visualization Team 2001 - 2012 |