Modification to SPU collision detection and ray cast code to share implementation of GJK, EPA, Minkowski penetration depth solver, voronoi simplex solver across multi-threaded and non-multi-threaded versions.

This commit is contained in:
john.mccutchan
2008-09-29 22:48:44 +00:00
parent 2b71784c86
commit f3b417df6c
15 changed files with 875 additions and 546 deletions

View File

@@ -632,7 +632,7 @@ void performRaycastAgainstCompound (RaycastGatheredObjectData* gatheredObjectDat
void
performRaycastAgainstConvex (RaycastGatheredObjectData* gatheredObjectData, const SpuRaycastTaskWorkUnit& workUnit, SpuRaycastTaskWorkUnitOut* workUnitOut, RaycastTask_LocalStoreMemory* lsMemPtr)
{
SpuVoronoiSimplexSolver simplexSolver;
btVoronoiSimplexSolver simplexSolver;
btTransform rayFromTrans, rayToTrans;
rayFromTrans.setIdentity ();

View File

@@ -22,7 +22,7 @@ subject to the following restrictions:
SpuSubsimplexRayCast::SpuSubsimplexRayCast (void* shapeB, SpuConvexPolyhedronVertexData* convexDataB, int shapeTypeB, float marginB,
SpuVoronoiSimplexSolver* simplexSolver)
btVoronoiSimplexSolver* simplexSolver)
:m_simplexSolver(simplexSolver), m_shapeB(shapeB), m_convexDataB(convexDataB), m_shapeTypeB(shapeTypeB), m_marginB(marginB)
{
}

View File

@@ -17,7 +17,7 @@ subject to the following restrictions:
#ifndef SPU_SUBSIMPLEX_RAY_CAST_H
#define SPU_SUBSIMPLEX_RAY_CAST_H
#include "../SpuNarrowPhaseCollisionTask/SpuVoronoiSimplexSolver.h"
#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h"
#include "../SpuNarrowPhaseCollisionTask/SpuCollisionShapes.h"
#include "SpuRaycastTask.h"
@@ -35,7 +35,7 @@ struct SpuCastResult
/// Objects should not start in overlap, otherwise results are not defined.
class SpuSubsimplexRayCast
{
SpuVoronoiSimplexSolver* m_simplexSolver;
btVoronoiSimplexSolver* m_simplexSolver;
void* m_shapeB;
SpuConvexPolyhedronVertexData* m_convexDataB;
int m_shapeTypeB;
@@ -43,7 +43,7 @@ class SpuSubsimplexRayCast
public:
SpuSubsimplexRayCast (void* shapeB, SpuConvexPolyhedronVertexData* convexDataB, int shapeTypeB, float marginB,
SpuVoronoiSimplexSolver* simplexSolver);
btVoronoiSimplexSolver* simplexSolver);
//virtual ~btSubsimplexConvexCast();