void Database_SQLite3::listAllLoadableBlocks(core::list<v3s16> &dst)
{
	verifyDatabase();
	
	while(sqlite3_step(m_database_list) == SQLITE_ROW)
	{
		sqlite3_int64 block_i = sqlite3_column_int64(m_database_list, 0);
		v3s16 p = getIntegerAsBlock(block_i);
		//dstream<<"block_i="<<block_i<<" p="<<PP(p)<<std::endl;
		dst.push_back(p);
	}
}
void MapSector::getBlocks(core::list<MapBlock*> &dest)
{
	core::list<MapBlock*> ref_list;

	core::map<s16, MapBlock*>::Iterator bi;

	bi = m_blocks.getIterator();
	for(; bi.atEnd() == false; bi++)
	{
		MapBlock *b = bi.getNode()->getValue();
		dest.push_back(b);
	}
}
Exemple #3
0
    void fillBodyList(core::list<scene::ISceneNode *> &aPlanes, scene::ISceneNode *pNode, const c8 *sClassName, u32 iMax, ode::CIrrOdeWorld *pWorld) {
      if (pNode->getType()==ode::IRR_ODE_BODY_ID) {
        ode::CIrrOdeBody *p=(ode::CIrrOdeBody *)pNode;
        if (p->getOdeClassname().equals_ignore_case(sClassName)) {
          printf("%s found (%i)\n",sClassName,aPlanes.size());
          if (aPlanes.size()<iMax)
            aPlanes.push_back(pNode);
          else {
            m_pCtrlReceiver->removeFromScene(pNode);
            return;
          }
        }
      }

      core::list<scene::ISceneNode *> children=pNode->getChildren();
      core::list<scene::ISceneNode *>::Iterator it;

      for (it=children.begin(); it!=children.end(); it++) fillBodyList(aPlanes,*it,sClassName,iMax, pWorld);
    }