Tulip 5.7.1
Large graphs analysis and drawing
Loading...
Searching...
No Matches
tlp::SelectedEntity Struct Reference

#include <GlScene.h>

Public Types

enum  SelectedEntityType { UNKNOW_SELECTED = 0 , NODE_SELECTED = 1 , EDGE_SELECTED = 2 , SIMPLE_ENTITY_SELECTED = 3 }
 

Public Member Functions

 SelectedEntity (GlSimpleEntity *entity)
 
 SelectedEntity (Graph *graph, unsigned int id, SelectedEntityType type)
 
GraphgetComplexEntityGraph () const
 
unsigned int getComplexEntityId () const
 
edge getEdge () const
 
SelectedEntityType getEntityType () const
 
node getNode () const
 
GlSimpleEntitygetSimpleEntity () const
 

Protected Attributes

union {
GraphcomplexEntityGraph
 
GlSimpleEntitysimpleEntity
 
}; 
 
unsigned int complexEntityId
 
SelectedEntityType entityType
 

Detailed Description

Structure to store selected entities.

After a selection, objects of SelectedEntity is returned To use this object the first thing to do is to call getEntity type to know the type of Entity After that you can :

  • Get the GlSimpleEntity pointer (getSimpleEntity())
  • Get the id of node/edge and the graph associated (getComplexEntityId() and getComplexEntityGraph())
Examples
interactor_plugin/interactor_plugin.cpp.

Definition at line 50 of file GlScene.h.

Member Enumeration Documentation

◆ SelectedEntityType

enum tlp::SelectedEntity::SelectedEntityType

Definition at line 52 of file GlScene.h.

Constructor & Destructor Documentation

◆ SelectedEntity() [1/3]

tlp::SelectedEntity::SelectedEntity ( )
inline

Definition at line 59 of file GlScene.h.

◆ SelectedEntity() [2/3]

tlp::SelectedEntity::SelectedEntity ( GlSimpleEntity entity)
inline

Definition at line 61 of file GlScene.h.

◆ SelectedEntity() [3/3]

tlp::SelectedEntity::SelectedEntity ( Graph graph,
unsigned int  id,
SelectedEntityType  type 
)
inline

Definition at line 63 of file GlScene.h.

Member Function Documentation

◆ getComplexEntityGraph()

Graph * tlp::SelectedEntity::getComplexEntityGraph ( ) const
inline

Definition at line 78 of file GlScene.h.

◆ getComplexEntityId()

unsigned int tlp::SelectedEntity::getComplexEntityId ( ) const
inline
Examples
interactor_plugin/interactor_plugin.cpp.

Definition at line 73 of file GlScene.h.

◆ getEdge()

edge tlp::SelectedEntity::getEdge ( ) const
inline
Returns
the selected edge if the entity type is correct or an invalid edge else.

Definition at line 97 of file GlScene.h.

◆ getEntityType()

SelectedEntityType tlp::SelectedEntity::getEntityType ( ) const
inline
Examples
interactor_plugin/interactor_plugin.cpp.

Definition at line 83 of file GlScene.h.

◆ getNode()

node tlp::SelectedEntity::getNode ( ) const
inline
Returns
the selected node if the entity type is correct or an invalid node else.

Definition at line 89 of file GlScene.h.

◆ getSimpleEntity()

GlSimpleEntity * tlp::SelectedEntity::getSimpleEntity ( ) const
inline

Definition at line 68 of file GlScene.h.

Member Data Documentation

◆ complexEntityId

unsigned int tlp::SelectedEntity::complexEntityId
protected

Definition at line 107 of file GlScene.h.

◆ entityType

SelectedEntityType tlp::SelectedEntity::entityType
protected

Definition at line 108 of file GlScene.h.