001/**
002 * Copyright (c) 2008-2014 Ardor Labs, Inc.
003 *
004 * This file is part of Ardor3D.
005 *
006 * Ardor3D is free software: you can redistribute it and/or modify it 
007 * under the terms of its license which may be found in the accompanying
008 * LICENSE file or at <http://www.ardor3d.com/LICENSE>.
009 */
010
011package com.ardor3d.extension.model.md2;
012
013/**
014 * Header of MD2: see also http://tfc.duke.free.fr/coding/md2-specs-en.html
015 */
016final class Md2Header {
017    /** identifier of the file: magic number: "IDP2" */
018    final int magic;
019    /** version number of the file (must be 8) */
020    final int version;
021
022    /** texture width in pixels */
023    final int skinWidth;
024    /** texture height in pixels */
025    final int skinHeight;
026
027    /** size in bytes of a frame */
028    final int frameSize;
029
030    /** number of textures associated with the model */
031    final int numSkins;
032    /** number of vertices per frame */
033    final int numVertices;
034    /** number of texture coordinates */
035    final int numTexCoords;
036    /** number of triangles */
037    final int numTriangles;
038    /** number of gl commands */
039    final int numGlCommands;
040    /** number of animation frames */
041    final int numFrames;
042
043    /** offset in the file for the texture data */
044    final int offsetSkins;
045    /** offset in the file for the texture coords */
046    final int offsetTexCoords;
047    /** offset in the file for the face data */
048    final int offsetTriangles;
049    /** offset in the file for the frames data */
050    final int offsetFrames;
051    /** offset in the file for the gl commands data */
052    final int offsetGlCommands;
053    /** offset of EOF */
054    final int offsetEnd;
055
056    Md2Header(final int magic, final int version, final int skinWidth, final int skinHeight, final int frameSize,
057            final int numSkins, final int numVertices, final int numTexCoords, final int numTriangles,
058            final int numGlCommands, final int numFrames, final int offsetSkins, final int offsetTexCoords,
059            final int offsetTriangles, final int offsetFrames, final int offsetGlCommands, final int offsetEnd) {
060        this.magic = magic;
061        this.version = version;
062        this.skinWidth = skinWidth;
063        this.skinHeight = skinHeight;
064        this.frameSize = frameSize;
065        this.numSkins = numSkins;
066        this.numVertices = numVertices;
067        this.numTexCoords = numTexCoords;
068        this.numTriangles = numTriangles;
069        this.numGlCommands = numGlCommands;
070        this.numFrames = numFrames;
071        this.offsetSkins = offsetSkins;
072        this.offsetTexCoords = offsetTexCoords;
073        this.offsetTriangles = offsetTriangles;
074        this.offsetFrames = offsetFrames;
075        this.offsetGlCommands = offsetGlCommands;
076        this.offsetEnd = offsetEnd;
077    }
078}