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/GlEntity.h>
32 #include <tulip/GlLabel.h>
33 #include <tulip/GlSceneVisitor.h>
34 #include <tulip/GlGraphInputData.h>
42 class GlGraphInputData;
48 class TLP_GL_SCOPE GlNode final :
public GlEntity {
55 GlNode(
unsigned int _nid = UINT_MAX,
unsigned int _npos = UINT_MAX)
56 : id(_nid), pos(_npos), oldId(UINT_MAX),
57 selectionBox(Coord(0, 0, 0), Size(1, 1, 1), Color(0, 0, 255, 255), Color(0, 255, 0, 255),
58 false, true,
"", 3) {}
63 void acceptVisitor(GlSceneVisitor *visitor)
override {
70 BoundingBox getBoundingBox(
const GlGraphInputData *data);
75 void draw(
float lod,
const GlGraphInputData *data, Camera *camera);
80 void drawLabel(GlLabel &label, OcclusionTest *test,
const GlGraphInputData *data,
float lod,
81 Camera *camera =
nullptr);
89 Coord getPoint(GlGraphInputData *inputData) {
97 Color getColor(GlGraphInputData *inputData) {
100 return (inputData->getElementBorderWidth()->getNodeValue(n) > 0)
101 ? inputData->getElementBorderColor()->getNodeValue(n)
102 : inputData->getElementColor()->getNodeValue(n);
110 void init(
const GlGraphInputData *data);