Jump to content
  • Advertisement
Sign in to follow this  
AmishProgrammer

graph editor

This topic is 4475 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
That program will consist of several data structures. Although for the pain graph part, you probably want a tree.

Share this post


Link to post
Share on other sites
The graph looks like a modified tree structure to me. Apple has a similar material compositor in the Quartz Composer if you are looking for more implementations of such.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
just a quick note. if you're using vs 2005 you might want to obtain the (free) DSL (domain specific language) tools. That way you could build something like that rather easily as a custom design in visual studio and have code generated from the diagram just like the epic tool does. no need to draw and lay out these things yourself (if you have vs, that is). i don't know if the dsl tools work with the express editions but i suppose so.

cheers,
simon

Share this post


Link to post
Share on other sites
I'm not sure what your after here, but that is called a directed acyclic graph (DAG). A tree is a special case DAG where each node is allowed only one child. A node in a tree can be implemented by maintaining one link to the parent and a variable number of links to children. A general DAG node can be implemented the same way, simply allow multiple parent links. This won't ensure that the graph does not have cycles of course, you'll have to do that some other way. This is a little more tricky than with a tree (new connections between two nodes already in the graph may be allowed in some cases).

See google for details: directed acyclic graph

Share this post


Link to post
Share on other sites
Quote:
Original post by Solias
I'm not sure what your after here, but that is called a directed acyclic graph (DAG). A tree is a special case DAG where each node is allowed only one child. A node in a tree can be implemented by maintaining one link to the parent and a variable number of links to children. A general DAG node can be implemented the same way, simply allow multiple parent links. This won't ensure that the graph does not have cycles of course, you'll have to do that some other way. This is a little more tricky than with a tree (new connections between two nodes already in the graph may be allowed in some cases).

See google for details: directed acyclic graph


That's not quite right. A tree may have more than one child node, but each node can only have one parent. You seem to say this in your following sentance, but seeing as you jumped between 2 different definitions I thought I'd clear that up. The diagram above looks more like a restricted dag; each link has a context of what it can link to (what siblings it may have) therefore theoretically elimiated cycles. DAG's can be pretty unwieldly, so I suggest you steer clear of them until you get confident with trees.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!