Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Creating tree structures and tying them to ofMesh

$
0
0

@aceslowman wrote:

I am working on a series of branch/capillary form tools, and for that I've been working with a simple recursive method and I love the way it is looking so far. With that said, I am not working with an easily traversable tree structure; I can't simulate something moving through each branch, then child branch independently.

My current structure is a series of ofMesh objects in a vector< vector<ofMesh> >.

Which is also represented as:

branches[level][branch_ind].getVertices()[node_ind]

So, each level can be handled independently, but the branches have no accessible hierarchy.

How would you all recommend trying to move all of this to a better tree structure? ofNode? A class for each branch node with pointers to children? A repo with the classes is below:

(This is just for my own study and probably riddled with issues right now, but I'd love if this would be something useful to others)

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles