Bullet Collision Detection & Physics Library
btSoftBodySolverVertexData_OpenCL.h
Go to the documentation of this file.
1 /*
2 Bullet Continuous Collision Detection and Physics Library
3 Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
4 
5 This software is provided 'as-is', without any express or implied warranty.
6 In no event will the authors be held liable for any damages arising from the use of this software.
7 Permission is granted to anyone to use this software for any purpose,
8 including commercial applications, and to alter it and redistribute it freely,
9 subject to the following restrictions:
10 
11 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
12 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
13 3. This notice may not be removed or altered from any source distribution.
14 */
15 
18 
19 #ifndef BT_SOFT_BODY_SOLVER_VERTEX_DATA_OPENCL_H
20 #define BT_SOFT_BODY_SOLVER_VERTEX_DATA_OPENCL_H
21 
22 
24 {
25 protected:
26  bool m_onGPU;
28 
29 public:
39 public:
41 
43 
44  virtual bool onAccelerator();
45 
46  virtual bool moveToAccelerator();
47 
48  virtual bool moveFromAccelerator(bool bCopy = false, bool bCopyMinimum = true);
49 };
50 
51 
52 #endif // #ifndef BT_SOFT_BODY_SOLVER_VERTEX_DATA_OPENCL_H
btOpenCLBuffer< Vectormath::Aos::Point3 > m_clVertexPosition
struct _cl_context * cl_context
Definition: cl.h:41
btOpenCLBuffer< Vectormath::Aos::Point3 > m_clVertexPreviousPosition
virtual bool onAccelerator()
Return true if data is on the accelerator.
btOpenCLBuffer< Vectormath::Aos::Vector3 > m_clVertexForceAccumulator
virtual bool moveFromAccelerator(bool bCopy=false, bool bCopyMinimum=true)
Move data to host memory from the accelerator if bCopy is false.
btSoftBodyVertexDataOpenCL(cl_command_queue queue, cl_context ctx)
btOpenCLBuffer< Vectormath::Aos::Vector3 > m_clVertexVelocity
Wrapper for vertex data information.
btOpenCLBuffer< Vectormath::Aos::Vector3 > m_clVertexNormal
struct _cl_command_queue * cl_command_queue
Definition: cl.h:42
virtual bool moveToAccelerator()
Move data from host memory to the accelerator.