Exemplo n.º 1
0
Arquivo: Ped.cpp Projeto: aap/iii_anim
void
CPed::renderLimb(int node)
{
	RpAtomic *atomic;
	CPedModelInfo *pedinfo = (CPedModelInfo*)CModelInfo::ms_modelInfoPtrs[this->nModelIndex];
	switch(node){
	case PED_HEAD:
		atomic = pedinfo->head;
		break;
	case PED_HANDL:
		atomic = pedinfo->lhand;
		break;
	case PED_HANDR:
		atomic = pedinfo->rhand;
		break;
	default:
		return;
	}
	if(atomic == NULL)
		return;
	RpHAnimHierarchy *hier = GetAnimHierarchyFromSkinClump(this->clump);
	int idx = RpHAnimIDGetIndex(hier, this->frames[node]->nodeID);
	RwMatrix *mat = &RpHAnimHierarchyGetMatrixArray(hier)[idx];
	RwFrame *frame = RpAtomicGetFrame(atomic);
	frame->modelling = *mat;
	RwFrameUpdateObjects(frame);
	int alpha = CVisibilityPlugins__GetClumpAlpha(clump);
	RpGeometryForAllMaterials(RpAtomicGetGeometry(atomic), SetAlphaCB, &alpha);
	atomic->renderCallBack(atomic);
}
void CCustomCarEnvMapPipeline::CustomPipeAtomicSetup(RpAtomic* atomic)
{
    RpGeometryForAllMaterials(atomic->geometry, CustomPipeMaterialSetup, &atomic);
    atomic->pipeline = ObjPipeline;
    SetPipelineID(atomic, CUSTOM_CAR_ENV_MAP_PIPELINE);
}