Exemple #1
0
        public NiRangeLODData(NiFile file, BinaryReader reader)
            : base(file, reader)
        {
            LODCenter = reader.ReadVector3();
            var numLevels = reader.ReadUInt32();

            LODLevels = new LODRange[numLevels];
            for (var i = 0; i < numLevels; i++)
            {
                LODLevels[i] = new LODRange(file, reader);
            }
        }
Exemple #2
0
        public NiLODNode(NiFile file, BinaryReader reader)
            : base(file, reader)
        {
            if (Version >= eNifVersion.VER_4_0_0_2 &&
                Version <= eNifVersion.VER_10_0_1_0)
            {
                LODCenter = reader.ReadVector3();
            }

            if (Version <= eNifVersion.VER_10_0_1_0)
            {
                var numLODLevels = reader.ReadUInt32();
                LODLevels = new LODRange[numLODLevels];
                for (var i = 0; i < numLODLevels; i++)
                {
                    LODLevels[i] = new LODRange(file, reader);
                }
            }

            if (Version >= eNifVersion.VER_10_0_1_0)
            {
                LODLevelData = new NiRef <NiLODData>(reader);
            }
        }