Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
tesseract_collision::tesseract_collision_bullet::TesseractCompoundCompoundCollisionAlgorithm Class Reference

Supports collision between two btCompoundCollisionShape shapes. More...

#include <tesseract_compound_compound_collision_algorithm.h>

Inheritance diagram for tesseract_collision::tesseract_collision_bullet::TesseractCompoundCompoundCollisionAlgorithm:
Inheritance graph
[legend]
Collaboration diagram for tesseract_collision::tesseract_collision_bullet::TesseractCompoundCompoundCollisionAlgorithm:
Collaboration graph
[legend]

Classes

struct  CreateFunc
 
struct  SwappedCreateFunc
 

Public Member Functions

 TesseractCompoundCompoundCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped)
 
 ~TesseractCompoundCompoundCollisionAlgorithm () override
 
 TesseractCompoundCompoundCollisionAlgorithm (const TesseractCompoundCompoundCollisionAlgorithm &)=default
 
TesseractCompoundCompoundCollisionAlgorithmoperator= (const TesseractCompoundCompoundCollisionAlgorithm &)=default
 
 TesseractCompoundCompoundCollisionAlgorithm (TesseractCompoundCompoundCollisionAlgorithm &&)=default
 
TesseractCompoundCompoundCollisionAlgorithmoperator= (TesseractCompoundCompoundCollisionAlgorithm &&)=default
 
void processCollision (const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut) override
 
btScalar calculateTimeOfImpact (btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut) override
 
void getAllContactManifolds (btManifoldArray &manifoldArray) override
 
- Public Member Functions inherited from tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm
 TesseractCompoundCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped)
 
 ~TesseractCompoundCollisionAlgorithm () override
 
 TesseractCompoundCollisionAlgorithm (const TesseractCompoundCollisionAlgorithm &)=default
 
TesseractCompoundCollisionAlgorithmoperator= (const TesseractCompoundCollisionAlgorithm &)=default
 
 TesseractCompoundCollisionAlgorithm (TesseractCompoundCollisionAlgorithm &&)=default
 
TesseractCompoundCollisionAlgorithmoperator= (TesseractCompoundCollisionAlgorithm &&)=default
 
btCollisionAlgorithm * getChildAlgorithm (int n) const
 
void processCollision (const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut) override
 
btScalar calculateTimeOfImpact (btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut) override
 
void getAllContactManifolds (btManifoldArray &manifoldArray) override
 

Private Member Functions

void removeChildAlgorithms ()
 

Private Attributes

class btHashedSimplePairCache * m_childCollisionAlgorithmCache
 
btSimplePairArray m_removePairs
 
int m_compoundShapeRevision0
 
int m_compoundShapeRevision1
 

Additional Inherited Members

- Protected Member Functions inherited from tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm
void removeChildAlgorithms ()
 
void preallocateChildAlgorithms (const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap)
 
- Protected Attributes inherited from tesseract_collision::tesseract_collision_bullet::TesseractCompoundCollisionAlgorithm
btAlignedObjectArray< btCollisionAlgorithm * > m_childCollisionAlgorithms
 
bool m_isSwapped
 
class btPersistentManifold * m_sharedManifold
 
bool m_ownsManifold { false }
 
int m_compoundShapeRevision
 

Detailed Description

Supports collision between two btCompoundCollisionShape shapes.

The original implementation would check all collision objects before exiting the bvh of the compound shape. The original code had a callback, but it only passed in the collision shape and no the collision object which is where the user data is located. This was modifed to check if collision is done for the contact test type FIRST during the internal broadphase of the compound shapes and exit early.

Note: This could be removed in the future but the callback need to be modifed to accept the collision object along with the collision shape. I don't believe this will be an issue since all of the other callback in Bullet accept both.

Constructor & Destructor Documentation

◆ TesseractCompoundCompoundCollisionAlgorithm() [1/3]

tesseract_collision::tesseract_collision_bullet::TesseractCompoundCompoundCollisionAlgorithm::TesseractCompoundCompoundCollisionAlgorithm ( const btCollisionAlgorithmConstructionInfo &  ci,
const btCollisionObjectWrapper *  body0Wrap,
const btCollisionObjectWrapper *  body1Wrap,
bool  isSwapped 
)

◆ ~TesseractCompoundCompoundCollisionAlgorithm()

tesseract_collision::tesseract_collision_bullet::TesseractCompoundCompoundCollisionAlgorithm::~TesseractCompoundCompoundCollisionAlgorithm ( )
override

◆ TesseractCompoundCompoundCollisionAlgorithm() [2/3]

tesseract_collision::tesseract_collision_bullet::TesseractCompoundCompoundCollisionAlgorithm::TesseractCompoundCompoundCollisionAlgorithm ( const TesseractCompoundCompoundCollisionAlgorithm )
default

◆ TesseractCompoundCompoundCollisionAlgorithm() [3/3]

tesseract_collision::tesseract_collision_bullet::TesseractCompoundCompoundCollisionAlgorithm::TesseractCompoundCompoundCollisionAlgorithm ( TesseractCompoundCompoundCollisionAlgorithm &&  )
default

Member Function Documentation

◆ calculateTimeOfImpact()

btScalar tesseract_collision::tesseract_collision_bullet::TesseractCompoundCompoundCollisionAlgorithm::calculateTimeOfImpact ( btCollisionObject *  body0,
btCollisionObject *  body1,
const btDispatcherInfo &  dispatchInfo,
btManifoldResult *  resultOut 
)
override

◆ getAllContactManifolds()

void tesseract_collision::tesseract_collision_bullet::TesseractCompoundCompoundCollisionAlgorithm::getAllContactManifolds ( btManifoldArray &  manifoldArray)
override

◆ operator=() [1/2]

TesseractCompoundCompoundCollisionAlgorithm & tesseract_collision::tesseract_collision_bullet::TesseractCompoundCompoundCollisionAlgorithm::operator= ( const TesseractCompoundCompoundCollisionAlgorithm )
default

◆ operator=() [2/2]

TesseractCompoundCompoundCollisionAlgorithm & tesseract_collision::tesseract_collision_bullet::TesseractCompoundCompoundCollisionAlgorithm::operator= ( TesseractCompoundCompoundCollisionAlgorithm &&  )
default

◆ processCollision()

void tesseract_collision::tesseract_collision_bullet::TesseractCompoundCompoundCollisionAlgorithm::processCollision ( const btCollisionObjectWrapper *  body0Wrap,
const btCollisionObjectWrapper *  body1Wrap,
const btDispatcherInfo &  dispatchInfo,
btManifoldResult *  resultOut 
)
override

btCompoundShape might have changed: /make sure the internal child collision algorithm caches are still valid

clear all

we need to refresh all contact manifolds note that we should actually recursively traverse all children, btCompoundShape can nested more then 1 level deep so we should add a 'refreshManifolds' in the btCollisionAlgorithm

◆ removeChildAlgorithms()

void tesseract_collision::tesseract_collision_bullet::TesseractCompoundCompoundCollisionAlgorithm::removeChildAlgorithms ( )
private

Member Data Documentation

◆ m_childCollisionAlgorithmCache

class btHashedSimplePairCache* tesseract_collision::tesseract_collision_bullet::TesseractCompoundCompoundCollisionAlgorithm::m_childCollisionAlgorithmCache
private

◆ m_compoundShapeRevision0

int tesseract_collision::tesseract_collision_bullet::TesseractCompoundCompoundCollisionAlgorithm::m_compoundShapeRevision0
private

◆ m_compoundShapeRevision1

int tesseract_collision::tesseract_collision_bullet::TesseractCompoundCompoundCollisionAlgorithm::m_compoundShapeRevision1
private

◆ m_removePairs

btSimplePairArray tesseract_collision::tesseract_collision_bullet::TesseractCompoundCompoundCollisionAlgorithm::m_removePairs
private

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