Example #1
0
 /// <summary>
 /// Deserializes this OrientedBoundingBox.
 /// </summary>
 /// <param name="input">Input to read from</param>
 public override void Read(ISavableReader input)
 {
     base.Read(input);
     m_extents = input.ReadVector3();
     m_xAxis   = input.ReadVector3();
     m_yAxis   = input.ReadVector3();
     m_zAxis   = input.ReadVector3();
 }
Example #2
0
 /// <summary>
 /// Deserializes the transform.
 /// </summary>
 /// <param name="input">Input to read from</param>
 public void Read(ISavableReader input)
 {
     _scale       = input.ReadVector3();
     _rotation    = input.ReadQuaternion();
     _translation = input.ReadVector3();
     //Cache the matrix
     Matrix m = this.Matrix;
 }
Example #3
0
 /// <summary>
 /// Deserializes this Mesh.
 /// </summary>
 /// <param name="input">Input to read from</param>
 public override void Read(ISavableReader input)
 {
     base.Read(input);
     _extents     = input.ReadVector3();
     _center      = input.ReadVector3();
     _xAxis       = input.ReadVector3();
     _yAxis       = input.ReadVector3();
     _zAxis       = input.ReadVector3();
     _insideOut   = input.ReadBoolean();
     _constructed = true;
 }
Example #4
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();
        }
Example #5
0
 /// <summary>
 /// Deserializes this BoundingVolume.
 /// </summary>
 /// <param name="input">Input to read from</param>
 public virtual void Read(ISavableReader input)
 {
     m_center = input.ReadVector3();
 }