Moderators: Sascha Willems, Thomas
OK, i will check too... it should all be tri-sided polygon and my function was created as such but maybe I made a mistake in the mesh creation in blender.
void dgCollisionBVH::EndBuild(dgInt32 optimize)
{
dgVector p0;
dgVector p1;
bool state = optimize ? true : false;
m_builder->End(state);
Create (*m_builder, state);
CalculateAdjacendy();
GetAABB (p0, p1);
SetCollisionBBox (p0, p1);
delete m_builder;
m_builder = NULL;
}
void dgMemoryAllocator::FreeLow (void* const retPtr)
{
dgMemoryInfo* const info = ((dgMemoryInfo*) (retPtr)) - 1;
dgAssert (info->m_allocator == this);
dgAtomicExchangeAndAdd (&m_memoryUsed, -info->m_size);
#ifdef _DEBUG
memset (retPtr, 0, info->m_workingSize);
#endif
m_free (info->m_ptr, dgUnsigned32 (info->m_size));
}
if (normalCount) {
dgStack<dgInt32> indexArray (normalCount);
dgInt32 newNormalCount = dgVertexListToIndexList (&pool[0].m_x, sizeof (dgTriplex), sizeof (dgTriplex), 0, normalCount, &indexArray[0], dgFloat32 (1.0e-6f));
Users browsing this forum: No registered users and 8 guests