Пример #1
0
void R_GetTags (const model_t* mod, const char* tagName, int currentFrame, int oldFrame, const mAliasTagOrientation_t **current, const mAliasTagOrientation_t **old)
{
	const int index = R_GetTagIndexByName(mod, tagName);
	if (index == -1) {
		*current = NULL;
		*old = NULL;
		Com_Printf("Could not get tags for tag %s of model %s\n", tagName, mod->name);
	}
	*current = R_GetTagOrientByFrame(mod, index, currentFrame);
	*old = R_GetTagOrientByFrame(mod, index, oldFrame);
}
Пример #2
0
bool R_GetTagMatrix (const model_t* mod, const char* tagName, int frame, float matrix[16])
{
	const int index = R_GetTagIndexByName(mod, tagName);
	mAliasTagOrientation_t *orient;

	if (index == -1) {
		Com_Printf("Could not get tag matrix for tag %s of model %s\n", tagName, mod->name);
		return false;
	}

	orient = R_GetTagOrientByFrame(mod, index, frame);
	R_ComputeGLMatrixFromTag(matrix, orient);
	return true;
}