Axiom.Core.StaticGeometry.AddSceneNode C# (CSharp) Method

AddSceneNode() public method

Adds all the Entity objects attached to a SceneNode and all it's children to the static geometry.
This method performs just like addEntity, except it adds all the entities attached to an entire sub-tree to the geometry. The position / orientation / scale parameters are taken from the node structure instead of being specified manually.
public AddSceneNode ( SceneNode node ) : void
node SceneNode Pointer to the node to use to provide a set of Entity templates
return void
		public void AddSceneNode( SceneNode node )
		{
			foreach ( MovableObject mobj in node.Objects )
			{
				if ( mobj is Entity )
					AddEntity( (Entity)mobj, node.DerivedPosition, node.DerivedOrientation, node.DerivedScale );
			}
			// recursively add the child-nodes
			foreach ( SceneNode child in node.Children )
			{
				AddSceneNode( child );
			}
		}