dMD2Model_t Struct Reference

the glcmd format: a positive integer starts a tristrip command, followed by that many vertex structures. a negative integer starts a trifan command, followed by -x vertexes a zero indicates the end of the command list. a vertex consists of a floating point s, a floating point t, and an integer vertex index. More...

#include <qfiles.h>

Data Fields

uint32_t ident
uint32_t version
uint32_t skinwidth
uint32_t skinheight
uint32_t framesize
uint32_t num_skins
uint32_t num_verts
uint32_t num_st
uint32_t num_tris
uint32_t num_glcmds
uint32_t num_frames
uint32_t ofs_skins
uint32_t ofs_st
uint32_t ofs_tris
uint32_t ofs_frames
uint32_t ofs_glcmds
uint32_t ofs_end

Detailed Description

the glcmd format: a positive integer starts a tristrip command, followed by that many vertex structures. a negative integer starts a trifan command, followed by -x vertexes a zero indicates the end of the command list. a vertex consists of a floating point s, a floating point t, and an integer vertex index.

model file header structure - 68 bytes

Definition at line 111 of file qfiles.h.


Field Documentation

byte size of each frame

Definition at line 121 of file qfiles.h.

Referenced by R_ModLoadAliasMD2MeshIndexed(), R_ModLoadAliasMD2MeshUnindexed(), and SV_ModLoadAliasMD2Model().

a "magic number" used to identify the file. The magic number is 844121161 in decimal (0x32504449 in hexadecimal). The magic number is equal to the int "IDP2" (id polygon 2), which is formed by ('I' + ('D' << 8) + ('P' << 16) + ('2' << 24))

Definition at line 112 of file qfiles.h.

number of frames for this model

Definition at line 128 of file qfiles.h.

Referenced by R_ModLoadAliasMD2MeshIndexed(), R_ModLoadAliasMD2MeshUnindexed(), R_ModLoadAliasMD2Model(), and SV_ModLoadAliasMD2Model().

dwords in strip/fan command list

Definition at line 127 of file qfiles.h.

Referenced by MD2GLCmdsRemove().

Number of skins associated with this model

Definition at line 123 of file qfiles.h.

Referenced by MD2Check(), MD2HeaderCheck(), MD2SkinEdit(), MD2SkinFix(), R_ModLoadAliasMD2MeshIndexed(), and R_ModLoadAliasMD2MeshUnindexed().

number of texture coordinates - can be greater than num_verts

Definition at line 125 of file qfiles.h.

number of triangles in each frame.

Definition at line 126 of file qfiles.h.

Referenced by MD2HeaderCheck(), R_ModLoadAliasMD2MeshIndexed(), and R_ModLoadAliasMD2MeshUnindexed().

number of vertices

Definition at line 124 of file qfiles.h.

Referenced by MD2HeaderCheck(), R_ModLoadAliasMD2MeshIndexed(), and R_ModLoadAliasMD2MeshUnindexed().

end of file

Definition at line 135 of file qfiles.h.

Referenced by MD2GLCmdsRemove(), MD2HeaderCheck(), and R_ModLoadAliasMD2Mesh().

offset for first frame

Definition at line 133 of file qfiles.h.

Referenced by MD2GLCmdsRemove(), R_ModLoadAliasMD2MeshIndexed(), R_ModLoadAliasMD2MeshUnindexed(), and SV_ModLoadAliasMD2Model().

offset to the gl command list

Definition at line 134 of file qfiles.h.

Referenced by MD2GLCmdsRemove().

each skin is a MD2_MAX_SKINNAME string

Definition at line 130 of file qfiles.h.

Referenced by MD2Check(), MD2GLCmdsRemove(), MD2SkinEdit(), MD2SkinFix(), R_ModLoadAliasMD2MeshIndexed(), and R_ModLoadAliasMD2MeshUnindexed().

byte offset from start for stverts

Definition at line 131 of file qfiles.h.

Referenced by MD2GLCmdsRemove(), R_ModLoadAliasMD2MeshIndexed(), and R_ModLoadAliasMD2MeshUnindexed().

offset for dtriangles

Definition at line 132 of file qfiles.h.

Referenced by MD2GLCmdsRemove(), R_ModLoadAliasMD2MeshIndexed(), and R_ModLoadAliasMD2MeshUnindexed().

height of the skin(s) in pixels

Definition at line 120 of file qfiles.h.

Referenced by R_ModLoadAliasMD2MeshIndexed(), and R_ModLoadAliasMD2MeshUnindexed().

width of the skin(s) in pixels

Definition at line 119 of file qfiles.h.

Referenced by R_ModLoadAliasMD2MeshIndexed(), and R_ModLoadAliasMD2MeshUnindexed().

version number of the file. Always 8

Definition at line 117 of file qfiles.h.

Referenced by MD2HeaderCheck(), and R_ModLoadAliasMD2Mesh().


The documentation for this struct was generated from the following file:

Generated by  doxygen 1.6.2