Ejemplo n.º 1
0
        /// <summary>
        /// Expands the HalfVector2 to a Vector2.
        /// </summary>
        public Vector2 ToVector2()
        {
            Vector2 vector2;

            vector2.X = HalfUtils.Unpack((ushort)this.packedValue);
            vector2.Y = HalfUtils.Unpack((ushort)(this.packedValue >> 16));
            return(vector2);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Expands the packed representation into a Vector4.
        /// </summary>
        public Vector3 ToVector3()
        {
            Vector3 vector3;

            vector3.X = HalfUtils.Unpack(X);
            vector3.Y = HalfUtils.Unpack(Y);
            vector3.Z = HalfUtils.Unpack(Z);
            return(vector3);
        }
Ejemplo n.º 3
0
        public Vector3 ToVector3()
        {
            Vector3 vector;

            vector.X = HalfUtils.Unpack(this.X);
            vector.Y = HalfUtils.Unpack(this.Y);
            vector.Z = HalfUtils.Unpack(this.Z);
            return(vector);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Expands the packed representation into a Vector4.
        /// </summary>
        public Vector4 ToVector4()
        {
            Vector4 vector4;

            vector4.X = HalfUtils.Unpack(X);
            vector4.Y = HalfUtils.Unpack(Y);
            vector4.Z = HalfUtils.Unpack(Z);
            vector4.W = HalfUtils.Unpack(W);
            return(vector4);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Expands the packed representation into a Vector4.
        /// </summary>
        public Vector4 ToVector4()
        {
            Vector4 vector4;

            vector4.X = HalfUtils.Unpack((ushort)this.PackedValue);
            vector4.Y = HalfUtils.Unpack((ushort)(this.PackedValue >> 16));
            vector4.Z = HalfUtils.Unpack((ushort)(this.PackedValue >> 32));
            vector4.W = HalfUtils.Unpack((ushort)(this.PackedValue >> 48));
            return(vector4);
        }