Bullet Collision Detection & Physics Library
|
#include <btSoftBodySolverVertexData_OpenCL.h>
Public Member Functions | |
btSoftBodyVertexDataOpenCL (cl_command_queue queue, cl_context ctx) | |
virtual | ~btSoftBodyVertexDataOpenCL () |
virtual bool | onAccelerator () |
Return true if data is on the accelerator. More... | |
virtual bool | moveToAccelerator () |
Move data from host memory to the accelerator. More... | |
virtual bool | moveFromAccelerator (bool bCopy=false, bool bCopyMinimum=true) |
Move data to host memory from the accelerator if bCopy is false. More... | |
Public Member Functions inherited from btSoftBodyVertexData | |
btSoftBodyVertexData () | |
virtual | ~btSoftBodyVertexData () |
virtual void | clear () |
int | getNumVertices () |
int | getClothIdentifier (int vertexIndex) |
void | setVertexAt (const VertexDescription &vertex, int vertexIndex) |
void | createVertices (int numVertices, int clothIdentifier, int maxVertices=0) |
Create numVertices new vertices for cloth clothIdentifier maxVertices allows a buffer zone of extra vertices for alignment or tearing reasons. More... | |
Vectormath::Aos::Point3 & | getPosition (int vertexIndex) |
Return a reference to the position of vertex vertexIndex as stored on the host. More... | |
Vectormath::Aos::Point3 | getPosition (int vertexIndex) const |
Vectormath::Aos::Point3 & | getPreviousPosition (int vertexIndex) |
Return a reference to the previous position of vertex vertexIndex as stored on the host. More... | |
Vectormath::Aos::Vector3 & | getVelocity (int vertexIndex) |
Return a reference to the velocity of vertex vertexIndex as stored on the host. More... | |
Vectormath::Aos::Vector3 & | getForceAccumulator (int vertexIndex) |
Return a reference to the force accumulator of vertex vertexIndex as stored on the host. More... | |
Vectormath::Aos::Vector3 & | getNormal (int vertexIndex) |
Return a reference to the normal of vertex vertexIndex as stored on the host. More... | |
Vectormath::Aos::Vector3 | getNormal (int vertexIndex) const |
float & | getInverseMass (int vertexIndex) |
Return a reference to the inverse mass of vertex vertexIndex as stored on the host. More... | |
float & | getArea (int vertexIndex) |
Get access to the area controlled by this vertex. More... | |
int & | getTriangleCount (int vertexIndex) |
Get access to the array of how many triangles touch each vertex. More... | |
btAlignedObjectArray < Vectormath::Aos::Point3 > & | getVertexPositions () |
Protected Attributes | |
bool | m_onGPU |
cl_command_queue | m_queue |
Protected Attributes inherited from btSoftBodyVertexData | |
btAlignedObjectArray< int > | m_clothIdentifier |
btAlignedObjectArray < Vectormath::Aos::Point3 > | m_vertexPosition |
btAlignedObjectArray < Vectormath::Aos::Point3 > | m_vertexPreviousPosition |
btAlignedObjectArray < Vectormath::Aos::Vector3 > | m_vertexVelocity |
btAlignedObjectArray < Vectormath::Aos::Vector3 > | m_vertexForceAccumulator |
btAlignedObjectArray < Vectormath::Aos::Vector3 > | m_vertexNormal |
btAlignedObjectArray< float > | m_vertexInverseMass |
btAlignedObjectArray< float > | m_vertexArea |
btAlignedObjectArray< int > | m_vertexTriangleCount |
Definition at line 23 of file btSoftBodySolverVertexData_OpenCL.h.
btSoftBodyVertexDataOpenCL::btSoftBodyVertexDataOpenCL | ( | cl_command_queue | queue, |
cl_context | ctx | ||
) |
|
virtual |
Definition at line 92 of file btSoftBodySolver_OpenCL.cpp.
|
virtual |
Move data to host memory from the accelerator if bCopy is false.
If bCopy is true, copy data to host memory from the accelerator so that data won't be moved to accelerator when moveToAccelerator() is called next time. If bCopyMinimum is true, only vertex position and normal are copied. bCopyMinimum will be meaningful only if bCopy is true. The CPU version will always return that it has moved it.
Reimplemented from btSoftBodyVertexData.
Definition at line 121 of file btSoftBodySolver_OpenCL.cpp.
|
virtual |
Move data from host memory to the accelerator.
The CPU version will always return that it has moved it.
Reimplemented from btSoftBodyVertexData.
Definition at line 102 of file btSoftBodySolver_OpenCL.cpp.
|
virtual |
Return true if data is on the accelerator.
The CPU version of this class will return true here because the CPU is the same as the accelerator.
Reimplemented from btSoftBodyVertexData.
Definition at line 97 of file btSoftBodySolver_OpenCL.cpp.
btOpenCLBuffer<int> btSoftBodyVertexDataOpenCL::m_clClothIdentifier |
Definition at line 30 of file btSoftBodySolverVertexData_OpenCL.h.
btOpenCLBuffer<float> btSoftBodyVertexDataOpenCL::m_clVertexArea |
Definition at line 37 of file btSoftBodySolverVertexData_OpenCL.h.
btOpenCLBuffer<Vectormath::Aos::Vector3> btSoftBodyVertexDataOpenCL::m_clVertexForceAccumulator |
Definition at line 34 of file btSoftBodySolverVertexData_OpenCL.h.
btOpenCLBuffer<float> btSoftBodyVertexDataOpenCL::m_clVertexInverseMass |
Definition at line 36 of file btSoftBodySolverVertexData_OpenCL.h.
btOpenCLBuffer<Vectormath::Aos::Vector3> btSoftBodyVertexDataOpenCL::m_clVertexNormal |
Definition at line 35 of file btSoftBodySolverVertexData_OpenCL.h.
btOpenCLBuffer<Vectormath::Aos::Point3> btSoftBodyVertexDataOpenCL::m_clVertexPosition |
Definition at line 31 of file btSoftBodySolverVertexData_OpenCL.h.
btOpenCLBuffer<Vectormath::Aos::Point3> btSoftBodyVertexDataOpenCL::m_clVertexPreviousPosition |
Definition at line 32 of file btSoftBodySolverVertexData_OpenCL.h.
btOpenCLBuffer<int> btSoftBodyVertexDataOpenCL::m_clVertexTriangleCount |
Definition at line 38 of file btSoftBodySolverVertexData_OpenCL.h.
btOpenCLBuffer<Vectormath::Aos::Vector3> btSoftBodyVertexDataOpenCL::m_clVertexVelocity |
Definition at line 33 of file btSoftBodySolverVertexData_OpenCL.h.
|
protected |
Definition at line 26 of file btSoftBodySolverVertexData_OpenCL.h.
|
protected |
Definition at line 27 of file btSoftBodySolverVertexData_OpenCL.h.