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();
}
}