Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2006-04-11 06:48:34 +0400
committerErwin Coumans <blender@erwincoumans.com>2006-04-11 06:48:34 +0400
commite9d4518c3aae5850ec6c3ae925411c903daee431 (patch)
tree2903401efa0e366a4d8999c3e280fd868faa2722
parent2a013c1b5b3b971b1e25aa1b9f97478d4c6c30f3 (diff)
finished RemoveHandle implementation
-rw-r--r--extern/bullet/Bullet/BroadphaseCollision/AxisSweep3.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/extern/bullet/Bullet/BroadphaseCollision/AxisSweep3.cpp b/extern/bullet/Bullet/BroadphaseCollision/AxisSweep3.cpp
index 52410b2689b..000db0169b7 100644
--- a/extern/bullet/Bullet/BroadphaseCollision/AxisSweep3.cpp
+++ b/extern/bullet/Bullet/BroadphaseCollision/AxisSweep3.cpp
@@ -24,6 +24,7 @@
BroadphaseProxy* AxisSweep3::CreateProxy( const SimdVector3& min, const SimdVector3& max,int shapeType,void* userPtr )
{
unsigned short handleId = AddHandle(min,max, userPtr);
+
Handle* handle = GetHandle(handleId);
return handle;
}
@@ -204,26 +205,33 @@ void AxisSweep3::RemoveHandle(unsigned short handle)
RemoveOverlappingPairsContainingProxy(pHandle);
-
-// assert(false); // TODO
// compute current limit of edge arrays
-/* int limit = m_numHandles * 2;
-
+ int limit = m_numHandles * 2;
+
// remove the edges by sorting them up to the end of the list
for (int axis = 0; axis < 3; axis++)
{
Edge* pEdges = m_pEdges[axis];
+ int max = pHandle->m_maxEdges[axis];
+ pEdges[max].m_pos = 0xffff;
+ SortMaxUp(axis,max,false);
+
int i = pHandle->m_minEdges[axis];
- int max = pHandle->m_maxEdges[axis];
+ pEdges[i].m_pos = 0xffff;
+
+ SortMinUp(axis,i,false);
+
+ pEdges[limit-1].m_handle = 0;
+ pEdges[limit-1].m_pos = 0xffff;
- while (i < max)
- pEdges[i - 1]
}
-*/
+
// free the handle
FreeHandle(handle);
+
+
}
bool AxisSweep3::TestOverlap(int ignoreAxis,const Handle* pHandleA, const Handle* pHandleB)