//---------------------------------------------------------------------------- // pfxUpdateRigidStatesTaskEntry // /// The thread PfxTaskEntry function used to update rigid body states in /// parallel. //---------------------------------------------------------------------------- void pfxUpdateRigidStatesTaskEntry(PfxTaskArg *arg) { PfxUpdateRigidStatesParam ¶m = *((PfxUpdateRigidStatesParam*)arg->io); PfxUInt32 iFirstBody = arg->data[0]; PfxUInt32 iEndBody = arg->data[1]; for(PfxUInt32 i = iFirstBody; i < iEndBody; i++) { pfxIntegrate(param.states[i],param.bodies[i],param.timeStep); } }
PfxInt32 pfxUpdateRigidStates(PfxUpdateRigidStatesParam ¶m) { PfxInt32 ret = pfxCheckParamOfUpdateRigidStates(param); if(ret != SCE_PFX_OK) return ret; SCE_PFX_PUSH_MARKER("pfxUpdateRigidStates"); for(PfxUInt32 i=0;i<param.numRigidBodies;i++) { pfxIntegrate(param.states[i],param.bodies[i],param.timeStep); } SCE_PFX_POP_MARKER(); return SCE_PFX_OK; }