Overview     Modules     Class Hierarchy     Classes     Members  

GlSimpleEntity used to agregate other GlEntity. More...

#include <GlComposite.h>

Inheritance diagram for tlp::GlComposite:
Collaboration diagram for tlp::GlComposite:

Public Member Functions

 GlComposite (bool deleteComponentsInDestructor=true)
 ~GlComposite ()
virtual void addLayerParent (GlLayer *layer)
virtual void removeLayerParent (GlLayer *layer)
void reset (bool deleteElems)
void addGlEntity (GlSimpleEntity *entity, const std::string &key)
void deleteGlEntity (const std::string &key, bool informTheEntity=true)
void deleteGlEntity (GlSimpleEntity *entity, bool informTheEntity=true)
std::string findKey (GlSimpleEntity *entity)
GlSimpleEntityfindGlEntity (const std::string &key)
std::map< std::string,
GlSimpleEntity * > * 
getDisplays ()
void notifyModified (GlSimpleEntity *entity)
virtual void draw (float, Camera *)
virtual void setStencil (int stencil)
virtual void acceptVisitor (GlSceneVisitor *visitor)
void setDeleteComponentsInDestructor (bool deleteComponentsInDestructor)
virtual void translate (const Coord &mouvement)
virtual void getXML (xmlNodePtr rootNode)
virtual void setWithXML (xmlNodePtr rootNode)
- Public Member Functions inherited from tlp::GlSimpleEntity
 GlSimpleEntity ()
virtual ~GlSimpleEntity ()
virtual void setVisible (bool visible)
bool isVisible ()
int getStencil ()
void setCheckByBoundingBoxVisitor (bool check)
bool isCheckByBoundingBoxVisitor ()
virtual BoundingBox getBoundingBox ()
void addParent (GlComposite *composite)
void removeParent (GlComposite *composite)
- Public Member Functions inherited from tlp::GlEntity
virtual ~GlEntity ()

Protected Attributes

std::map< std::string,
GlSimpleEntity * > 
elements
std::list< GlSimpleEntity * > _sortedElements
std::vector< GlLayer * > layerParents
bool deleteComponentsInDestructor
- Protected Attributes inherited from tlp::GlSimpleEntity
bool visible
int stencil
bool checkByBoundingBoxVisitor
BoundingBox boundingBox
std::vector< GlComposite * > parents

Detailed Description

GlSimpleEntity used to agregate other GlEntity.

GlSimpleEntity used to agregate other GlEntity This class provide basic function to manage other entity

Constructor & Destructor Documentation

tlp::GlComposite::GlComposite ( bool  deleteComponentsInDestructor = true)
tlp::GlComposite::~GlComposite ( )

Member Function Documentation

virtual void tlp::GlComposite::acceptVisitor ( GlSceneVisitor visitor)
inlinevirtual

Function used to visit composite's children

Reimplemented from tlp::GlSimpleEntity.

Reimplemented in tlp::GlGraphComposite, and tlp::GlConvexHull.

void tlp::GlComposite::addGlEntity ( GlSimpleEntity entity,
const std::string &  key 
)

Add new entity with name : key. The composite does not takes the entity's ownership, i.e. it is not its responsibility to delete it.

virtual void tlp::GlComposite::addLayerParent ( GlLayer layer)
virtual

Add a layer parent to this entity

Reimplemented from tlp::GlSimpleEntity.

void tlp::GlComposite::deleteGlEntity ( const std::string &  key,
bool  informTheEntity = true 
)

Remove entity with name : key The entity is not deleted

void tlp::GlComposite::deleteGlEntity ( GlSimpleEntity entity,
bool  informTheEntity = true 
)

Remove given entity The entity is not deleted

virtual void tlp::GlComposite::draw ( float  ,
Camera  
)
inlinevirtual
Attention
This function do nothing, GlComposite is a GlSimpleEntity so draw function must be define

Implements tlp::GlSimpleEntity.

Reimplemented in tlp::GlConvexHull.

GlSimpleEntity* tlp::GlComposite::findGlEntity ( const std::string &  key)

Find entity with name : key

std::string tlp::GlComposite::findKey ( GlSimpleEntity entity)

Find name of given entity

std::map<std::string, GlSimpleEntity*>* tlp::GlComposite::getDisplays ( )
inline

Return map of entities in composite

virtual void tlp::GlComposite::getXML ( xmlNodePtr  rootNode)
virtual

Function to export data in XML

Implements tlp::GlSimpleEntity.

Reimplemented in tlp::GlGraphComposite, and tlp::GlConvexHull.

void tlp::GlComposite::notifyModified ( GlSimpleEntity entity)

Call when a child of the composite is modified

virtual void tlp::GlComposite::removeLayerParent ( GlLayer layer)
virtual

Remove a layer parent to this entity

Reimplemented from tlp::GlSimpleEntity.

void tlp::GlComposite::reset ( bool  deleteElems)

Clear the composite, if deleteElems is true, composite's entities are delete

void tlp::GlComposite::setDeleteComponentsInDestructor ( bool  deleteComponentsInDestructor)
inline

Set if at the destruction of composite, components well be deleted

virtual void tlp::GlComposite::setStencil ( int  stencil)
inlinevirtual

Set stencil number for all composite's children

Reimplemented from tlp::GlSimpleEntity.

virtual void tlp::GlComposite::setWithXML ( xmlNodePtr  rootNode)
virtual

Function to set data with XML

Implements tlp::GlSimpleEntity.

Reimplemented in tlp::GlGraphComposite, and tlp::GlConvexHull.

virtual void tlp::GlComposite::translate ( const Coord &  mouvement)
virtual

translate the composite with children

Reimplemented from tlp::GlSimpleEntity.

Reimplemented in tlp::GlAxis, tlp::GlConvexHull, and tlp::GlNominativeAxis.

Member Data Documentation

std::list<GlSimpleEntity *> tlp::GlComposite::_sortedElements
protected
bool tlp::GlComposite::deleteComponentsInDestructor
protected
std::map<std::string, GlSimpleEntity*> tlp::GlComposite::elements
protected
std::vector<GlLayer *> tlp::GlComposite::layerParents
protected


Tulip Software by LaBRI Visualization Team    2001 - 2012