public override void LoadContent()
        {
            try {
                Primitive = Engine.ModelFactory.Get(Definition, Quality);
                Meshes    = new ContentMesh[Primitive.Meshes.Length];
                for (var i = 0; i < Primitive.Meshes.Length; ++i)
                {
                    Meshes[i] = new ContentMesh(this, Primitive.Meshes[i], Variant);
                    _MeshContainer.Add(Meshes[i]);
                }

                _MeshContainer.LoadContent();
                base.LoadContent();
            }catch (Exception e) {
                System.Diagnostics.Trace.WriteLine(string.Format("Failed to load model '{0}': {1}", Definition.File.Path, e));
                IsLoaded = false;
            }
        }
 public ContentMeshPart(ContentMesh mesh, MeshPart basePart)
 {
     this.Mesh = mesh;
     this.BasePart = basePart;
 }
        public override void LoadContent()
        {
            try {
                Primitive = Engine.ModelFactory.Get(Definition, Quality);
                Meshes = new ContentMesh[Primitive.Meshes.Length];
                for (var i = 0; i < Primitive.Meshes.Length; ++i) {
                    Meshes[i] = new ContentMesh(this, Primitive.Meshes[i], Variant);
                    _MeshContainer.Add(Meshes[i]);
                }

                _MeshContainer.LoadContent();
                base.LoadContent();
            }catch(Exception e) {
                System.Diagnostics.Trace.WriteLine(string.Format("Failed to load model '{0}': {1}", Definition.File.Path, e));
                IsLoaded = false;
            }
        }
Beispiel #4
0
 public ContentMeshPart(ContentMesh mesh, MeshPart basePart)
 {
     this.Mesh     = mesh;
     this.BasePart = basePart;
 }