Bullet Collision Detection & Physics Library
Public Member Functions | Public Attributes | Protected Attributes | List of all members
btSoftBodyVertexDataOpenCL Class Reference

#include <btSoftBodySolverVertexData_OpenCL.h>

Inheritance diagram for btSoftBodyVertexDataOpenCL:
Inheritance graph
[legend]
Collaboration diagram for btSoftBodyVertexDataOpenCL:
Collaboration graph
[legend]

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::Point3getPosition (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::Point3getPreviousPosition (int vertexIndex)
 Return a reference to the previous position of vertex vertexIndex as stored on the host. More...
 
Vectormath::Aos::Vector3getVelocity (int vertexIndex)
 Return a reference to the velocity of vertex vertexIndex as stored on the host. More...
 
Vectormath::Aos::Vector3getForceAccumulator (int vertexIndex)
 Return a reference to the force accumulator of vertex vertexIndex as stored on the host. More...
 
Vectormath::Aos::Vector3getNormal (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 ()
 

Public Attributes

btOpenCLBuffer< int > m_clClothIdentifier
 
btOpenCLBuffer
< Vectormath::Aos::Point3
m_clVertexPosition
 
btOpenCLBuffer
< Vectormath::Aos::Point3
m_clVertexPreviousPosition
 
btOpenCLBuffer
< Vectormath::Aos::Vector3
m_clVertexVelocity
 
btOpenCLBuffer
< Vectormath::Aos::Vector3
m_clVertexForceAccumulator
 
btOpenCLBuffer
< Vectormath::Aos::Vector3
m_clVertexNormal
 
btOpenCLBuffer< float > m_clVertexInverseMass
 
btOpenCLBuffer< float > m_clVertexArea
 
btOpenCLBuffer< int > m_clVertexTriangleCount
 

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
 

Detailed Description

Definition at line 23 of file btSoftBodySolverVertexData_OpenCL.h.

Constructor & Destructor Documentation

btSoftBodyVertexDataOpenCL::btSoftBodyVertexDataOpenCL ( cl_command_queue  queue,
cl_context  ctx 
)
btSoftBodyVertexDataOpenCL::~btSoftBodyVertexDataOpenCL ( )
virtual

Definition at line 92 of file btSoftBodySolver_OpenCL.cpp.

Member Function Documentation

bool btSoftBodyVertexDataOpenCL::moveFromAccelerator ( bool  bCopy = false,
bool  bCopyMinimum = true 
)
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.

bool btSoftBodyVertexDataOpenCL::moveToAccelerator ( )
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.

bool btSoftBodyVertexDataOpenCL::onAccelerator ( )
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.

Member Data Documentation

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.

bool btSoftBodyVertexDataOpenCL::m_onGPU
protected

Definition at line 26 of file btSoftBodySolverVertexData_OpenCL.h.

cl_command_queue btSoftBodyVertexDataOpenCL::m_queue
protected

Definition at line 27 of file btSoftBodySolverVertexData_OpenCL.h.


The documentation for this class was generated from the following files: