예제 #1
0
        public NiSkinData(BinaryReader reader, NiFile niFile) : base(reader, niFile)
        {
            Transform = new NiTransform(reader, niFile);

            BonesCount = reader.ReadUInt32();

            HasVertexWeights = reader.ReadByte();

            BoneList = new NiBoneData[BonesCount];
            for (var i = 0; i < BonesCount; i++)
            {
                BoneList[i] = new NiBoneData(reader, niFile, new NiBoolean(HasVertexWeights != 0));
            }
        }
예제 #2
0
        public NiBoneData(BinaryReader reader, NiFile niFile, bool hasVertexWeights) : base(reader, niFile)
        {
            Transform = new NiTransform(reader, niFile);

            BoundingSphereOffset = new NiVector3(reader, niFile);

            BoundingSphereRadius = reader.ReadSingle();

            VertexCount = reader.ReadUInt16();

            if (!hasVertexWeights)
            {
                return;
            }
            Weights = new NiBoneVertData[VertexCount];
            for (var i = 0; i < VertexCount; i++)
            {
                Weights[i] = new NiBoneVertData(reader, niFile);
            }
        }