コード例 #1
0
void CharacterControllerManager::release() 
{
	while (getNbControllers()!= 0) releaseController(*getController(0));
	PxAllocatorCallback* a = mAllocator;
	this->~CharacterControllerManager();
	a->deallocate(this);
}
コード例 #2
0
	void reserve() 
	{
		if (count+1 > capacity) 
		{
			PxU32 oldCapacity = capacity;
			capacity = NextPowerOfTwo(capacity+1);
			Controller **newData = (Controller**)mAllocator->allocate(capacity*sizeof(Controller*), 0, __FILE__, __LINE__);
			Ps::memCopy(newData,data,oldCapacity*sizeof(Controller*));
			if(data)
				mAllocator->deallocate(data);
			data = newData;
		}
	}
コード例 #3
0
void VehicleSceneQueryData::free(PxAllocatorCallback& allocator)
{
	allocator.deallocate(this);
}