Bullet Collision Detection & Physics Library
Classes | Macros | Functions | Variables
SpuGatheringCollisionTask.cpp File Reference
#include "SpuGatheringCollisionTask.h"
#include "../SpuDoubleBuffer.h"
#include "../SpuCollisionTaskProcess.h"
#include "../SpuGatheringCollisionDispatcher.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "../SpuContactManifoldCollisionAlgorithm.h"
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
#include "SpuContactResult.h"
#include "BulletCollision/CollisionShapes/btOptimizedBvh.h"
#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
#include "BulletCollision/CollisionShapes/btSphereShape.h"
#include "BulletCollision/CollisionShapes/btConvexPointCloudShape.h"
#include "BulletCollision/CollisionShapes/btCapsuleShape.h"
#include "BulletCollision/CollisionShapes/btConvexShape.h"
#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
#include "BulletCollision/CollisionShapes/btConvexHullShape.h"
#include "BulletCollision/CollisionShapes/btCompoundShape.h"
#include "SpuMinkowskiPenetrationDepthSolver.h"
#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
#include "boxBoxDistance.h"
#include "BulletMultiThreaded/vectormath2bullet.h"
#include "SpuCollisionShapes.h"
#include "BulletCollision/CollisionDispatch/btBoxBoxDetector.h"
#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h"
#include "BulletCollision/CollisionShapes/btTriangleShape.h"
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for SpuGatheringCollisionTask.cpp:

Go to the source code of this file.

Classes

struct  CollisionTask_LocalStoreMemory
 Make sure no destructors are called on this memory. More...
 
class  spuNodeCallback
 

Macros

#define IGNORE_ALIGNMENT   1
 
#define spu_printf   printf
 
#define MAX_DEGENERATE_STATS   15
 
#define USE_DEDICATED_BOX_BOX   1
 

Functions

void * createCollisionLocalStoreMemory ()
 
void deleteCollisionLocalStoreMemory ()
 
void ProcessSpuConvexConvexCollision (SpuCollisionPairInput *wuInput, CollisionTask_LocalStoreMemory *lsMemPtr, SpuContactResult &spuContacts)
 Convex versus Convex collision detection (handles collision between sphere, box, cylinder, triangle, cone, convex polyhedron etc) More...
 
void small_cache_read (void *buffer, ppu_address_t ea, size_t size)
 
void small_cache_read_triple (void *ls0, ppu_address_t ea0, void *ls1, ppu_address_t ea1, void *ls2, ppu_address_t ea2, size_t size)
 
void btConvexPlaneCollideSingleContact (SpuCollisionPairInput *wuInput, CollisionTask_LocalStoreMemory *lsMemPtr, SpuContactResult &spuContacts)
 
void ProcessConvexPlaneSpuCollision (SpuCollisionPairInput *wuInput, CollisionTask_LocalStoreMemory *lsMemPtr, SpuContactResult &spuContacts)
 
void ProcessConvexConcaveSpuCollision (SpuCollisionPairInput *wuInput, CollisionTask_LocalStoreMemory *lsMemPtr, SpuContactResult &spuContacts)
 Convex versus Concave triangle mesh collision detection (handles concave triangle mesh versus sphere, box, cylinder, triangle, cone, convex polyhedron etc) More...
 
template<typename T >
void DoSwap (T &a, T &b)
 
void dmaAndSetupCollisionObjects (SpuCollisionPairInput &collisionPairInput, CollisionTask_LocalStoreMemory &lsMem)
 
void handleCollisionPair (SpuCollisionPairInput &collisionPairInput, CollisionTask_LocalStoreMemory &lsMem, SpuContactResult &spuContacts, ppu_address_t collisionShape0Ptr, void *collisionShape0Loc, ppu_address_t collisionShape1Ptr, void *collisionShape1Loc, bool dmaShapes=true)
 
void processCollisionTask (void *userPtr, void *lsMemPtr)
 

Variables

int gSkippedCol = 0
 
int gProcessedCol = 0
 
bool gUseEpa = false
 software caching More...
 
btAlignedObjectArray
< CollisionTask_LocalStoreMemory * > 
sLocalStorePointers
 
int stats [MAX_DEGENERATE_STATS] ={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
 
int degenerateStats [MAX_DEGENERATE_STATS] ={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
 

Macro Definition Documentation

#define IGNORE_ALIGNMENT   1

Definition at line 120 of file SpuGatheringCollisionTask.cpp.

#define MAX_DEGENERATE_STATS   15

Definition at line 641 of file SpuGatheringCollisionTask.cpp.

#define spu_printf   printf

Definition at line 123 of file SpuGatheringCollisionTask.cpp.

#define USE_DEDICATED_BOX_BOX   1

Function Documentation

void btConvexPlaneCollideSingleContact ( SpuCollisionPairInput wuInput,
CollisionTask_LocalStoreMemory lsMemPtr,
SpuContactResult spuContacts 
)

report a contact. internally this will be kept persistent, and contact reduction is done

Definition at line 393 of file SpuGatheringCollisionTask.cpp.

void* createCollisionLocalStoreMemory ( )

Definition at line 200 of file SpuGatheringCollisionTask.cpp.

void deleteCollisionLocalStoreMemory ( )

Definition at line 207 of file SpuGatheringCollisionTask.cpp.

void dmaAndSetupCollisionObjects ( SpuCollisionPairInput collisionPairInput,
CollisionTask_LocalStoreMemory lsMem 
)
inline

Definition at line 807 of file SpuGatheringCollisionTask.cpp.

template<typename T >
void DoSwap ( T &  a,
T &  b 
)

Definition at line 799 of file SpuGatheringCollisionTask.cpp.

void handleCollisionPair ( SpuCollisionPairInput collisionPairInput,
CollisionTask_LocalStoreMemory lsMem,
SpuContactResult spuContacts,
ppu_address_t  collisionShape0Ptr,
void *  collisionShape0Loc,
ppu_address_t  collisionShape1Ptr,
void *  collisionShape1Loc,
bool  dmaShapes = true 
)

Definition at line 831 of file SpuGatheringCollisionTask.cpp.

void processCollisionTask ( void *  userPtr,
void *  lsMemPtr 
)

can wait on the combined DMA_MASK, or dma on the same tag

gUseEpa &&

Definition at line 1059 of file SpuGatheringCollisionTask.cpp.

void ProcessConvexConcaveSpuCollision ( SpuCollisionPairInput wuInput,
CollisionTask_LocalStoreMemory lsMemPtr,
SpuContactResult spuContacts 
)

Convex versus Concave triangle mesh collision detection (handles concave triangle mesh versus sphere, box, cylinder, triangle, cone, convex polyhedron etc)

quantize query AABB

DMA in the index info

Definition at line 540 of file SpuGatheringCollisionTask.cpp.

void ProcessConvexPlaneSpuCollision ( SpuCollisionPairInput wuInput,
CollisionTask_LocalStoreMemory lsMemPtr,
SpuContactResult spuContacts 
)

DMA in the vertices for convex shapes

Definition at line 430 of file SpuGatheringCollisionTask.cpp.

void ProcessSpuConvexConvexCollision ( SpuCollisionPairInput wuInput,
CollisionTask_LocalStoreMemory lsMemPtr,
SpuContactResult spuContacts 
)

Convex versus Convex collision detection (handles collision between sphere, box, cylinder, triangle, cone, convex polyhedron etc)

DMA in the vertices for convex shapes

Definition at line 649 of file SpuGatheringCollisionTask.cpp.

void small_cache_read ( void *  buffer,
ppu_address_t  ea,
size_t  size 
)
inline

Definition at line 221 of file SpuGatheringCollisionTask.cpp.

void small_cache_read_triple ( void *  ls0,
ppu_address_t  ea0,
void *  ls1,
ppu_address_t  ea1,
void *  ls2,
ppu_address_t  ea2,
size_t  size 
)
inline

make sure last 4 bits are the same, for cellDmaSmallGet

Definition at line 235 of file SpuGatheringCollisionTask.cpp.

Variable Documentation

int degenerateStats[MAX_DEGENERATE_STATS] ={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

Definition at line 643 of file SpuGatheringCollisionTask.cpp.

int gProcessedCol = 0

Definition at line 60 of file SpuGatheringCollisionTask.cpp.

int gSkippedCol = 0

Definition at line 59 of file SpuGatheringCollisionTask.cpp.

bool gUseEpa = false

software caching

Definition at line 109 of file SpuGatheringCollisionTask.cpp.

Definition at line 198 of file SpuGatheringCollisionTask.cpp.

int stats[MAX_DEGENERATE_STATS] ={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

Definition at line 642 of file SpuGatheringCollisionTask.cpp.