Ejemplo n.º 1
0
        /// <summary>
        /// Deserializes the object and populates it from the input.
        /// </summary>
        /// <param name="input">Savable input</param>
        public virtual void Read(ISavableReader input)
        {
            _name = input.ReadString();
            Vector4 vp    = input.ReadVector4();
            Vector2 depth = input.ReadVector2();

            _viewport          = new Viewport((int)vp.X, (int)vp.Y, (int)vp.Z, (int)vp.W);
            _viewport.MinDepth = depth.X;
            _viewport.MaxDepth = depth.Y;

            _position       = input.ReadVector3();
            _up             = input.ReadVector3();
            _direction      = input.ReadVector3();
            _projectionMode = input.ReadEnum <ProjectionMode>();
            _proj           = input.ReadMatrix();

            Update();
        }