Classes | Public Member Functions | Protected Attributes

btSoftBodyLinkData Class Reference

#include <btSoftBodySolverData.h>

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

List of all members.

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.
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.
virtual bool onAccelerator ()
 Return true if data is on the accelerator.
virtual bool moveToAccelerator ()
 Move data from host memory to the accelerator.
virtual bool moveFromAccelerator ()
 Move data from host memory from the accelerator.
LinkNodePairgetVertexPair (int linkIndex)
 Return reference to the vertex index pair for link linkIndex as stored on the host.
float & getStrength (int linkIndex)
 Return reference to strength of link linkIndex as stored on the host.
virtual float & getStrengthCorrected (int linkIndex)
 Return a reference to the strength of the link corrected for link sorting.
float & getRestLength (int linkIndex)
 Return reference to the rest length of link linkIndex as stored on the host.
float & getLinearStiffnessCoefficient (int linkIndex)
 Return reference to linear stiffness coefficient for link linkIndex as stored on the host.
float & getMassLSC (int linkIndex)
 Return reference to the MassLSC value for link linkIndex as stored on the host.
float & getRestLengthSquared (int linkIndex)
 Return reference to rest length squared for link linkIndex as stored on the host.
Vectormath::Aos::Vector3getCurrentLength (int linkIndex)
 Return reference to current length of link linkIndex as stored on the host.
float & getLinkLengthRatio (int linkIndex)
 Return the link length ratio from for link linkIndex as stored on the host.

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 (  )  [inline, virtual]

Definition at line 150 of file btSoftBodySolverData.h.


Member Function Documentation

virtual void btSoftBodyLinkData::clear (  )  [inline, virtual]

Definition at line 154 of file btSoftBodySolverData.h.

virtual void btSoftBodyLinkData::createLinks ( int  numLinks  )  [inline, virtual]

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

Reimplemented in btSoftBodyLinkDataDX11, btSoftBodyLinkDataDX11SIMDAware, btSoftBodyLinkDataOpenCL, and btSoftBodyLinkDataOpenCLSIMDAware.

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  )  [inline, virtual]

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 (  )  [inline, virtual]

Move data from host memory from the accelerator.

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

Reimplemented in btSoftBodyLinkDataDX11, btSoftBodyLinkDataDX11SIMDAware, btSoftBodyLinkDataOpenCL, and btSoftBodyLinkDataOpenCLSIMDAware.

Definition at line 224 of file btSoftBodySolverData.h.

virtual bool btSoftBodyLinkData::moveToAccelerator (  )  [inline, virtual]

Move data from host memory to the accelerator.

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

Reimplemented in btSoftBodyLinkDataDX11, btSoftBodyLinkDataDX11SIMDAware, btSoftBodyLinkDataOpenCL, and btSoftBodyLinkDataOpenCLSIMDAware.

Definition at line 215 of file btSoftBodySolverData.h.

virtual bool btSoftBodyLinkData::onAccelerator (  )  [inline, 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 in btSoftBodyLinkDataDX11, btSoftBodyLinkDataDX11SIMDAware, btSoftBodyLinkDataOpenCL, and btSoftBodyLinkDataOpenCLSIMDAware.

Definition at line 206 of file btSoftBodySolverData.h.

virtual void btSoftBodyLinkData::setLinkAt ( const LinkDescription link,
int  linkIndex 
) [inline, virtual]

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

Reimplemented in btSoftBodyLinkDataDX11, btSoftBodyLinkDataDX11SIMDAware, btSoftBodyLinkDataOpenCL, and btSoftBodyLinkDataOpenCLSIMDAware.

Definition at line 188 of file btSoftBodySolverData.h.


Member Data Documentation

Definition at line 133 of file btSoftBodySolverData.h.

Definition at line 139 of file btSoftBodySolverData.h.

Definition at line 141 of file btSoftBodySolverData.h.

Definition at line 136 of file btSoftBodySolverData.h.

Definition at line 143 of file btSoftBodySolverData.h.

Definition at line 142 of file btSoftBodySolverData.h.

Definition at line 137 of file btSoftBodySolverData.h.

Definition at line 134 of file btSoftBodySolverData.h.


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