add preparation for btGpuJacobiSolver
This commit is contained in:
48
opencl/gpu_rigidbody/host/btGpuJacobiSolver.h
Normal file
48
opencl/gpu_rigidbody/host/btGpuJacobiSolver.h
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
#ifndef BT_GPU_JACOBI_SOLVER_H
|
||||
#define BT_GPU_JACOBI_SOLVER_H
|
||||
#include "../../basic_initialize/btOpenCLUtils.h"
|
||||
|
||||
#include "../../gpu_sat/host/btRigidBodyCL.h"
|
||||
#include "../../gpu_sat/host/btContact4.h"
|
||||
class btTypedConstraint;
|
||||
|
||||
struct btJacobiSolverInfo
|
||||
{
|
||||
int m_fixedBodyIndex;
|
||||
|
||||
float m_deltaTime;
|
||||
float m_positionDrift;
|
||||
float m_positionConstraintCoeff;
|
||||
|
||||
|
||||
btJacobiSolverInfo()
|
||||
:m_fixedBodyIndex(0),
|
||||
m_deltaTime(1./60.f),
|
||||
m_positionDrift( 0.005f ),
|
||||
m_positionConstraintCoeff( 0.2f )
|
||||
{
|
||||
}
|
||||
};
|
||||
class btGpuJacobiSolver
|
||||
{
|
||||
protected:
|
||||
|
||||
struct btGpuJacobiSolverInternalData* m_data;
|
||||
|
||||
cl_context m_context;
|
||||
cl_device_id m_device;
|
||||
cl_command_queue m_queue;
|
||||
|
||||
public:
|
||||
|
||||
btGpuJacobiSolver(cl_context ctx, cl_device_id device, cl_command_queue queue, int pairCapacity);
|
||||
virtual ~btGpuJacobiSolver();
|
||||
|
||||
|
||||
|
||||
void solveGroup(btRigidBodyCL* bodies,btInertiaCL* inertias,int numBodies,btContact4* manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btJacobiSolverInfo& solverInfo);
|
||||
|
||||
};
|
||||
#endif //BT_GPU_JACOBI_SOLVER_H
|
||||
|
||||
Reference in New Issue
Block a user