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

Wrapper for vertex data information. More...

#include <btSoftBodySolverData.h>

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

Classes

class  VertexDescription
 Class describing a vertex for input into the system. More...
 

Public Member Functions

 btSoftBodyVertexData ()
 
virtual ~btSoftBodyVertexData ()
 
virtual void clear ()
 
int getNumVertices ()
 
int getClothIdentifier (int vertexIndex)
 
void setVertexAt (const VertexDescription &vertex, int vertexIndex)
 
void createVertices (int numVertices, int clothIdentifier, int maxVertices=0)
 Create numVertices new vertices for cloth clothIdentifier maxVertices allows a buffer zone of extra vertices for alignment or tearing reasons. More...
 
Vectormath::Aos::Point3getPosition (int vertexIndex)
 Return a reference to the position of vertex vertexIndex as stored on the host. More...
 
Vectormath::Aos::Point3 getPosition (int vertexIndex) const
 
Vectormath::Aos::Point3getPreviousPosition (int vertexIndex)
 Return a reference to the previous position of vertex vertexIndex as stored on the host. More...
 
Vectormath::Aos::Vector3getVelocity (int vertexIndex)
 Return a reference to the velocity of vertex vertexIndex as stored on the host. More...
 
Vectormath::Aos::Vector3getForceAccumulator (int vertexIndex)
 Return a reference to the force accumulator of vertex vertexIndex as stored on the host. More...
 
Vectormath::Aos::Vector3getNormal (int vertexIndex)
 Return a reference to the normal of vertex vertexIndex as stored on the host. More...
 
Vectormath::Aos::Vector3 getNormal (int vertexIndex) const
 
float & getInverseMass (int vertexIndex)
 Return a reference to the inverse mass of vertex vertexIndex as stored on the host. More...
 
float & getArea (int vertexIndex)
 Get access to the area controlled by this vertex. More...
 
int & getTriangleCount (int vertexIndex)
 Get access to the array of how many triangles touch each vertex. 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 (bool bCopy=false, bool bCopyMinimum=true)
 Move data to host memory from the accelerator if bCopy is false. More...
 
btAlignedObjectArray
< Vectormath::Aos::Point3 > & 
getVertexPositions ()
 

Protected Attributes

btAlignedObjectArray< int > m_clothIdentifier
 
btAlignedObjectArray
< Vectormath::Aos::Point3
m_vertexPosition
 
btAlignedObjectArray
< Vectormath::Aos::Point3
m_vertexPreviousPosition
 
btAlignedObjectArray
< Vectormath::Aos::Vector3
m_vertexVelocity
 
btAlignedObjectArray
< Vectormath::Aos::Vector3
m_vertexForceAccumulator
 
btAlignedObjectArray
< Vectormath::Aos::Vector3
m_vertexNormal
 
btAlignedObjectArray< float > m_vertexInverseMass
 
btAlignedObjectArray< float > m_vertexArea
 
btAlignedObjectArray< int > m_vertexTriangleCount
 

Detailed Description

Wrapper for vertex data information.

By wrapping it like this we stand a good chance of being able to optimise for storage format easily. It should also help us make sure all the data structures remain consistent.

Definition at line 312 of file btSoftBodySolverData.h.

Constructor & Destructor Documentation

btSoftBodyVertexData::btSoftBodyVertexData ( )
inline

Definition at line 395 of file btSoftBodySolverData.h.

virtual btSoftBodyVertexData::~btSoftBodyVertexData ( )
inlinevirtual

Definition at line 399 of file btSoftBodySolverData.h.

Member Function Documentation

virtual void btSoftBodyVertexData::clear ( )
inlinevirtual

Definition at line 403 of file btSoftBodySolverData.h.

void btSoftBodyVertexData::createVertices ( int  numVertices,
int  clothIdentifier,
int  maxVertices = 0 
)
inline

Create numVertices new vertices for cloth clothIdentifier maxVertices allows a buffer zone of extra vertices for alignment or tearing reasons.

Definition at line 442 of file btSoftBodySolverData.h.

float& btSoftBodyVertexData::getArea ( int  vertexIndex)
inline

Get access to the area controlled by this vertex.

Definition at line 529 of file btSoftBodySolverData.h.

int btSoftBodyVertexData::getClothIdentifier ( int  vertexIndex)
inline

Definition at line 421 of file btSoftBodySolverData.h.

Vectormath::Aos::Vector3& btSoftBodyVertexData::getForceAccumulator ( int  vertexIndex)
inline

Return a reference to the force accumulator of vertex vertexIndex as stored on the host.

Definition at line 500 of file btSoftBodySolverData.h.

float& btSoftBodyVertexData::getInverseMass ( int  vertexIndex)
inline

Return a reference to the inverse mass of vertex vertexIndex as stored on the host.

Definition at line 521 of file btSoftBodySolverData.h.

Vectormath::Aos::Vector3& btSoftBodyVertexData::getNormal ( int  vertexIndex)
inline

Return a reference to the normal of vertex vertexIndex as stored on the host.

Definition at line 508 of file btSoftBodySolverData.h.

Vectormath::Aos::Vector3 btSoftBodyVertexData::getNormal ( int  vertexIndex) const
inline

Definition at line 513 of file btSoftBodySolverData.h.

int btSoftBodyVertexData::getNumVertices ( )
inline

Definition at line 416 of file btSoftBodySolverData.h.

Vectormath::Aos::Point3& btSoftBodyVertexData::getPosition ( int  vertexIndex)
inline

Return a reference to the position of vertex vertexIndex as stored on the host.

Definition at line 471 of file btSoftBodySolverData.h.

Vectormath::Aos::Point3 btSoftBodyVertexData::getPosition ( int  vertexIndex) const
inline

Definition at line 476 of file btSoftBodySolverData.h.

Vectormath::Aos::Point3& btSoftBodyVertexData::getPreviousPosition ( int  vertexIndex)
inline

Return a reference to the previous position of vertex vertexIndex as stored on the host.

Definition at line 484 of file btSoftBodySolverData.h.

int& btSoftBodyVertexData::getTriangleCount ( int  vertexIndex)
inline

Get access to the array of how many triangles touch each vertex.

Definition at line 537 of file btSoftBodySolverData.h.

Vectormath::Aos::Vector3& btSoftBodyVertexData::getVelocity ( int  vertexIndex)
inline

Return a reference to the velocity of vertex vertexIndex as stored on the host.

Definition at line 492 of file btSoftBodySolverData.h.

btAlignedObjectArray< Vectormath::Aos::Point3 >& btSoftBodyVertexData::getVertexPositions ( )
inline

Definition at line 576 of file btSoftBodySolverData.h.

virtual bool btSoftBodyVertexData::moveFromAccelerator ( bool  bCopy = false,
bool  bCopyMinimum = true 
)
inlinevirtual

Move data to host memory from the accelerator if bCopy is false.

If bCopy is true, copy data to host memory from the accelerator so that data won't be moved to accelerator when moveToAccelerator() is called next time. If bCopyMinimum is true, only vertex position and normal are copied. bCopyMinimum will be meaningful only if bCopy is true. The CPU version will always return that it has moved it.

Reimplemented in btSoftBodyVertexDataDX11, and btSoftBodyVertexDataOpenCL.

Definition at line 571 of file btSoftBodySolverData.h.

virtual bool btSoftBodyVertexData::moveToAccelerator ( )
inlinevirtual

Move data from host memory to the accelerator.

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

Reimplemented in btSoftBodyVertexDataDX11, and btSoftBodyVertexDataOpenCL.

Definition at line 558 of file btSoftBodySolverData.h.

virtual bool btSoftBodyVertexData::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 btSoftBodyVertexDataDX11, and btSoftBodyVertexDataOpenCL.

Definition at line 549 of file btSoftBodySolverData.h.

void btSoftBodyVertexData::setVertexAt ( const VertexDescription vertex,
int  vertexIndex 
)
inline

Definition at line 426 of file btSoftBodySolverData.h.

Member Data Documentation

btAlignedObjectArray< int > btSoftBodyVertexData::m_clothIdentifier
protected

Definition at line 384 of file btSoftBodySolverData.h.

btAlignedObjectArray< float > btSoftBodyVertexData::m_vertexArea
protected

Definition at line 391 of file btSoftBodySolverData.h.

btAlignedObjectArray< Vectormath::Aos::Vector3 > btSoftBodyVertexData::m_vertexForceAccumulator
protected

Definition at line 388 of file btSoftBodySolverData.h.

btAlignedObjectArray< float > btSoftBodyVertexData::m_vertexInverseMass
protected

Definition at line 390 of file btSoftBodySolverData.h.

btAlignedObjectArray< Vectormath::Aos::Vector3 > btSoftBodyVertexData::m_vertexNormal
protected

Definition at line 389 of file btSoftBodySolverData.h.

btAlignedObjectArray< Vectormath::Aos::Point3 > btSoftBodyVertexData::m_vertexPosition
protected

Definition at line 385 of file btSoftBodySolverData.h.

btAlignedObjectArray< Vectormath::Aos::Point3 > btSoftBodyVertexData::m_vertexPreviousPosition
protected

Definition at line 386 of file btSoftBodySolverData.h.

btAlignedObjectArray< int > btSoftBodyVertexData::m_vertexTriangleCount
protected

Definition at line 392 of file btSoftBodySolverData.h.

btAlignedObjectArray< Vectormath::Aos::Vector3 > btSoftBodyVertexData::m_vertexVelocity
protected

Definition at line 387 of file btSoftBodySolverData.h.


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