Adding "GroupNode" to a scene

Nov 29, 2009 at 9:39 PM
Edited Nov 29, 2009 at 9:41 PM

I'm trying to create a group of mesh objects that can be rotated together with a single transform matrix

I'm trying to use NodeCollection for lack of any other apparent solution

Balder.Core.Collections.NodeCollection groupNode = new Balder.Core.Collections.NodeCollection();

I then add several Mesh nodes to the collection, which seems to be working fine.

But then I try to add the NodeCollection to the scene, and that does not work


Obviously this isn't the correct way to do it, (I assume a GroupNode would extend the Node class)  but I can't seem to find anything else to try?

Nov 30, 2009 at 7:01 AM

Mesh is for now the only thing supporting this, but I see this as too limiting.

In fact, when I read your post, I sincerely thought Balder handled this in a better fashion. The idea has been to have the ability to have the ability to add child nodes to any node, so one can create hierarchies within a node. This is what Mesh supports on a first level hierarchy basis.

I'll put this up for us to fix ASAP after the release of, this is very important to have right. 


The only way you can do this, is to actually create your own type "GroupNode" that inherits from Mesh or Geometry or any other of the types you need, and then have a NodeCollection within it and override Render and do the Matrix calculations yourself.
For a sample you can go browse the Mesh source, which is fairly simple - but remember to browse it over at GitHub, as the SourceCode part of Codeplex is not used at the moment. 

Feb 28, 2011 at 1:04 AM

Was this support added?  Is it in the latest version for download?  What should I be looking for to do this?

Mar 5, 2011 at 5:59 AM

You have something called Container - it can hold children and do this.