internal Object3DDynamics(string dynamicName, Object3DMemento memento, int index) { _dynamicName = dynamicName; _memento = memento; _translateIncrement = new AxisValue(); _index = index; }
internal Object3DKeyFrame(int index, Object3DMemento memento) { _index = index; _memento = memento; _translateIncrement = new AxisValue(); _scaleIncrement = new AxisValue(); _rotateIncrement = new AxisValue(); }
public void AddDynamics(IDynamic dynamic) { // if the dynamics list doesn't exist, create a new list attached to the selected object if (dynamicsList == null) { dynamicsList = new ArrayList(); } dynamicsList.Add(dynamic); this.isDynamic = true; this.rigidity = Rigidity.Active; this.dynamicStartMemento = this.CreateMemento(); }
/// <summary> /// SetMemento takes a memento state object and loads the state of the current object from /// the state of the memento. /// </summary> /// <param name="memento"></param> public void SetMemento(Object3DMemento memento) { this.Translate(memento.translation.X,memento.translation.Y,memento.translation.Z); this.Rotate(memento.rotation.X, memento.rotation.Y, memento.rotation.Z); this.Scale(memento.scaling.X, memento.scaling.Y, memento.scaling.Z); }
/// <summary> /// SetMemento takes a memento state object and loads the state of the current object from /// the state of the memento. /// </summary> /// <param name="memento"></param> public void SetMemento(Object3DMemento memento) { this.Translate(memento.translation.X, memento.translation.Y, memento.translation.Z); this.Rotate(memento.rotation.X, memento.rotation.Y, memento.rotation.Z); this.Scale(memento.scaling.X, memento.scaling.Y, memento.scaling.Z); }