public override void ReadData(GrnBinaryReader reader, int directoryOffset)
        {
            reader.Seek((int)(this.Offset + directoryOffset), SeekOrigin.Begin);
            this.TransformChannelIndex = reader.ReadInt32();
            if (this.PreviousSibling != null &&
                ((GrnAnimationTransformTrackKeysNode)this.PreviousSibling).TransformChannelIndex == this.TransformChannelIndex)
            {
                return;
            }

            // read 5 unknowns
            for (int i = 0; i < 5; ++i)
            {
                this.Unknown[i] = reader.ReadInt32();
            }

            int numPositions  = reader.ReadInt32();
            int numRotations  = reader.ReadInt32();
            int numTransforms = reader.ReadInt32();

            // read 4 unknowns
            for (int i = 0; i < 4; ++i)
            {
                this.Unknown2[i] = reader.ReadInt32();
            }

            for (int i = 0; i < numPositions; ++i)
            {
                this.PositionKeys.Add(reader.ReadSingle());
            }
            for (int i = 0; i < numRotations; ++i)
            {
                this.RotationKeys.Add(reader.ReadSingle());
            }
            for (int i = 0; i < numTransforms; ++i)
            {
                this.ScaleKeys.Add(reader.ReadSingle());
            }

            for (int i = 0; i < numPositions; ++i)
            {
                this.Positions.Add(reader.ReadVector3D());
            }
            for (int i = 0; i < numRotations; ++i)
            {
                this.Rotations.Add(reader.ReadQuaternion());
            }
            for (int i = 0; i < numTransforms; ++i)
            {
                this.Scales.Add(reader.ReadMatrix3x3());
            }
        }
 public override void ReadData(GrnBinaryReader reader, int directoryOffset)
 {
     reader.Seek((int)(this.Offset + directoryOffset), SeekOrigin.Begin);
     this.BoneIndex = reader.ReadInt32();
     this.Unknown = reader.ReadSingle();
     this.OBBMin = reader.ReadVector3D();
     this.OBBMax = reader.ReadVector3D();
 }
Ejemplo n.º 3
0
 public override void ReadData(GrnBinaryReader reader, int directoryOffset)
 {
     reader.Seek((int)(this.Offset + directoryOffset), SeekOrigin.Begin);
     this.BoneIndex = reader.ReadInt32();
     this.Unknown   = reader.ReadSingle();
     this.OBBMin    = reader.ReadVector3D();
     this.OBBMax    = reader.ReadVector3D();
 }
        public override void ReadData(GrnBinaryReader reader, int directoryOffset)
        {
            reader.Seek((int)(this.Offset + directoryOffset), SeekOrigin.Begin);
            int weightsCount = reader.ReadInt32();

            this.HighestBoneIndex         = reader.ReadInt32(); // unknown (12 Jormund.grn)
            this.HighestVertexWeightCount = reader.ReadInt32(); // unknown (2 Jormund.grn)
            for (int i = 0; i < weightsCount; ++i)
            {
                this.VertexWeights.Add(new VertexWeight());
                int boneCount = reader.ReadInt32();
                for (int j = 0; j < boneCount; ++j)
                {
                    this.VertexWeights[i].BoneIndices.Add(reader.ReadInt32());
                    this.VertexWeights[i].Weights.Add(reader.ReadSingle());
                }
            }
        }
Ejemplo n.º 5
0
 public override void ReadData(GrnBinaryReader reader, int directoryOffset)
 {
     reader.Seek((int)(this.Offset + directoryOffset), SeekOrigin.Begin);
     int weightsCount = reader.ReadInt32();
     this.HighestBoneIndex = reader.ReadInt32(); // unknown (12 Jormund.grn)
     this.HighestVertexWeightCount = reader.ReadInt32(); // unknown (2 Jormund.grn)
     for (int i = 0; i < weightsCount; ++i)
     {
         this.VertexWeights.Add(new VertexWeight());
         int boneCount = reader.ReadInt32();
         for (int j = 0; j < boneCount; ++j)
         {
             this.VertexWeights[i].BoneIndices.Add(reader.ReadInt32());
             this.VertexWeights[i].Weights.Add(reader.ReadSingle());
         }
     }
 }
        public override void ReadData(GrnBinaryReader reader, int directoryOffset)
        {
            reader.Seek((int)(this.Offset + directoryOffset), SeekOrigin.Begin);
            this.TransformChannelIndex = reader.ReadInt32();
            if (this.PreviousSibling != null &&
                ((GrnAnimationTransformTrackKeysNode)this.PreviousSibling).TransformChannelIndex == this.TransformChannelIndex)
            {
                return;
            }

            // read 5 unknowns
            for (int i = 0; i < 5; ++i)
            {
                this.Unknown[i] = reader.ReadInt32();
            }

            int numPositions = reader.ReadInt32();
            int numRotations = reader.ReadInt32();
            int numTransforms = reader.ReadInt32();

            // read 4 unknowns
            for (int i = 0; i < 4; ++i)
            {
                this.Unknown2[i] = reader.ReadInt32();
            }

            for (int i = 0; i < numPositions; ++i)
            {
                this.PositionKeys.Add(reader.ReadSingle());
            }
            for (int i = 0; i < numRotations; ++i)
            {
                this.RotationKeys.Add(reader.ReadSingle());
            }
            for (int i = 0; i < numTransforms; ++i)
            {
                this.ScaleKeys.Add(reader.ReadSingle());
            }

            for (int i = 0; i < numPositions; ++i)
            {
                this.Positions.Add(reader.ReadVector3D());
            }
            for (int i = 0; i < numRotations; ++i)
            {
                this.Rotations.Add(reader.ReadQuaternion());
            }
            for (int i = 0; i < numTransforms; ++i)
            {
                this.Scales.Add(reader.ReadMatrix3x3());
            }
        }