protected void BuildSubEntities()
{
// loop through the models meshes and create sub entities from them
for ( int i = 0; i < this.mesh.SubMeshCount; i++ )
{
SubMesh subMesh = this.mesh.GetSubMesh( i );
SubEntity sub = new SubEntity();
sub.Parent = this;
sub.SubMesh = subMesh;
if ( subMesh.IsMaterialInitialized )
{
sub.MaterialName = subMesh.MaterialName;
}
this.subEntityList.Add( sub );
}
}