19 #include "../PlatformDefinitions.h"
20 #include "../SpuFakeDma.h"
24 #include <spu_printf.h>
27 #define spu_printf printf
30 #define MAX_NUM_BODIES 8192
62 spu_printf(
"SPU Error: exceed number of bodies, see MAX_NUM_BODIES in SpuSampleTask.cpp\n");
65 int dmaArraySize = batchSize*
sizeof(
void*);
81 for (
int i=0;i<batchSize;i++)
97 float timeStep = 1.f/60.f;
106 void* ptr = (
void*)localPtr;
126 int dmaArraySize = batchSize*
sizeof(
void*);
130 spu_printf(
"SPU Error: exceed number of bodies, see MAX_NUM_BODIES in SpuSampleTask.cpp\n");
138 if (dmaArraySize>=16)
148 for (
int i=0;i<batchSize;i++)
160 cellDmaGet((
void*)localPtr, ppuRigidBodyAddress , dmaBodySize,
DMA_TAG(1), 0, 0);
164 float timeStep = 1.f/60.f;
179 void* ptr = (
void*)localPtr;
200 #if defined(__CELLOS_LV2__) || defined (LIBSPE2)
206 return &gLocalStoreMemory;
void * gPointerArray[8192]
int cellDmaGet(void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid)
void predictIntegratedTransform(btScalar step, btTransform &predictedTransform)
continuous collision detection needs prediction
void * createSampleLocalStoreMemory()
int cellDmaLargeGet(void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid)
cellDmaLargeGet Win32 replacements for Cell DMA to allow simulating most of the SPU code (just memcpy...
int stallingUnalignedDmaSmallGet(void *ls, uint64_t ea, uint32_t size)
this unalignedDma should not be frequently used, only for small data. It handles alignment and perfor...
const btTransform & getInterpolationWorldTransform() const
int cellDmaLargePut(const void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid)
cellDmaLargePut Win32 replacements for Cell DMA to allow simulating most of the SPU code (just memcpy...
void integrateVelocities(btScalar step)
bool isStaticOrKinematicObject() const
btCollisionObject can be used to manage collision detection objects.
The btRigidBody is the main class for rigid body objects.
void cellDmaWaitTagStatusAll(int ignore)
cellDmaWaitTagStatusAll Win32 replacements for Cell DMA to allow simulating most of the SPU code (jus...
void proceedToTransform(const btTransform &newTrans)
char gLocalRigidBody[sizeof(btRigidBody)+16]
#define ATTRIBUTE_ALIGNED16(a)
void applyDamping(btScalar timeStep)
applyDamping damps the velocity, using the given m_linearDamping and m_angularDamping ...
void processSampleTask(void *userPtr, void *lsMemory)