コード例 #1
0
ファイル: EntityList.cpp プロジェクト: ClickerMonkey/Ents
VectorIterator<Entity*> EntityList::filterByControllers(const BitSet &controllerIds)
{
	return filter( [=] (Entity *e) -> bool 
	{
		return controllerIds.intersects( e->getEntityType()->getControllers().getBitSet() );
	});
}
コード例 #2
0
ファイル: TestBitSet.cpp プロジェクト: AJ92/EntityCore
int main()
{
  BitSet<8> a;
  a.set(0);
  a.set(1);
  a.set(2);

  BitSet<8> b;
  b.set(3);

  cout << a.intersects(b) << endl;

  b.set(1);

  cout << a.intersects(b) << endl;

  a.set(451);

  cout << a.size() << endl;

  return 0;
}