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

SpuContactResult exports the contact points using double-buffered DMA transfers, only when needed So when an existing contact point is duplicated, no transfer/refresh is performed. More...

#include <SpuContactResult.h>

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

Public Member Functions

 SpuContactResult ()
 
virtual ~SpuContactResult ()
 
btPersistentManifoldGetSpuManifold () const
 
virtual void setShapeIdentifiersA (int partId0, int index0)
 setShapeIdentifiersA/B provides experimental support for per-triangle material / custom material combiner More...
 
virtual void setShapeIdentifiersB (int partId1, int index1)
 
void setContactInfo (btPersistentManifold *spuManifold, ppu_address_t manifoldAddress, const btTransform &worldTrans0, const btTransform &worldTrans1, btScalar restitution0, btScalar restitution1, btScalar friction0, btScalar friction01, bool isSwapped)
 
void writeDoubleBufferedManifold (btPersistentManifold *lsManifold, btPersistentManifold *mmManifold)
 
virtual void addContactPoint (const btVector3 &normalOnBInWorld, const btVector3 &pointInWorld, btScalar depth)
 
void flush ()
 
- Public Member Functions inherited from btDiscreteCollisionDetectorInterface::Result
virtual ~Result ()
 

Private Attributes

btTransform m_rootWorldTransform0
 
btTransform m_rootWorldTransform1
 
ppu_address_t m_manifoldAddress
 
btPersistentManifoldm_spuManifold
 
bool m_RequiresWriteBack
 
btScalar m_combinedFriction
 
btScalar m_combinedRestitution
 
bool m_isSwapped
 
DoubleBuffer
< btPersistentManifold, 1 > 
g_manifoldDmaExport
 

Detailed Description

SpuContactResult exports the contact points using double-buffered DMA transfers, only when needed So when an existing contact point is duplicated, no transfer/refresh is performed.

Definition at line 66 of file SpuContactResult.h.

Constructor & Destructor Documentation

SpuContactResult::SpuContactResult ( )

Definition at line 27 of file SpuContactResult.cpp.

SpuContactResult::~SpuContactResult ( )
virtual

Definition at line 34 of file SpuContactResult.cpp.

Member Function Documentation

void SpuContactResult::addContactPoint ( const btVector3 normalOnBInWorld,
const btVector3 pointInWorld,
btScalar  depth 
)
virtual
void SpuContactResult::flush ( )

Definition at line 221 of file SpuContactResult.cpp.

btPersistentManifold* SpuContactResult::GetSpuManifold ( ) const
inline

Definition at line 85 of file SpuContactResult.h.

void SpuContactResult::setContactInfo ( btPersistentManifold spuManifold,
ppu_address_t  manifoldAddress,
const btTransform worldTrans0,
const btTransform worldTrans1,
btScalar  restitution0,
btScalar  restitution1,
btScalar  friction0,
btScalar  friction01,
bool  isSwapped 
)

Definition at line 61 of file SpuContactResult.cpp.

void SpuContactResult::setShapeIdentifiersA ( int  partId0,
int  index0 
)
virtual

setShapeIdentifiersA/B provides experimental support for per-triangle material / custom material combiner

Implements btDiscreteCollisionDetectorInterface::Result.

Definition at line 74 of file SpuContactResult.cpp.

void SpuContactResult::setShapeIdentifiersB ( int  partId1,
int  index1 
)
virtual

Implements btDiscreteCollisionDetectorInterface::Result.

Definition at line 79 of file SpuContactResult.cpp.

void SpuContactResult::writeDoubleBufferedManifold ( btPersistentManifold lsManifold,
btPersistentManifold mmManifold 
)

only write back the contact information on SPU. Other platforms avoid copying, and use the data in-place see SpuFakeDma.cpp 'cellDmaLargeGetReadOnly'

Definition at line 174 of file SpuContactResult.cpp.

Member Data Documentation

DoubleBuffer<btPersistentManifold, 1> SpuContactResult::g_manifoldDmaExport
private

Definition at line 79 of file SpuContactResult.h.

btScalar SpuContactResult::m_combinedFriction
private

Definition at line 74 of file SpuContactResult.h.

btScalar SpuContactResult::m_combinedRestitution
private

Definition at line 75 of file SpuContactResult.h.

bool SpuContactResult::m_isSwapped
private

Definition at line 77 of file SpuContactResult.h.

ppu_address_t SpuContactResult::m_manifoldAddress
private

Definition at line 70 of file SpuContactResult.h.

bool SpuContactResult::m_RequiresWriteBack
private

Definition at line 73 of file SpuContactResult.h.

btTransform SpuContactResult::m_rootWorldTransform0
private

Definition at line 68 of file SpuContactResult.h.

btTransform SpuContactResult::m_rootWorldTransform1
private

Definition at line 69 of file SpuContactResult.h.

btPersistentManifold* SpuContactResult::m_spuManifold
private

Definition at line 72 of file SpuContactResult.h.


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