Classes | Public Member Functions | Public Attributes

btSoftBodyLinkDataDX11 Class Reference

#include <btSoftBodySolverLinkData_DX11.h>

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

List of all members.

Classes

struct  BatchPair

Public Member Functions

 btSoftBodyLinkDataDX11 (ID3D11Device *d3dDevice, ID3D11DeviceContext *d3dDeviceContext)
virtual ~btSoftBodyLinkDataDX11 ()
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.
void generateBatches ()
 Generate (and later update) the batching for the entire link set.

Public Attributes

bool m_onGPU
ID3D11Device * m_d3dDevice
ID3D11DeviceContext * m_d3dDeviceContext
btDX11Buffer< LinkNodePairm_dx11Links
btDX11Buffer< float > m_dx11LinkStrength
btDX11Buffer< float > m_dx11LinksMassLSC
btDX11Buffer< float > m_dx11LinksRestLengthSquared
btDX11Buffer
< Vectormath::Aos::Vector3
m_dx11LinksCLength
btDX11Buffer< float > m_dx11LinksLengthRatio
btDX11Buffer< float > m_dx11LinksRestLength
btDX11Buffer< float > m_dx11LinksMaterialLinearStiffnessCoefficient
btAlignedObjectArray< int > m_linkAddresses
 Link addressing information for each cloth.
btAlignedObjectArray< BatchPairm_batchStartLengths
 Start and length values for computation batches over link data.

Detailed Description

Definition at line 28 of file btSoftBodySolverLinkData_DX11.h.


Constructor & Destructor Documentation

btSoftBodyLinkDataDX11::btSoftBodyLinkDataDX11 ( ID3D11Device *  d3dDevice,
ID3D11DeviceContext *  d3dDeviceContext 
)
btSoftBodyLinkDataDX11::~btSoftBodyLinkDataDX11 (  )  [virtual]

Definition at line 67 of file btSoftBodySolver_DX11.cpp.


Member Function Documentation

void btSoftBodyLinkDataDX11::createLinks ( int  numLinks  )  [virtual]

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

Reimplemented from btSoftBodyLinkData.

Definition at line 77 of file btSoftBodySolver_DX11.cpp.

void btSoftBodyLinkDataDX11::generateBatches (  ) 

Generate (and later update) the batching for the entire link 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 137 of file btSoftBodySolver_DX11.cpp.

bool btSoftBodyLinkDataDX11::moveFromAccelerator (  )  [virtual]

Move data from host memory from the accelerator.

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

Reimplemented from btSoftBodyLinkData.

Definition at line 119 of file btSoftBodySolver_DX11.cpp.

bool btSoftBodyLinkDataDX11::moveToAccelerator (  )  [virtual]

Move data from host memory to the accelerator.

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

Reimplemented from btSoftBodyLinkData.

Definition at line 101 of file btSoftBodySolver_DX11.cpp.

bool btSoftBodyLinkDataDX11::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 btSoftBodyLinkData.

Definition at line 96 of file btSoftBodySolver_DX11.cpp.

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

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

Reimplemented from btSoftBodyLinkData.

Definition at line 88 of file btSoftBodySolver_DX11.cpp.


Member Data Documentation

Start and length values for computation batches over link data.

Definition at line 72 of file btSoftBodySolverLinkData_DX11.h.

Definition at line 32 of file btSoftBodySolverLinkData_DX11.h.

Definition at line 33 of file btSoftBodySolverLinkData_DX11.h.

Definition at line 36 of file btSoftBodySolverLinkData_DX11.h.

Definition at line 40 of file btSoftBodySolverLinkData_DX11.h.

Definition at line 41 of file btSoftBodySolverLinkData_DX11.h.

Definition at line 38 of file btSoftBodySolverLinkData_DX11.h.

Definition at line 43 of file btSoftBodySolverLinkData_DX11.h.

Definition at line 42 of file btSoftBodySolverLinkData_DX11.h.

Definition at line 39 of file btSoftBodySolverLinkData_DX11.h.

Definition at line 37 of file btSoftBodySolverLinkData_DX11.h.

Link addressing information for each cloth.

Allows link locations to be computed independently of data batching.

Definition at line 67 of file btSoftBodySolverLinkData_DX11.h.

Definition at line 31 of file btSoftBodySolverLinkData_DX11.h.


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