Esempio n. 1
0
        internal static W3dSphereAlphaVector Parse(BinaryReader reader)
        {
            var result = new W3dSphereAlphaVector
            {
                ChunkType = reader.ReadByte(),
                ChunkSize = reader.ReadByte(),
                Vector    = reader.ReadVector3(),
                Magnitude = reader.ReadVector2(),
                Position  = reader.ReadSingle()
            };

            return(result);
        }
Esempio n. 2
0
        internal static W3dSphereAlphaVectors Parse(BinaryReader reader)
        {
            var result = new W3dSphereAlphaVectors
            {
                ChunkType    = reader.ReadUInt32(),
                ChunkSize    = reader.ReadUInt32() & 0x7FFFFFFF,
                Version      = reader.ReadUInt32(),
                AlphaVectors = new List <W3dSphereAlphaVector>()
            };

            var arraySize = reader.ReadUInt32();

            var arrayCount = arraySize / 26; // 26 = Size of OpacityInfo Array Chunk + Header Info

            for (var i = 0; i < arrayCount; i++)
            {
                var alphaVector = W3dSphereAlphaVector.Parse(reader);
                result.AlphaVectors.Add(alphaVector);
            }

            return(result);
        }