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); }
/// <summary> /// Initializes a new instance of the <see cref="Clump"/> class. /// </summary> public Clump() { Transform = new Matrix4(); IsCollidable = true; }
public void SetTransformMatrix(Matrix4 transform) { _currentTransform = transform; }
public void SetIdentityTransform() { _currentTransform = new Matrix4(); }
protected PrimitiveGeometry() { Transform = new Matrix4(); }