Beispiel #1
0
dgWorld::~dgWorld()
{	
	Sync();
	dgAsyncThread::Terminate();
	dgMutexThread::Terminate();

	#ifdef _NEWTON_AMP
	if (m_amp) {
		delete m_amp;
	}
	#endif
	dgSkeletonList::Iterator iter (*this);
	for (iter.Begin(); iter; iter ++) {
		delete iter.GetNode()->GetInfo();
	}

	m_preListener.RemoveAll();
	m_postListener.RemoveAll();

	DestroyAllBodies();
	RemoveAllGroupID();
	m_pointCollision->Release();
	DestroyBody (m_sentinelBody);

	delete m_broadPhase;
}
dgWorld::~dgWorld()
{	
	Sync();
	Terminate();

	UnloadPlugins();
	m_listeners.RemoveAll();

	DestroyAllBodies();
	RemoveAllGroupID();
	m_pointCollision->Release();
	DestroyBody (m_sentinelBody);

	delete m_broadPhase;
}
Beispiel #3
0
dgWorld::~dgWorld()
{	
	DestroyAllBodies();
	RemoveAllGroupID();
	m_destroyCollision = NULL;
	ReleaseCollision(m_pointCollision);
	DestroyBody (m_sentionelBody);

	m_allocator->FreeLow (m_jointsMemory); 
	m_allocator->FreeLow (m_bodiesMemory);  
	m_allocator->FreeLow (m_islandMemory);
	m_allocator->FreeLow (m_pairMemoryBuffer);
	for (dgInt32 i = 0; i < DG_MAXIMUN_THREADS; i ++) {
		m_allocator->FreeLow (m_jacobiansMemory[i]);  
		m_allocator->FreeLow (m_internalForcesMemory[i]);  
		m_allocator->FreeLow (m_contactBuffers[i]);  
	}
}
Beispiel #4
0
dgWorld::~dgWorld()
{	
	Sync();
	dgAsyncThread::Terminate();
	dgMutexThread::Terminate();

	#ifdef _NEWTON_AMP
	if (m_amp) {
		delete m_amp;
	}
	#endif

	m_preListener.RemoveAll();
	m_postListener.RemoveAll();

	DestroyAllBodies();
	RemoveAllGroupID();
	m_pointCollision->Release();
	DestroyBody (m_sentinelBody);


	delete m_broadPhase;
}