Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/physics/src/bullet/BulletMultiThreaded/SpuRaycastTask/SpuRaycastTask.h @ 1967

Last change on this file since 1967 was 1966, checked in by rgrieder, 16 years ago

Let's go for multithreaded physics!

  • Property svn:eol-style set to native
File size: 1.2 KB
Line 
1#ifndef __SPU_RAYCAST_TASK_H
2#define __SPU_RAYCAST_TASK_H
3
4#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
5#include "BulletCollision/CollisionDispatch/btCollisionWorld.h"
6#include "LinearMath/btVector3.h"
7#include "../PlatformDefinitions.h"
8
9ATTRIBUTE_ALIGNED16(struct) RaycastGatheredObjectData
10{
11        ppu_address_t m_collisionShape;
12        void* m_spuCollisionShape;
13        btVector3       m_primitiveDimensions;
14        int             m_shapeType;
15        float   m_collisionMargin;
16        btTransform     m_worldTransform;
17};
18
19
20ATTRIBUTE_ALIGNED16(struct) SpuRaycastTaskWorkUnitOut
21{
22        btVector3 hitNormal; /* out */
23        btScalar hitFraction; /* out */
24        btCollisionWorld::LocalShapeInfo shapeInfo; /* out */
25};
26
27/* Perform a raycast on collision object */
28ATTRIBUTE_ALIGNED16(struct) SpuRaycastTaskWorkUnit
29{
30        btVector3 rayFrom; /* in */
31        btVector3 rayTo; /* in */
32        SpuRaycastTaskWorkUnitOut* output; /* out */
33};
34
35#define SPU_RAYCAST_WORK_UNITS_PER_TASK 16
36
37ATTRIBUTE_ALIGNED128(struct) SpuRaycastTaskDesc
38{
39        SpuRaycastTaskWorkUnit workUnits[SPU_RAYCAST_WORK_UNITS_PER_TASK];
40        unsigned int numWorkUnits;
41        void* spuCollisionObjectsWrappers;
42        unsigned int numSpuCollisionObjectWrappers;
43        int taskId;
44};
45
46
47void    processRaycastTask (void* userPtr, void* lsMemory);
48void*   createRaycastLocalStoreMemory ();
49
50#endif
Note: See TracBrowser for help on using the repository browser.