Bullet Collision Detection & Physics Library
|
#include <btSoftBodySolverTriangleData_OpenCL.h>
Classes | |
struct | btSomePair |
Start and length values for computation batches over link data. More... | |
Public Member Functions | |
btSoftBodyTriangleDataOpenCL (cl_command_queue queue, cl_context ctx) | |
virtual | ~btSoftBodyTriangleDataOpenCL () |
virtual void | createTriangles (int numTriangles) |
Allocate enough space in all link-related arrays to fit numLinks links. More... | |
virtual void | setTriangleAt (const btSoftBodyTriangleData::TriangleDescription &triangle, int triangleIndex) |
Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks. More... | |
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 () |
Move data from host memory from the accelerator. More... | |
void | generateBatches () |
Generate (and later update) the batching for the entire triangle set. More... | |
Public Member Functions inherited from btSoftBodyTriangleData | |
btSoftBodyTriangleData () | |
virtual | ~btSoftBodyTriangleData () |
virtual void | clear () |
int | getNumTriangles () |
const TriangleNodeSet & | getVertexSet (int triangleIndex) |
Return the vertex index set for triangle triangleIndex as stored on the host. More... | |
float & | getTriangleArea (int triangleIndex) |
Get access to the triangle area. More... | |
Vectormath::Aos::Vector3 & | getNormal (int triangleIndex) |
Get access to the normal vector for this triangle. More... | |
Public Attributes | |
bool | m_onGPU |
cl_command_queue | m_queue |
btOpenCLBuffer < btSoftBodyTriangleData::TriangleNodeSet > | m_clVertexIndices |
btOpenCLBuffer< float > | m_clArea |
btOpenCLBuffer < Vectormath::Aos::Vector3 > | m_clNormal |
btAlignedObjectArray< int > | m_triangleAddresses |
Link addressing information for each cloth. More... | |
btAlignedObjectArray< btSomePair > | m_batchStartLengths |
Additional Inherited Members | |
Protected Attributes inherited from btSoftBodyTriangleData | |
btAlignedObjectArray < TriangleNodeSet > | m_vertexIndices |
btAlignedObjectArray< float > | m_area |
btAlignedObjectArray < Vectormath::Aos::Vector3 > | m_normal |
Definition at line 25 of file btSoftBodySolverTriangleData_OpenCL.h.
btSoftBodyTriangleDataOpenCL::btSoftBodyTriangleDataOpenCL | ( | cl_command_queue | queue, |
cl_context | ctx | ||
) |
Definition at line 392 of file btSoftBodySolver_OpenCL.cpp.
|
virtual |
Definition at line 400 of file btSoftBodySolver_OpenCL.cpp.
|
virtual |
Allocate enough space in all link-related arrays to fit numLinks links.
Reimplemented from btSoftBodyTriangleData.
Definition at line 405 of file btSoftBodySolver_OpenCL.cpp.
void btSoftBodyTriangleDataOpenCL::generateBatches | ( | ) |
Generate (and later update) the batching for the entire triangle set.
This redoes a lot of work because it batches the entire set when each cloth is inserted. In theory we could delay it until just before we need the cloth. It's a one-off overhead, though, so that is a later optimisation.
Definition at line 461 of file btSoftBodySolver_OpenCL.cpp.
|
virtual |
Move data from host memory from the accelerator.
The CPU version will always return that it has moved it.
Reimplemented from btSoftBodyTriangleData.
Definition at line 442 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 btSoftBodyTriangleData.
Definition at line 429 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 btSoftBodyTriangleData.
Definition at line 424 of file btSoftBodySolver_OpenCL.cpp.
|
virtual |
Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks.
Reimplemented from btSoftBodyTriangleData.
Definition at line 417 of file btSoftBodySolver_OpenCL.cpp.
btAlignedObjectArray< btSomePair > btSoftBodyTriangleDataOpenCL::m_batchStartLengths |
Definition at line 54 of file btSoftBodySolverTriangleData_OpenCL.h.
btOpenCLBuffer<float> btSoftBodyTriangleDataOpenCL::m_clArea |
Definition at line 32 of file btSoftBodySolverTriangleData_OpenCL.h.
btOpenCLBuffer<Vectormath::Aos::Vector3> btSoftBodyTriangleDataOpenCL::m_clNormal |
Definition at line 33 of file btSoftBodySolverTriangleData_OpenCL.h.
btOpenCLBuffer<btSoftBodyTriangleData::TriangleNodeSet> btSoftBodyTriangleDataOpenCL::m_clVertexIndices |
Definition at line 31 of file btSoftBodySolverTriangleData_OpenCL.h.
bool btSoftBodyTriangleDataOpenCL::m_onGPU |
Definition at line 28 of file btSoftBodySolverTriangleData_OpenCL.h.
cl_command_queue btSoftBodyTriangleDataOpenCL::m_queue |
Definition at line 29 of file btSoftBodySolverTriangleData_OpenCL.h.
btAlignedObjectArray< int > btSoftBodyTriangleDataOpenCL::m_triangleAddresses |
Link addressing information for each cloth.
Allows link locations to be computed independently of data batching.
Definition at line 39 of file btSoftBodySolverTriangleData_OpenCL.h.