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 BeginClump() { //If the model already has a root clump, error out; if(_model.MainClump != null) { throw new InvalidOperationException("Model is only allowed to have one root clump."); } _currentMeshGeometry = _currentClump = new Clump { Transform = _currentTransform.Copy(), }; //Clumps implicitly modify the transform and material stacks. PushAll(); _currentTransform = new Matrix4(); _currentPrelight = default(Color); _clumpStack.Push(_currentClump); }