Exemple #1
0
        private void Reset()
        {
            mShouldRedraw = true;
            mModel?.Dispose();
            mModel = null;

            ResetCamera();
        }
Exemple #2
0
        public void SetModel(Model model, TextureSet textureSet)
        {
            if (mDefaultShader == null || mGridShader == null)
            {
                return;
            }

            mModel?.Dispose();
            mModel = new GLModel(model, textureSet);

            var bSphere = new BoundingSphere();

            foreach (var mesh in model.Meshes)
            {
                bSphere.Merge(mesh.BoundingSphere);
            }

            SetDefaultCamera(bSphere);
        }