Пример #1
0
        public Vector2 ToVector2()
        {
            Vector2 vector;

            vector.X = PackUtils.UnpackUNorm(0xffff, this.packedValue);
            vector.Y = PackUtils.UnpackUNorm(0xffff, this.packedValue >> 0x10);
            return(vector);
        }
Пример #2
0
        public Vector3 ToVector3()
        {
            Vector3 vector;

            vector.X = PackUtils.UnpackUNorm(0x1f, (uint)(this.packedValue >> 11));
            vector.Y = PackUtils.UnpackUNorm(0x3f, (uint)(this.packedValue >> 5));
            vector.Z = PackUtils.UnpackUNorm(0x1f, this.packedValue);
            return(vector);
        }
Пример #3
0
        public Vector4 ToVector4()
        {
            Vector4 vector;

            vector.X = PackUtils.UnpackUNorm(0xffff, (uint)this.packedValue);
            vector.Y = PackUtils.UnpackUNorm(0xffff, (uint)(this.packedValue >> 0x10));
            vector.Z = PackUtils.UnpackUNorm(0xffff, (uint)(this.packedValue >> 0x20));
            vector.W = PackUtils.UnpackUNorm(0xffff, (uint)(this.packedValue >> 0x30));
            return(vector);
        }
Пример #4
0
        public Vector4 ToVector4()
        {
            Vector4 vector;

            vector.X = PackUtils.UnpackUNorm(0x1f, (uint)(this.packedValue >> 10));
            vector.Y = PackUtils.UnpackUNorm(0x1f, (uint)(this.packedValue >> 5));
            vector.Z = PackUtils.UnpackUNorm(0x1f, this.packedValue);
            vector.W = PackUtils.UnpackUNorm(1, (uint)(this.packedValue >> 15));
            return(vector);
        }
Пример #5
0
        public Vector4 ToVector4()
        {
            Vector4 vector;

            vector.X = PackUtils.UnpackUNorm(0x3ff, this.packedValue);
            vector.Y = PackUtils.UnpackUNorm(0x3ff, this.packedValue >> 10);
            vector.Z = PackUtils.UnpackUNorm(0x3ff, this.packedValue >> 20);
            vector.W = PackUtils.UnpackUNorm(3, this.packedValue >> 30);
            return(vector);
        }
Пример #6
0
        public Vector4 ToVector4()
        {
            Vector4 vector;

            vector.X = PackUtils.UnpackUNorm(15, (uint)(this.packedValue >> 8));
            vector.Y = PackUtils.UnpackUNorm(15, (uint)(this.packedValue >> 4));
            vector.Z = PackUtils.UnpackUNorm(15, this.packedValue);
            vector.W = PackUtils.UnpackUNorm(15, (uint)(this.packedValue >> 12));
            return(vector);
        }
Пример #7
0
 public float ToAlpha()
 {
     return(PackUtils.UnpackUNorm(0xff, this.packedValue));
 }