   decorator
  Hy.I use a scengraph with opengl and wild magic 4 .Now i have created a drawable node that can draw items with an instance of rendering class (a class that do the render)with geometry and effect.Now i would use the decorator for draw items in relation to the state of the object.for ex if i select a node i would draw the node geometry and the bounding box with the red color.if i select a node and press the quote i would draw the node geometry ,the bounding box with the red color and the quotes geometry.is correct to use a decorator pattern?i'm think after read the book of gof that is a good solution for this case.or you advice somethings other?thanks   
  Sounds like a reasonable solution to me.   ;  Hy.I have anoter problem ,i have created a decorator for the class DrawableNode , a class BoundingBoxDecorator , that draw a box(From the bounding volume) over the mesh(that is in drawablenode) is possible to add dinamically the BoundingBoxDecorator from inside the class DrawableNode?code:DrawableNode:Quote:class DrawableNode : public Node{public: DrawableNode(){;}virtual ~DrawableNode();virtual void DrawNode(Renderer* pRenderer);void Selected(bool flag);// add boundingboxdecoratorTriMeshPtr m_pMesh;};DecoratorQuote:class Decorator : public DrawableNode{public:   Decorator(){};    Decorator(DrawableNodePtr pComponent);   virtual ~Decorator();   void DrawNode(Renderer* pRenderer); protected:DrawableNodePtr m_pComponent;};DecoratorBoundingBoxQuote:class DecoratorBoundingBox : public Decorator{public:    DecoratorBoundingBox();   DecoratorBoundingBox(DrawableNodePtr pComponent);   virtual ~DecoratorBoundingBox();   virtual void DrawNode(Renderer* pRenderer);   void DrawBoundingBox();};For Ex : The DrawableNode for any reason look that is selected , how i add the DecoratorBoundingBox that draw the boundingbox from inside the DrawableNode?likevoid DrawableNode::Selected(bool sel){    if(sel)this = new DecoratorBoundingBox(this);}but don't work   