Bullet Collision Detection & Physics Library
btSoftBodySolverVertexData_DX11.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 
16 
19 
20 
21 #ifndef BT_SOFT_BHODY_SOLVER_VERTEX_DATA_DX11_H
22 #define BT_SOFT_BHODY_SOLVER_VERTEX_DATA_DX11_H
23 
24 class btSoftBodyLinkData;
26 
27 struct ID3D11Device;
28 struct ID3D11DeviceContext;
29 
31 {
32 protected:
33  bool m_onGPU;
34  ID3D11Device *m_d3dDevice;
35  ID3D11DeviceContext *m_d3dDeviceContext;
36 
37 public:
47 
48 
49  //ID3D11Buffer* readBackBuffer;
50 
51 public:
52  btSoftBodyVertexDataDX11( ID3D11Device *d3dDevice, ID3D11DeviceContext *d3dDeviceContext );
53  virtual ~btSoftBodyVertexDataDX11();
54 
55  virtual bool onAccelerator();
56  virtual bool moveToAccelerator();
57 
58  virtual bool moveFromAccelerator(bool bCopy = false, bool bCopyMinimum = true);
59 };
60 
61 
62 #endif // #ifndef BT_SOFT_BHODY_SOLVER_VERTEX_DATA_DX11_H
63 
btDX11Buffer< Vectormath::Aos::Point3 > m_dx11VertexPreviousPosition
btDX11Buffer< Vectormath::Aos::Vector3 > m_dx11VertexVelocity
btSoftBodyVertexDataDX11(ID3D11Device *d3dDevice, ID3D11DeviceContext *d3dDeviceContext)
virtual bool moveFromAccelerator(bool bCopy=false, bool bCopyMinimum=true)
Move data to host memory from the accelerator if bCopy is false.
btDX11Buffer< Vectormath::Aos::Vector3 > m_dx11VertexForceAccumulator
btDX11Buffer< float > m_dx11VertexInverseMass
btDX11Buffer< Vectormath::Aos::Vector3 > m_dx11VertexNormal
virtual bool onAccelerator()
Return true if data is on the accelerator.
Class describing a link for input into the system.
Wrapper for vertex data information.
virtual bool moveToAccelerator()
Move data from host memory to the accelerator.
btDX11Buffer< Vectormath::Aos::Point3 > m_dx11VertexPosition