Original Post
Hy.
I have created a c++ application with graphical rapresentation in opengl,using library wild magic 4.
so i create some c++ classes entities for each entity that i would show ,and add the logic to these entities class.
Each entity class have a grapical rappresentation , a reference to a node added in the scenegraph of wild magic 4.
I would use decorator pattern for change the rappresentation of the node , but i can't use the override of draw method like gang of four decorator, because the drawing method is in the renderer class , not in the node class.
SO i think to add / remove new decorate meshes (for ex a border, 4 lines) or a color ec.. to the node.
My question is:
I can override Add / Remove method in the node class indeed override the draw function, for implement decorator in my application?
At the end ,if i add a mesh is like render mesh because the scenegraph render the added nodes and meshes in real time, the node is a pointer to the scenegraph node.
I have created a c++ application with graphical rapresentation in opengl,using library wild magic 4.
so i create some c++ classes entities for each entity that i would show ,and add the logic to these entities class.
Each entity class have a grapical rappresentation , a reference to a node added in the scenegraph of wild magic 4.
I would use decorator pattern for change the rappresentation of the node , but i can't use the override of draw method like gang of four decorator, because the drawing method is in the renderer class , not in the node class.
SO i think to add / remove new decorate meshes (for ex a border, 4 lines) or a color ec.. to the node.
My question is:
I can override Add / Remove method in the node class indeed override the draw function, for implement decorator in my application?
At the end ,if i add a mesh is like render mesh because the scenegraph render the added nodes and meshes in real time, the node is a pointer to the scenegraph node.