78 for (j = 0; j < 3; j++) {
95 for (l = 0; l < mod->
alias.
num_tags; l++, pouttag++, pintag++) {
99 for (j = 0; j < 3; j++) {
116 if (strncmp(pinmesh->
id,
"IDP3", 4)) {
144 for (j = 0; j < poutmesh->
num_skins; j++) {
154 for (j = 0; j < poutmesh->
num_tris; j++, pinindex += 3, poutindex += 3) {
155 poutindex[0] = (int32_t)
LittleLong(pinindex[0]);
156 poutindex[1] = (int32_t)
LittleLong(pinindex[1]);
157 poutindex[2] = (int32_t)
LittleLong(pinindex[2]);
164 for (j = 0; j < poutmesh->
num_verts; j++, pincoord++) {
174 for (j = 0; j < poutmesh->
num_verts; j++, pinvert++, poutvert++) {
181 lat = (pinvert->norm >> 8) & 0xff;
182 lng = (pinvert->norm & 0xff);
184 lat *=
M_PI / 128.0f;
185 lng *=
M_PI / 128.0f;
187 poutvert->
normal[0] = cos(lat) * sin(lng);
188 poutvert->
normal[1] = sin(lat) * sin(lng);
189 poutvert->
normal[2] = cos(lng);
void setNegativeVolume()
Sets mins and maxs to their starting points before using addPoint.
memPool_t * vid_modelPool
image_t * R_AliasModelGetSkin(const char *modelFileName, const char *skin)
mAliasVertex_t * vertexes
#define MD3_MAX_TRIANGLES
local graphics definitions
#define MD3_ALIAS_VERSION
void Com_Error(int code, const char *fmt,...)
char name[MODEL_MAX_PATH]
void Q_strncpyz(char *dest, const char *src, size_t destsize)
Safe strncpy that ensures a trailing zero.
void add(const vec3_t point)
If the point is outside the box, expand the box to accommodate it.
char name[MODEL_MAX_PATH]
void R_ModCalcUniqueNormalsAndTangents(mAliasMesh_t *mesh, int nFrames, float smoothness)
Calculates normals and tangents for all frames and does vertex merging based on smoothness.
void R_ModLoadAliasMD3Model(model_t *mod, byte *buffer, int bufSize)
Load MD3 models from file.
#define Mem_PoolAllocTypeN(type, n, pool)
QGL_EXTERN GLuint GLsizei bufSize
void R_ModLoadArrayData(mAliasModel_t *mod, mAliasMesh_t *mesh, bool loadNormals)
Allocates data arrays for animated models. Only called once at loading time.