Esempio n. 1
0
        public void Reset()
        {
            _currentMeshGeometry = null;
            _currentClump = null;
            _currentPrototype = null;
            _currentPrelight = default(Color);
            _currentTransform = new Matrix4();
            _currentMaterial = new Material();

            _clumpStack.Clear();
            _materialStack.Clear();
            _transformStack.Clear();

            _model = new Model();
        }
        public void BeginPrototype(string name)
        {
            if(_currentPrototype != null)
            {
                throw new InvalidOperationException("Prototypes cannot be nested inside of other prototypes.");
            }

            _currentPrelight = default(Color);
            _currentMeshGeometry = _currentPrototype = new Prototype { Name = name };

            //Prototypes implicitly modify the transform and material stacks.
            PushAll();
        }