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

#include <btSoftBodySolverData.h>

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

Classes

class  LinkDescription
 Class describing a link for input into the system. More...
 
class  LinkNodePair
 Class representing a link as a set of three indices into the vertex array. More...
 

Public Member Functions

 btSoftBodyLinkData ()
 
virtual ~btSoftBodyLinkData ()
 
virtual void clear ()
 
int getNumLinks ()
 
virtual void createLinks (int numLinks)
 Allocate enough space in all link-related arrays to fit numLinks links. More...
 
virtual void setLinkAt (const LinkDescription &link, int linkIndex)
 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...
 
LinkNodePairgetVertexPair (int linkIndex)
 Return reference to the vertex index pair for link linkIndex as stored on the host. More...
 
float & getStrength (int linkIndex)
 Return reference to strength of link linkIndex as stored on the host. More...
 
virtual float & getStrengthCorrected (int linkIndex)
 Return a reference to the strength of the link corrected for link sorting. More...
 
float & getRestLength (int linkIndex)
 Return reference to the rest length of link linkIndex as stored on the host. More...
 
float & getLinearStiffnessCoefficient (int linkIndex)
 Return reference to linear stiffness coefficient for link linkIndex as stored on the host. More...
 
float & getMassLSC (int linkIndex)
 Return reference to the MassLSC value for link linkIndex as stored on the host. More...
 
float & getRestLengthSquared (int linkIndex)
 Return reference to rest length squared for link linkIndex as stored on the host. More...
 
Vectormath::Aos::Vector3getCurrentLength (int linkIndex)
 Return reference to current length of link linkIndex as stored on the host. More...
 
float & getLinkLengthRatio (int linkIndex)
 Return the link length ratio from for link linkIndex as stored on the host. More...
 

Protected Attributes

btAlignedObjectArray
< LinkNodePair
m_links
 
btAlignedObjectArray< float > m_linkStrength
 
btAlignedObjectArray< float > m_linksMassLSC
 
btAlignedObjectArray< float > m_linksRestLengthSquared
 
btAlignedObjectArray
< Vectormath::Aos::Vector3
m_linksCLength
 
btAlignedObjectArray< float > m_linksLengthRatio
 
btAlignedObjectArray< float > m_linksRestLength
 
btAlignedObjectArray< float > m_linksMaterialLinearStiffnessCoefficient
 

Detailed Description

Definition at line 23 of file btSoftBodySolverData.h.

Constructor & Destructor Documentation

btSoftBodyLinkData::btSoftBodyLinkData ( )
inline

Definition at line 146 of file btSoftBodySolverData.h.

virtual btSoftBodyLinkData::~btSoftBodyLinkData ( )
inlinevirtual

Definition at line 150 of file btSoftBodySolverData.h.

Member Function Documentation

virtual void btSoftBodyLinkData::clear ( )
inlinevirtual

Definition at line 154 of file btSoftBodySolverData.h.

virtual void btSoftBodyLinkData::createLinks ( int  numLinks)
inlinevirtual

Allocate enough space in all link-related arrays to fit numLinks links.

Reimplemented in btSoftBodyLinkDataDX11SIMDAware, btSoftBodyLinkDataOpenCLSIMDAware, btSoftBodyLinkDataDX11, and btSoftBodyLinkDataOpenCL.

Definition at line 171 of file btSoftBodySolverData.h.

Vectormath::Aos::Vector3& btSoftBodyLinkData::getCurrentLength ( int  linkIndex)
inline

Return reference to current length of link linkIndex as stored on the host.

Definition at line 291 of file btSoftBodySolverData.h.

float& btSoftBodyLinkData::getLinearStiffnessCoefficient ( int  linkIndex)
inline

Return reference to linear stiffness coefficient for link linkIndex as stored on the host.

Definition at line 267 of file btSoftBodySolverData.h.

float& btSoftBodyLinkData::getLinkLengthRatio ( int  linkIndex)
inline

Return the link length ratio from for link linkIndex as stored on the host.

Definition at line 299 of file btSoftBodySolverData.h.

float& btSoftBodyLinkData::getMassLSC ( int  linkIndex)
inline

Return reference to the MassLSC value for link linkIndex as stored on the host.

Definition at line 275 of file btSoftBodySolverData.h.

int btSoftBodyLinkData::getNumLinks ( )
inline

Definition at line 165 of file btSoftBodySolverData.h.

float& btSoftBodyLinkData::getRestLength ( int  linkIndex)
inline

Return reference to the rest length of link linkIndex as stored on the host.

Definition at line 259 of file btSoftBodySolverData.h.

float& btSoftBodyLinkData::getRestLengthSquared ( int  linkIndex)
inline

Return reference to rest length squared for link linkIndex as stored on the host.

Definition at line 283 of file btSoftBodySolverData.h.

float& btSoftBodyLinkData::getStrength ( int  linkIndex)
inline

Return reference to strength of link linkIndex as stored on the host.

Definition at line 242 of file btSoftBodySolverData.h.

virtual float& btSoftBodyLinkData::getStrengthCorrected ( int  linkIndex)
inlinevirtual

Return a reference to the strength of the link corrected for link sorting.

This is important if we are using data on an accelerator which has the data sorted in some fashion.

Definition at line 251 of file btSoftBodySolverData.h.

LinkNodePair& btSoftBodyLinkData::getVertexPair ( int  linkIndex)
inline

Return reference to the vertex index pair for link linkIndex as stored on the host.

Definition at line 234 of file btSoftBodySolverData.h.

virtual bool btSoftBodyLinkData::moveFromAccelerator ( )
inlinevirtual

Move data from host memory from the accelerator.

The CPU version will always return that it has moved it.

Reimplemented in btSoftBodyLinkDataDX11SIMDAware, btSoftBodyLinkDataOpenCLSIMDAware, btSoftBodyLinkDataDX11, and btSoftBodyLinkDataOpenCL.

Definition at line 224 of file btSoftBodySolverData.h.

virtual bool btSoftBodyLinkData::moveToAccelerator ( )
inlinevirtual

Move data from host memory to the accelerator.

The CPU version will always return that it has moved it.

Reimplemented in btSoftBodyLinkDataDX11SIMDAware, btSoftBodyLinkDataOpenCLSIMDAware, btSoftBodyLinkDataDX11, and btSoftBodyLinkDataOpenCL.

Definition at line 215 of file btSoftBodySolverData.h.

virtual bool btSoftBodyLinkData::onAccelerator ( )
inlinevirtual

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 in btSoftBodyLinkDataDX11SIMDAware, btSoftBodyLinkDataOpenCLSIMDAware, btSoftBodyLinkDataDX11, and btSoftBodyLinkDataOpenCL.

Definition at line 206 of file btSoftBodySolverData.h.

virtual void btSoftBodyLinkData::setLinkAt ( const LinkDescription link,
int  linkIndex 
)
inlinevirtual

Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks.

Reimplemented in btSoftBodyLinkDataDX11SIMDAware, btSoftBodyLinkDataOpenCLSIMDAware, btSoftBodyLinkDataDX11, and btSoftBodyLinkDataOpenCL.

Definition at line 188 of file btSoftBodySolverData.h.

Member Data Documentation

btAlignedObjectArray< LinkNodePair > btSoftBodyLinkData::m_links
protected

Definition at line 133 of file btSoftBodySolverData.h.

btAlignedObjectArray< Vectormath::Aos::Vector3 > btSoftBodyLinkData::m_linksCLength
protected

Definition at line 139 of file btSoftBodySolverData.h.

btAlignedObjectArray< float > btSoftBodyLinkData::m_linksLengthRatio
protected

Definition at line 141 of file btSoftBodySolverData.h.

btAlignedObjectArray< float > btSoftBodyLinkData::m_linksMassLSC
protected

Definition at line 136 of file btSoftBodySolverData.h.

btAlignedObjectArray< float > btSoftBodyLinkData::m_linksMaterialLinearStiffnessCoefficient
protected

Definition at line 143 of file btSoftBodySolverData.h.

btAlignedObjectArray< float > btSoftBodyLinkData::m_linksRestLength
protected

Definition at line 142 of file btSoftBodySolverData.h.

btAlignedObjectArray< float > btSoftBodyLinkData::m_linksRestLengthSquared
protected

Definition at line 137 of file btSoftBodySolverData.h.

btAlignedObjectArray< float > btSoftBodyLinkData::m_linkStrength
protected

Definition at line 134 of file btSoftBodySolverData.h.


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