27 #include <tulip/GlSimpleEntity.h> 28 #include <tulip/tulipconf.h> 47 GlComposite(
bool deleteComponentsInDestructor =
true);
59 void reset(
bool deleteElems);
72 void deleteGlEntity(
const std::string &key,
bool informTheEntity =
true);
78 void deleteGlEntity(
GlSimpleEntity *entity,
bool informTheEntity =
true);
101 this->stencil = stencil;
103 for (std::list<GlSimpleEntity *>::iterator it = _sortedElements.begin();
104 it != _sortedElements.end(); ++it) {
105 (*it)->setStencil(stencil);
113 this->deleteComponentsInDestructor = deleteComponentsInDestructor;
119 void translate(
const Coord &mouvement)
override;
124 void getXML(std::string &outString)
override;
129 void setWithXML(
const std::string &inString,
unsigned int ¤tPosition)
override;
136 void acceptVisitor(GlSceneVisitor *visitor)
override {
138 for (
auto entity : _sortedElements) {
145 for (
auto &itE : elements) {
146 if (itE.second == entity) {
147 tlp::warning() <<
"Invalid bounding box for entity: " << itE.first << std::endl;
155 entity->acceptVisitor(visitor);
163 virtual void addLayerParent(
GlLayer *layer);
168 virtual void removeLayerParent(
GlLayer *layer);
179 void draw(
float,
Camera *)
override {}
184 std::map<std::string, GlSimpleEntity *> elements;
185 std::list<GlSimpleEntity *>
187 std::vector<GlLayer *> layerParents;
188 bool deleteComponentsInDestructor;
Base class for all Tulip OpenGL entities.
bool isValid() const
Checks whether the bounding box's lowest point is less than it's highest point. "Less Than" means axi...
bool isVisible() const
Return if entity is visible.
virtual BoundingBox getBoundingBox()
Return the entity boundingbox.
void setStencil(int stencil) override
Set stencil number for all composite's children.
Tulip OpenGL camera object.
void setDeleteComponentsInDestructor(bool deleteComponentsInDestructor)
Set if at the destruction of composite, components well be deleted.
const std::map< std::string, GlSimpleEntity * > & getGlEntities() const
Return map of entities in composite.
GlSimpleEntity used to aggregate other GlEntity.
A GlLayer is like an 2D drawing software layer system.