Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# md2.h

Go to the documentation of this file.

    00001 ///////////////////////////////////////////////////////////////////////////////
    00002 /// @file md2.h
    00003 ///
    00004 /// @brief Header for MD2 structures
    00005 ///
    00006 /// @author Assassin
    00007 ///
    00008 /// This file is the intellectual property of Novus Delta, LLC.. Usage of the
    00009 /// contents of this file is subject to the Destiny3D Member License which
    00010 /// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
    00011 ///
    00012 /// This file is distributed "AS IS" without warranty of any kind.  Novus
    00013 /// Delta, LLC. does not guarantee the fitness of the contents of this file
    00014 /// for any particular purpose.
    00015 ///
    00016 /// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
    00017 ///
    00018 /// <hr>
    00019 ///                                 Change History
    00020 /// <hr>
    00021 ///
    00022 /// @date June 2002
    00023 /// @author Assassin
    00024 /// @remarks Creation
    00025 ///
    00026 ///////////////////////////////////////////////////////////////////////////////
    00027
    00028 //MD2 model stuff
    00029 #ifndef MD2_H
    00030 #define MD2_H
    00031
    00032 typedef struct MD2Header
    00033 {
    00034     int                         indent;
    00035     int                         version;
    00036
    00037     int                         skinwidth;
    00038     int                         skinheight;
    00039
    00040     int                         framesize;
    00041
    00042     int                         numSkins;
    00043     int                         numXYZ;
    00044     int                         numST;
    00045     int                         numTris;
    00046     int                         numGLcmds;
    00047     int                         numFrames;
    00048
    00049     int                         offsetSkins;
    00050     int                         offsetST;
    00051     int                         offsetTris;
    00052     int                         offsetFrames;
    00053     int                         offsetGLcmds;
    00054     int                         offsetEnd;
    00055 } MD2Header;
    00056
    00057 typedef struct MD2TriangleVertex
    00058 {
    00059     BYTE                        vertex[3];
    00060     BYTE                        lightOffset;
    00061 } MD2TriangleVertex;
    00062
    00063 typedef struct MD2FrameData
    00064 {
    00065     float                   scale[3];
    00066     float                   translation[3];
    00067     char                        name[16];
    00068
    00069     MD2TriangleVertex           *vertices;
    00070 } MD2FrameData;
    00071
    00072 typedef struct MD2Triangle
    00073 {
    00074     deVertex                    vert;
    00075     deVertex                    normal;
    00076 } MD2Triangle;
    00077
    00078 typedef struct MD2Frame
    00079 {
    00080     char                        name[16];
    00081     MD2Triangle                 *vertices;
    00082 } MD2Frame;
    00083
    00084 typedef struct MD2Face
    00085 {
    00086     short                       vertexIndices[3];
    00087     short                       textureIndices[3];
    00088 } MD2Face;
    00089
    00090 typedef struct MD2TexCoord
    00091 {
    00092     short                       s, t;
    00093 } MD2TexCoord;
    00094
    00095 typedef char                    MD2Skin[64];
    00096
    00097 #endif