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

#include <btSoftBodySolverTriangleData_DX11.h>

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

Classes

struct  BatchPair
 

Public Member Functions

 btSoftBodyTriangleDataDX11 (ID3D11Device *d3dDevice, ID3D11DeviceContext *d3dDeviceContext)
 
virtual ~btSoftBodyTriangleDataDX11 ()
 
virtual void createTriangles (int numTriangles)
 Allocate enough space in all link-related arrays to fit numLinks links. More...
 
virtual void setTriangleAt (const btSoftBodyTriangleData::TriangleDescription &triangle, int triangleIndex)
 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...
 
void generateBatches ()
 Generate (and later update) the batching for the entire triangle set. More...
 
- Public Member Functions inherited from btSoftBodyTriangleData
 btSoftBodyTriangleData ()
 
virtual ~btSoftBodyTriangleData ()
 
virtual void clear ()
 
int getNumTriangles ()
 
const TriangleNodeSetgetVertexSet (int triangleIndex)
 Return the vertex index set for triangle triangleIndex as stored on the host. More...
 
float & getTriangleArea (int triangleIndex)
 Get access to the triangle area. More...
 
Vectormath::Aos::Vector3getNormal (int triangleIndex)
 Get access to the normal vector for this triangle. More...
 

Public Attributes

bool m_onGPU
 
ID3D11Device * m_d3dDevice
 
ID3D11DeviceContext * m_d3dDeviceContext
 
btDX11Buffer
< btSoftBodyTriangleData::TriangleNodeSet
m_dx11VertexIndices
 
btDX11Buffer< float > m_dx11Area
 
btDX11Buffer
< Vectormath::Aos::Vector3
m_dx11Normal
 
btAlignedObjectArray< int > m_triangleAddresses
 Link addressing information for each cloth. More...
 
btAlignedObjectArray< BatchPairm_batchStartLengths
 Start and length values for computation batches over link data. More...
 

Additional Inherited Members

- Protected Attributes inherited from btSoftBodyTriangleData
btAlignedObjectArray
< TriangleNodeSet
m_vertexIndices
 
btAlignedObjectArray< float > m_area
 
btAlignedObjectArray
< Vectormath::Aos::Vector3
m_normal
 

Detailed Description

Definition at line 26 of file btSoftBodySolverTriangleData_DX11.h.

Constructor & Destructor Documentation

btSoftBodyTriangleDataDX11::btSoftBodyTriangleDataDX11 ( ID3D11Device *  d3dDevice,
ID3D11DeviceContext *  d3dDeviceContext 
)

Definition at line 355 of file btSoftBodySolver_DX11.cpp.

btSoftBodyTriangleDataDX11::~btSoftBodyTriangleDataDX11 ( )
virtual

Definition at line 364 of file btSoftBodySolver_DX11.cpp.

Member Function Documentation

void btSoftBodyTriangleDataDX11::createTriangles ( int  numTriangles)
virtual

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

Reimplemented from btSoftBodyTriangleData.

Definition at line 371 of file btSoftBodySolver_DX11.cpp.

void btSoftBodyTriangleDataDX11::generateBatches ( )

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

bool btSoftBodyTriangleDataDX11::moveFromAccelerator ( )
virtual

Move data from host memory from the accelerator.

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

Reimplemented from btSoftBodyTriangleData.

Definition at line 408 of file btSoftBodySolver_DX11.cpp.

bool btSoftBodyTriangleDataDX11::moveToAccelerator ( )
virtual

Move data from host memory to the accelerator.

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

Reimplemented from btSoftBodyTriangleData.

Definition at line 395 of file btSoftBodySolver_DX11.cpp.

bool btSoftBodyTriangleDataDX11::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 btSoftBodyTriangleData.

Definition at line 390 of file btSoftBodySolver_DX11.cpp.

void btSoftBodyTriangleDataDX11::setTriangleAt ( const btSoftBodyTriangleData::TriangleDescription triangle,
int  triangleIndex 
)
virtual

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

Reimplemented from btSoftBodyTriangleData.

Definition at line 383 of file btSoftBodySolver_DX11.cpp.

Member Data Documentation

btAlignedObjectArray< BatchPair > btSoftBodyTriangleDataDX11::m_batchStartLengths

Start and length values for computation batches over link data.

Definition at line 65 of file btSoftBodySolverTriangleData_DX11.h.

ID3D11Device* btSoftBodyTriangleDataDX11::m_d3dDevice

Definition at line 30 of file btSoftBodySolverTriangleData_DX11.h.

ID3D11DeviceContext* btSoftBodyTriangleDataDX11::m_d3dDeviceContext

Definition at line 31 of file btSoftBodySolverTriangleData_DX11.h.

btDX11Buffer<float> btSoftBodyTriangleDataDX11::m_dx11Area

Definition at line 34 of file btSoftBodySolverTriangleData_DX11.h.

btDX11Buffer<Vectormath::Aos::Vector3> btSoftBodyTriangleDataDX11::m_dx11Normal

Definition at line 35 of file btSoftBodySolverTriangleData_DX11.h.

btDX11Buffer<btSoftBodyTriangleData::TriangleNodeSet> btSoftBodyTriangleDataDX11::m_dx11VertexIndices

Definition at line 33 of file btSoftBodySolverTriangleData_DX11.h.

bool btSoftBodyTriangleDataDX11::m_onGPU

Definition at line 29 of file btSoftBodySolverTriangleData_DX11.h.

btAlignedObjectArray< int > btSoftBodyTriangleDataDX11::m_triangleAddresses

Link addressing information for each cloth.

Allows link locations to be computed independently of data batching.

Definition at line 60 of file btSoftBodySolverTriangleData_DX11.h.


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