Skip to main content
gamedev.net
🔒 Locked

entities

Started by giugio 0 replies 600+ views
Original Post
giugio
giugio
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.
Captain P
Captain P
I can't really tell what exactly you're trying to do based on the information you've given so far. Can you post the relevant code? That is, one of your entity classes and perhaps the definition of that node class? And then point out what you're trying to achieve, what you've tried so far and why that didn't work?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.