summaryrefslogtreecommitdiff
path: root/thirdparty/bullet/Bullet3OpenCL/RigidBody/b3GpuNarrowPhase.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/bullet/Bullet3OpenCL/RigidBody/b3GpuNarrowPhase.h')
-rw-r--r--thirdparty/bullet/Bullet3OpenCL/RigidBody/b3GpuNarrowPhase.h72
1 files changed, 32 insertions, 40 deletions
diff --git a/thirdparty/bullet/Bullet3OpenCL/RigidBody/b3GpuNarrowPhase.h b/thirdparty/bullet/Bullet3OpenCL/RigidBody/b3GpuNarrowPhase.h
index 05ff3fd09e..21a68de343 100644
--- a/thirdparty/bullet/Bullet3OpenCL/RigidBody/b3GpuNarrowPhase.h
+++ b/thirdparty/bullet/Bullet3OpenCL/RigidBody/b3GpuNarrowPhase.h
@@ -9,11 +9,10 @@
class b3GpuNarrowPhase
{
protected:
-
- struct b3GpuNarrowPhaseInternalData* m_data;
+ struct b3GpuNarrowPhaseInternalData* m_data;
int m_acceleratedCompanionShapeIndex;
int m_planeBodyIndex;
- int m_static0Index;
+ int m_static0Index;
cl_context m_context;
cl_device_id m_device;
@@ -23,64 +22,58 @@ protected:
int registerConcaveMeshShape(b3AlignedObjectArray<b3Vector3>* vertices, b3AlignedObjectArray<int>* indices, b3Collidable& col, const float* scaling);
public:
-
-
-
-
b3GpuNarrowPhase(cl_context vtx, cl_device_id dev, cl_command_queue q, const struct b3Config& config);
virtual ~b3GpuNarrowPhase(void);
- int registerSphereShape(float radius);
- int registerPlaneShape(const b3Vector3& planeNormal, float planeConstant);
+ int registerSphereShape(float radius);
+ int registerPlaneShape(const b3Vector3& planeNormal, float planeConstant);
int registerCompoundShape(b3AlignedObjectArray<b3GpuChildShape>* childShapes);
int registerFace(const b3Vector3& faceNormal, float faceConstant);
-
- int registerConcaveMesh(b3AlignedObjectArray<b3Vector3>* vertices, b3AlignedObjectArray<int>* indices,const float* scaling);
-
+
+ int registerConcaveMesh(b3AlignedObjectArray<b3Vector3>* vertices, b3AlignedObjectArray<int>* indices, const float* scaling);
+
//do they need to be merged?
-
- int registerConvexHullShape(b3ConvexUtility* utilPtr);
- int registerConvexHullShape(const float* vertices, int strideInBytes, int numVertices, const float* scaling);
- int registerRigidBody(int collidableIndex, float mass, const float* position, const float* orientation, const float* aabbMin, const float* aabbMax,bool writeToGpu);
- void setObjectTransform(const float* position, const float* orientation , int bodyIndex);
+ int registerConvexHullShape(b3ConvexUtility* utilPtr);
+ int registerConvexHullShape(const float* vertices, int strideInBytes, int numVertices, const float* scaling);
+
+ int registerRigidBody(int collidableIndex, float mass, const float* position, const float* orientation, const float* aabbMin, const float* aabbMax, bool writeToGpu);
+ void setObjectTransform(const float* position, const float* orientation, int bodyIndex);
- void writeAllBodiesToGpu();
- void reset();
- void readbackAllBodiesToCpu();
- bool getObjectTransformFromCpu(float* position, float* orientation , int bodyIndex) const;
+ void writeAllBodiesToGpu();
+ void reset();
+ void readbackAllBodiesToCpu();
+ bool getObjectTransformFromCpu(float* position, float* orientation, int bodyIndex) const;
- void setObjectTransformCpu(float* position, float* orientation , int bodyIndex);
+ void setObjectTransformCpu(float* position, float* orientation, int bodyIndex);
void setObjectVelocityCpu(float* linVel, float* angVel, int bodyIndex);
-
virtual void computeContacts(cl_mem broadphasePairs, int numBroadphasePairs, cl_mem aabbsWorldSpace, int numObjects);
-
- cl_mem getBodiesGpu();
+ cl_mem getBodiesGpu();
const struct b3RigidBodyData* getBodiesCpu() const;
//struct b3RigidBodyData* getBodiesCpu();
- int getNumBodiesGpu() const;
+ int getNumBodiesGpu() const;
- cl_mem getBodyInertiasGpu();
- int getNumBodyInertiasGpu() const;
+ cl_mem getBodyInertiasGpu();
+ int getNumBodyInertiasGpu() const;
- cl_mem getCollidablesGpu();
+ cl_mem getCollidablesGpu();
const struct b3Collidable* getCollidablesCpu() const;
- int getNumCollidablesGpu() const;
+ int getNumCollidablesGpu() const;
const struct b3SapAabb* getLocalSpaceAabbsCpu() const;
const struct b3Contact4* getContactsCPU() const;
- cl_mem getContactsGpu();
- int getNumContactsGpu() const;
+ cl_mem getContactsGpu();
+ int getNumContactsGpu() const;
+
+ cl_mem getAabbLocalSpaceBufferGpu();
- cl_mem getAabbLocalSpaceBufferGpu();
-
int getNumRigidBodies() const;
int allocateCollidable();
@@ -92,18 +85,17 @@ public:
b3Collidable& getCollidableCpu(int collidableIndex);
const b3Collidable& getCollidableCpu(int collidableIndex) const;
- const b3GpuNarrowPhaseInternalData* getInternalData() const
+ const b3GpuNarrowPhaseInternalData* getInternalData() const
{
- return m_data;
+ return m_data;
}
- b3GpuNarrowPhaseInternalData* getInternalData()
+ b3GpuNarrowPhaseInternalData* getInternalData()
{
- return m_data;
+ return m_data;
}
const struct b3SapAabb& getLocalSpaceAabb(int collidableIndex) const;
};
-#endif //B3_GPU_NARROWPHASE_H
-
+#endif //B3_GPU_NARROWPHASE_H