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

Build() public method

Build the geometry.
Based on all the entities which have been added, and the batching options which have been set, this method constructs the batched geometry structures required. The batches are added to the scene and will be rendered unless you specifically hide them.
public Build ( ) : void
return void
		public void Build()
		{
			if ( logLevel <= 1 )
				LogManager.Instance.Write( "Building new static geometry {0}", name );

			buildCount++;

			// Make sure there's nothing from previous builds
			Destroy();

			// Firstly allocate meshes to regions
			foreach ( QueuedSubMesh qsm in queuedSubMeshes )
			{
				Region region = GetRegion( qsm.worldBounds, true );
				region.Assign( qsm );
			}
			bool stencilShadows = false;
			if ( castShadows && owner.IsShadowTechniqueStencilBased )
				stencilShadows = true;

			// Now tell each region to build itself
			foreach ( Region region in regionMap.Values )
				region.Build( stencilShadows, logLevel );

			if ( logLevel <= 1 )
			{
				LogManager.Instance.Write( "Finished building new static geometry {0}", name );
				Dump();
			}
		}