using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;

namespace CSGBuilder{
    [Serializable()]
    public abstract class Transformation : ISerializable
    {
        private Matrix trMatrix;

        public Matrix TrMatrix
        {
            get { return trMatrix; }
            set { trMatrix = value; }
        }

        public abstract void SetMatrix();

        public abstract string Type();

        #region ISerializable Members

        public virtual void GetObjectData(SerializationInfo info, StreamingContext context) {
            info.AddValue("Matrix", trMatrix);
        }

        protected Transformation(SerializationInfo info, StreamingContext context) {
            trMatrix = (Matrix)info.GetValue("Matrix", typeof(Matrix));
        }

        public Transformation() {
        }

        #endregion
    }
}
