Example #1
0
        public Vector3 ToVector3()
        {
            Vector3 vector;

            vector.X = PackUtils.UnpackUNorm(0xff, this.packedValue);
            vector.Y = PackUtils.UnpackUNorm(0xff, this.packedValue >> 8);
            vector.Z = PackUtils.UnpackUNorm(0xff, this.packedValue >> 0x10);
            return(vector);
        }
Example #2
0
    public Vector3 ToVector3()
    {
        Vector3 result;

        result.X = PackUtils.UnpackUNorm(255u, this.packedValue);
        result.Y = PackUtils.UnpackUNorm(255u, this.packedValue >> 8);
        result.Z = PackUtils.UnpackUNorm(255u, this.packedValue >> 24);
        return(result);
    }
Example #3
0
        /// <summary>
        /// 获取该对象的ColorF表示
        /// </summary>
        /// <returns>对象的ColorF表示</returns>
        public ColorF ToColorF()
        {
            ColorF colorF;

            colorF.R = PackUtils.UnpackUNorm(0xff, this.packedValue);
            colorF.G = PackUtils.UnpackUNorm(0xff, this.packedValue >> 8);
            colorF.B = PackUtils.UnpackUNorm(0xff, this.packedValue >> 0x10);
            colorF.A = PackUtils.UnpackUNorm(0xff, this.packedValue >> 0x18);
            return(colorF);
        }