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 (std::list<GlSimpleEntity *>::iterator it = _sortedElements.begin();
139 it != _sortedElements.end(); ++it) {
140 if ((*it)->isVisible()) {
146 for (std::map<std::string, GlSimpleEntity *>::iterator itE = elements.begin();
147 itE != elements.end(); ++itE) {
148 if (itE->second == (*it)) {
149 tlp::warning() <<
"Invalid bounding box for entity: " << itE->first << std::endl;
157 (*it)->acceptVisitor(visitor);
165 virtual void addLayerParent(
GlLayer *layer);
170 virtual void removeLayerParent(
GlLayer *layer);
181 void draw(
float,
Camera *)
override {}
186 std::map<std::string, GlSimpleEntity *> elements;
187 std::list<GlSimpleEntity *>
189 std::vector<GlLayer *> layerParents;
190 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...
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 agregate other GlEntity.
A GlLayer is like an 2D drawing software layer system.