Пример #1
0
        public Voxel(VoxelLoader loader, VxlReader vxl, HvaReader hva)
        {
            if (vxl.LimbCount != hva.LimbCount)
            {
                throw new InvalidOperationException("Voxel and hva limb counts don't match");
            }

            transforms = hva.Transforms;
            frames     = hva.FrameCount;
            limbs      = hva.LimbCount;

            limbData = new Limb[vxl.LimbCount];
            for (var i = 0; i < vxl.LimbCount; i++)
            {
                var vl = vxl.Limbs[i];
                var l  = new Limb();
                l.Scale      = vl.Scale;
                l.Bounds     = (float[])vl.Bounds.Clone();
                l.Size       = (byte[])vl.Size.Clone();
                l.RenderData = loader.GenerateRenderData(vxl.Limbs[i]);
                limbData[i]  = l;
            }
        }
Пример #2
0
 public VoxelModelCache(IReadOnlyFileSystem fileSystem)
 {
     loader = new VoxelLoader(fileSystem);
 }