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

#include <btSoftBodySolver_OpenCLSIMDAware.h>

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

Public Member Functions

 btOpenCLSoftBodySolverSIMDAware (cl_command_queue queue, cl_context ctx, bool bUpdateAchchoredNodePos=false)
 
virtual ~btOpenCLSoftBodySolverSIMDAware ()
 
virtual SolverTypes getSolverType () const
 Return the type of the solver. More...
 
virtual btSoftBodyLinkDatagetLinkData ()
 
virtual void optimize (btAlignedObjectArray< btSoftBody * > &softBodies, bool forceUpdate=false)
 Optimize soft bodies in this solver. More...
 
virtual void solveConstraints (float solverdt)
 Solve constraints for a set of soft bodies. More...
 
- Public Member Functions inherited from btOpenCLSoftBodySolver
 btOpenCLSoftBodySolver (cl_command_queue queue, cl_context ctx, bool bUpdateAchchoredNodePos=false)
 
virtual ~btOpenCLSoftBodySolver ()
 
btOpenCLAcceleratedSoftBodyInterfacefindSoftBodyInterface (const btSoftBody *const softBody)
 
virtual btSoftBodyVertexDatagetVertexData ()
 
virtual btSoftBodyTriangleDatagetTriangleData ()
 
virtual bool checkInitialized ()
 Ensure that this solver is initialized. More...
 
virtual void updateSoftBodies ()
 Perform necessary per-step updates of soft bodies such as recomputing normals and bounding boxes. More...
 
virtual void copyBackToSoftBodies (bool bMove=true)
 Copy necessary data back to the original soft body source objects. More...
 
virtual void predictMotion (float solverdt)
 Predict motion of soft bodies into next timestep. More...
 
virtual void processCollision (btSoftBody *, const btCollisionObjectWrapper *)
 
virtual void processCollision (btSoftBody *, btSoftBody *)
 Process a collision between two soft bodies. More...
 
virtual void setDefaultWorkgroupSize (size_t workGroupSize)
 
virtual size_t getDefaultWorkGroupSize () const
 
void setCLFunctions (CLFunctions *funcs)
 
- Public Member Functions inherited from btSoftBodySolver
 btSoftBodySolver ()
 
virtual ~btSoftBodySolver ()
 
virtual void processCollision (btSoftBody *, const struct btCollisionObjectWrapper *)=0
 Process a collision between one of the world's soft bodies and another collision object. More...
 
virtual void setNumberOfPositionIterations (int iterations)
 Set the number of velocity constraint solver iterations this solver uses. More...
 
virtual int getNumberOfPositionIterations ()
 Get the number of velocity constraint solver iterations this solver uses. More...
 
virtual void setNumberOfVelocityIterations (int iterations)
 Set the number of velocity constraint solver iterations this solver uses. More...
 
virtual int getNumberOfVelocityIterations ()
 Get the number of velocity constraint solver iterations this solver uses. More...
 
float getTimeScale ()
 Return the timescale that the simulation is using. More...
 

Protected Member Functions

virtual bool buildShaders ()
 
void updateConstants (float timeStep)
 
float computeTriangleArea (const Vectormath::Aos::Point3 &vertex0, const Vectormath::Aos::Point3 &vertex1, const Vectormath::Aos::Point3 &vertex2)
 
void solveLinksForPosition (int startLink, int numLinks, float kst, float ti)
 
void solveCollisionsAndUpdateVelocities (float isolverdt)
 
- Protected Member Functions inherited from btOpenCLSoftBodySolver
void resetNormalsAndAreas (int numVertices)
 
void normalizeNormalsAndAreas (int numVertices)
 
void executeUpdateSoftBodies (int firstTriangle, int numTriangles)
 
void prepareCollisionConstraints ()
 Sort the collision object details array and generate indexing into it for the per-cloth collision object array. More...
 
Vectormath::Aos::Vector3 ProjectOnAxis (const Vectormath::Aos::Vector3 &v, const Vectormath::Aos::Vector3 &a)
 
void ApplyClampedForce (float solverdt, const Vectormath::Aos::Vector3 &force, const Vectormath::Aos::Vector3 &vertexVelocity, float inverseMass, Vectormath::Aos::Vector3 &vertexForce)
 
int findSoftBodyIndex (const btSoftBody *const softBody)
 
virtual void applyForces (float solverdt)
 
void updateFixedVertexPositions ()
 
virtual void integrate (float solverdt)
 Integrate motion on the solver. More...
 
float computeTriangleArea (const Vectormath::Aos::Point3 &vertex0, const Vectormath::Aos::Point3 &vertex1, const Vectormath::Aos::Point3 &vertex2)
 
void prepareLinks ()
 
void solveLinksForVelocity (int startLink, int numLinks, float kst)
 
void updatePositionsFromVelocities (float solverdt)
 
void updateVelocitiesFromPositionsWithVelocities (float isolverdt)
 
void updateVelocitiesFromPositionsWithoutVelocities (float isolverdt)
 
void updateBounds ()
 
void releaseKernels ()
 

Protected Attributes

btSoftBodyLinkDataOpenCLSIMDAware m_linkData
 
- Protected Attributes inherited from btOpenCLSoftBodySolver
CLFunctions m_defaultCLFunctions
 
CLFunctionsm_currentCLFunctions
 
bool m_updateSolverConstants
 Variable to define whether we need to update solver constants on the next iteration. More...
 
bool m_shadersInitialized
 
btAlignedObjectArray
< btOpenCLAcceleratedSoftBodyInterface * > 
m_softBodySet
 Cloths owned by this solver. More...
 
btAlignedObjectArray
< Vectormath::Aos::Vector3
m_perClothAcceleration
 Acceleration value to be applied to all non-static vertices in the solver. More...
 
btOpenCLBuffer
< Vectormath::Aos::Vector3
m_clPerClothAcceleration
 
btAlignedObjectArray
< Vectormath::Aos::Vector3
m_perClothWindVelocity
 Wind velocity to be applied normal to all non-static vertices in the solver. More...
 
btOpenCLBuffer
< Vectormath::Aos::Vector3
m_clPerClothWindVelocity
 
btAlignedObjectArray< float > m_perClothDampingFactor
 Velocity damping factor. More...
 
btOpenCLBuffer< float > m_clPerClothDampingFactor
 
btAlignedObjectArray< float > m_perClothVelocityCorrectionCoefficient
 Velocity correction coefficient. More...
 
btOpenCLBuffer< float > m_clPerClothVelocityCorrectionCoefficient
 
btAlignedObjectArray< float > m_perClothLiftFactor
 Lift parameter for wind effect on cloth. More...
 
btOpenCLBuffer< float > m_clPerClothLiftFactor
 
btAlignedObjectArray< float > m_perClothDragFactor
 Drag parameter for wind effect on cloth. More...
 
btOpenCLBuffer< float > m_clPerClothDragFactor
 
btAlignedObjectArray< float > m_perClothMediumDensity
 Density of the medium in which each cloth sits. More...
 
btOpenCLBuffer< float > m_clPerClothMediumDensity
 
btAlignedObjectArray
< CollisionObjectIndices
m_perClothCollisionObjects
 Collision shape details: pair of index of first collision shape for the cloth and number of collision objects. More...
 
btOpenCLBuffer
< CollisionObjectIndices
m_clPerClothCollisionObjects
 
btAlignedObjectArray
< CollisionShapeDescription
m_collisionObjectDetails
 Collision shapes being passed across to the cloths in this solver. More...
 
btOpenCLBuffer
< CollisionShapeDescription
m_clCollisionObjectDetails
 
btAlignedObjectArray< float > m_perClothFriction
 Friction coefficient for each cloth. More...
 
btOpenCLBuffer< float > m_clPerClothFriction
 
btAlignedObjectArray
< AnchorNodeInfoCL
m_anchorNodeInfoArray
 
btAlignedObjectArray
< Vectormath::Aos::Point3
m_anchorPosition
 
btOpenCLBuffer
< Vectormath::Aos::Point3
m_clAnchorPosition
 
btAlignedObjectArray< int > m_anchorIndex
 
btOpenCLBuffer< int > m_clAnchorIndex
 
bool m_bUpdateAnchoredNodePos
 
cl_kernel m_prepareLinksKernel
 
cl_kernel m_solvePositionsFromLinksKernel
 
cl_kernel m_updateConstantsKernel
 
cl_kernel m_integrateKernel
 
cl_kernel m_addVelocityKernel
 
cl_kernel m_updatePositionsFromVelocitiesKernel
 
cl_kernel m_updateVelocitiesFromPositionsWithoutVelocitiesKernel
 
cl_kernel m_updateVelocitiesFromPositionsWithVelocitiesKernel
 
cl_kernel m_vSolveLinksKernel
 
cl_kernel m_solveCollisionsAndUpdateVelocitiesKernel
 
cl_kernel m_resetNormalsAndAreasKernel
 
cl_kernel m_normalizeNormalsAndAreasKernel
 
cl_kernel m_updateSoftBodiesKernel
 
cl_kernel m_outputToVertexArrayKernel
 
cl_kernel m_applyForcesKernel
 
cl_kernel m_updateFixedVertexPositionsKernel
 
cl_command_queue m_cqCommandQue
 
cl_context m_cxMainContext
 
size_t m_defaultWorkGroupSize
 
- Protected Attributes inherited from btSoftBodySolver
int m_numberOfPositionIterations
 
int m_numberOfVelocityIterations
 
float m_timeScale
 

Additional Inherited Members

- Public Types inherited from btSoftBodySolver
enum  SolverTypes {
  DEFAULT_SOLVER,
  CPU_SOLVER,
  CL_SOLVER,
  CL_SIMD_SOLVER,
  DX_SOLVER,
  DX_SIMD_SOLVER
}
 
- Public Attributes inherited from btOpenCLSoftBodySolver
btSoftBodyLinkDataOpenCL m_linkData
 
btSoftBodyVertexDataOpenCL m_vertexData
 
btSoftBodyTriangleDataOpenCL m_triangleData
 

Detailed Description

Definition at line 32 of file btSoftBodySolver_OpenCLSIMDAware.h.

Constructor & Destructor Documentation

btOpenCLSoftBodySolverSIMDAware::btOpenCLSoftBodySolverSIMDAware ( cl_command_queue  queue,
cl_context  ctx,
bool  bUpdateAchchoredNodePos = false 
)

Definition at line 172 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

btOpenCLSoftBodySolverSIMDAware::~btOpenCLSoftBodySolverSIMDAware ( )
virtual

Definition at line 184 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

Member Function Documentation

bool btOpenCLSoftBodySolverSIMDAware::buildShaders ( )
protectedvirtual

Reimplemented from btOpenCLSoftBodySolver.

Definition at line 551 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

float btOpenCLSoftBodySolverSIMDAware::computeTriangleArea ( const Vectormath::Aos::Point3 vertex0,
const Vectormath::Aos::Point3 vertex1,
const Vectormath::Aos::Point3 vertex2 
)
protected
btSoftBodyLinkData & btOpenCLSoftBodySolverSIMDAware::getLinkData ( )
virtual

Reimplemented from btOpenCLSoftBodySolver.

Definition at line 383 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

virtual SolverTypes btOpenCLSoftBodySolverSIMDAware::getSolverType ( ) const
inlinevirtual

Return the type of the solver.

Reimplemented from btOpenCLSoftBodySolver.

Definition at line 66 of file btSoftBodySolver_OpenCLSIMDAware.h.

void btOpenCLSoftBodySolverSIMDAware::optimize ( btAlignedObjectArray< btSoftBody * > &  softBodies,
bool  forceUpdate = false 
)
virtual

Optimize soft bodies in this solver.

Reimplemented from btOpenCLSoftBodySolver.

Definition at line 189 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

void btOpenCLSoftBodySolverSIMDAware::solveCollisionsAndUpdateVelocities ( float  isolverdt)
protectedvirtual

Reimplemented from btOpenCLSoftBodySolver.

Definition at line 508 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

void btOpenCLSoftBodySolverSIMDAware::solveConstraints ( float  solverdt)
virtual

Solve constraints for a set of soft bodies.

Reimplemented from btOpenCLSoftBodySolver.

Definition at line 424 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

void btOpenCLSoftBodySolverSIMDAware::solveLinksForPosition ( int  startLink,
int  numLinks,
float  kst,
float  ti 
)
protectedvirtual

Reimplemented from btOpenCLSoftBodySolver.

Definition at line 475 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

void btOpenCLSoftBodySolverSIMDAware::updateConstants ( float  timeStep)
protectedvirtual

Reimplemented from btOpenCLSoftBodySolver.

Definition at line 392 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

Member Data Documentation

btSoftBodyLinkDataOpenCLSIMDAware btOpenCLSoftBodySolverSIMDAware::m_linkData
protected

Definition at line 37 of file btSoftBodySolver_OpenCLSIMDAware.h.


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