protected Region GetRegion( ushort x, ushort y, ushort z, bool autoCreate )
{
uint index = PackIndex( x, y, z );
Region region = GetRegion( index );
if ( region == null && autoCreate )
{
// Make a name
string str = string.Format( "{0}:{1}", name, index );
// Calculate the region center
Vector3 center = GetRegionCenter( x, y, z );
region = new Region( this, str, owner, index, center );
owner.InjectMovableObject( region );
region.IsVisible = visible;
region.CastShadows = castShadows;
if ( renderQueueIDSet )
region.RenderQueueGroup = renderQueueID;
regionMap[ index ] = region;
}
return region;
}