21 #ifndef Tulip_GLNODE_H 22 #define Tulip_GLNODE_H 24 #ifndef DOXYGEN_NOTFOR_DEVEL 27 #include <tulip/Color.h> 28 #include <tulip/Coord.h> 29 #include <tulip/Size.h> 30 #include <tulip/GlBox.h> 31 #include <tulip/GlComplexeEntity.h> 32 #include <tulip/GlLabel.h> 33 #include <tulip/GlSceneVisitor.h> 34 #include <tulip/GlGraphInputData.h> 45 class TLP_GL_SCOPE GlNode final :
public GlComplexeEntity {
52 GlNode(
unsigned int _nid = UINT_MAX,
unsigned int _npos = UINT_MAX)
53 : id(_nid), pos(_npos), oldId(UINT_MAX),
54 selectionBox(Coord(0, 0, 0), Size(1, 1, 1), Color(0, 0, 255, 255), Color(0, 255, 0, 255),
55 false, true,
"", 3) {}
60 void acceptVisitor(GlSceneVisitor *visitor)
override {
67 BoundingBox getBoundingBox(
const GlGraphInputData *data)
override;
72 void draw(
float lod,
const GlGraphInputData *data, Camera *camera)
override;
78 void drawLabel(
bool drawSelect, OcclusionTest *test,
const GlGraphInputData *data,
float lod);
83 void drawLabel(OcclusionTest *test,
const GlGraphInputData *data)
override;
88 void drawLabel(OcclusionTest *test,
const GlGraphInputData *data,
float lod,
89 Camera *camera =
nullptr);
97 Coord getPoint(GlGraphInputData *inputData) {
105 Color getColor(GlGraphInputData *inputData) {
108 return (inputData->getElementBorderWidth()->getNodeValue(n) > 0)
109 ? inputData->getElementBorderColor()->getNodeValue(n)
110 : inputData->getElementColor()->getNodeValue(n);
119 void init(
const GlGraphInputData *data);
129 #endif // DOXYGEN_NOTFOR_DEVEL 131 #endif // Tulip_GLNODE_H