Esempio n. 1
0
        public VoxLib(String VXLName, String HVAName)
        {
            MotLib = new HVA(FileSystem.LoadFile(HVAName));
            Voxel = new VXL(FileSystem.LoadFile(VXLName));
            Frame = 0;

            Voxel.SetHVA(MotLib);
        }
Esempio n. 2
0
 public void SetHVA(HVA Mot)
 {
     MotLib = Mot;
     foreach (var s in Sections)
     {
         s.FrameCount = (int)MotLib.Header.FrameCount;
     }
 }
Esempio n. 3
0
        public VoxLib(String VXLName, String HVAName)
        {
            MotLib = new HVA(FileSystem.LoadFile(HVAName));
            Voxel  = new VXL(FileSystem.LoadFile(VXLName));
            Frame  = 0;

            Voxel.SetHVA(MotLib);
        }
Esempio n. 4
0
            public bool ReadFile(BinaryReader r)
            {
                id = HVA.ReadCString(r, 16);

                FrameCount   = r.ReadUInt32();
                SectionCount = r.ReadUInt32();

                return(true);
            }
Esempio n. 5
0
            internal void GetVertices(HVA.Section MotLib, int FrameIdx, PAL Palette, List<VertexPositionColorNormal> Vertices, List<int> Indices)
            {
                if (ComputedFrames[FrameIdx] == null) {
                    ComputeVerticesIndices(Palette);

                    var computedF = new SectionFrame();

                    var rot = MotLib.GetRotation(FrameIdx);
                    var pos = MotLib.GetPosition(FrameIdx);

                    pos *= Tail.HVAMultiplier;

                    computedF.ComputedVertices = ComputedVertices.Select(v => {
                        v.Position = Vector3.Transform(v.Position, rot);
                        v.Position += pos;
                        return v;
                    }).ToList();

                    computedF.ComputedIndices = ComputedIndices;

                    ComputedFrames[FrameIdx] = computedF;
                }

                var cached = ComputedFrames[FrameIdx];

                Vertices.AddRange(cached.ComputedVertices);
                Indices.AddRange(cached.ComputedIndices);
            }
Esempio n. 6
0
 public void SetHVA(HVA Mot)
 {
     MotLib = Mot;
     foreach (var s in Sections) {
         s.FrameCount = (int)MotLib.Header.FrameCount;
     }
 }
Esempio n. 7
0
 public void ReadID(ArraySegment <byte> s)
 {
     id = HVA.ReadCString(s, 16);
 }