Esempio n. 1
0
        protected override void LoadModel(GraphicFactory factory, out BatchInformation[][] BatchInformations, out TextureInformation[][] TextureInformation)
        {
            model = factory.GetModel(this.Name, isInternal, forceFromDisk);
            ModelBuilderHelper.Extract(factory, out BatchInformations, out TextureInformation, model, _diffuseName, _bumpName, _specularName, _glowName, isInternal);

            BoundingSphere sphere = new BoundingSphere();

            foreach (var item in model.Meshes)
            {
                sphere = BoundingSphere.CreateMerged(sphere, item.BoundingSphere);
            }
            modelRadius = sphere.Radius;
        }
        /// <summary>
        /// Loads the model.
        /// </summary>
        /// <param name="factory">The factory.</param>
        /// <param name="BatchInformations">The batch informations.</param>
        /// <param name="TextureInformations">The texture informations.</param>
        protected override void LoadModel(GraphicFactory factory, out BatchInformation[][] BatchInformations, out TextureInformation[][] TextureInformations)
        {
            //code not called !!!
            //Here for future usage.

            model = factory.GetModel(this.Name, isInternal);
            ModelBuilderHelper.Extract(model, out BatchInformations);

            BoundingSphere sphere = new BoundingSphere();

            foreach (var item in model.Meshes)
            {
                BoundingSphere.CreateMerged(sphere, item.BoundingSphere);
            }
            modelRadius = sphere.Radius;

            TextureInformations       = new TextureInformation[1][];
            TextureInformations[0]    = new TextureInformation[1];
            TextureInformations[0][0] = new TextureInformation(isInternal, factory);
            TextureInformations[0][0].LoadTexture();
        }