private void DoWork() { m_mesher.ExpireFileCache(); ODEPhysRepData nextRep; while (m_running) { workQueue.TryTake(out nextRep, -1); if (!m_running) { return; } if (nextRep == null) { continue; } if (m_scene.haveActor(nextRep.actor)) { switch (nextRep.comand) { case meshWorkerCmnds.changefull: case meshWorkerCmnds.changeshapetype: case meshWorkerCmnds.changesize: GetMesh(nextRep); if (CreateActorPhysRep(nextRep) && m_scene.haveActor(nextRep.actor)) { m_scene.AddChange(nextRep.actor, changes.PhysRepData, nextRep); } break; case meshWorkerCmnds.getmesh: DoRepDataGetMesh(nextRep); break; } } } }
private void DoCacheExpire(object o) { m_mesher.ExpireFileCache(); }